forcedotcom/sf-skills / skills/dx-scratch-def-configure
dx-scratch-def-configure
VerifiedDrafts or refines a schema-valid Salesforce DX scratch-def from natural language. Preview first (confirm card or refine diff); apply via this skill's helper only after consent that the draft/delta is unchanged — author scratch-def JSON only through the helper. Writes config/<purpose>-scratch-def.json (default project) under an existing SF DX project that already has config/ (requires existing config/). Refine sends a structured delta only (helper copy-through patches the base; catalog on new features only; whole-file diff; apply requires --out equal to --base; optional baseSha256 guards against the file changing between preview and write). Put product names (like Revenue Cloud) in features as-is. Also use for trial, shape/snapshot-only, underspecified, missing config/, multi-def ask-which, invalid JSON, or batch asks: invoke this skill, STOP, and write report.md on disk. Org creation and Dev Hub enablement belong to dx-org-manage / dx-org-devhub-configure. Not for those skills or SKU work.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 15.1 KB |
| examples/confirm-card.md | markdown | 2.7 KB |
| examples/report-recipes.md | markdown | 5.4 KB |
| references/features.json | config | 131.6 KB |
| references/project-scratch-def.schema.json | config | 72.1 KB |
| references/settings-map.json | config | 18.6 KB |
| scripts/lib_scratch_def.pyexecutable | script | 81.2 KB |
| scripts/requirements.txt | manifest | 132 B |
| scripts/scrape_config_values.pyexecutable | script | 30.1 KB |
examples/confirm-card.md
View on GitHub# Example confirm card (Generate)
Show this card in chat with the preview JSON. Do not put the JSON in report.md.
Intent paraphrase: Developer-edition scratch-def for a B2B Revenue Cloud
project. Features are what the helper mapped from the user's words — not
extra catalog tokens.
- Edition: Developer
- Features: CoreCpq
- Settings enriched:
- revenueManagementSettings.enableCoreCPQ = true
- Output path (after confirm): config/project-scratch-def.json
**Required in the chat reply (not in report.md):** show the schema-valid
helper `document` as a fenced JSON block. Example:
```json
{
"edition": "Developer",
"features": [
"CoreCpq"
],
"settings": {
"revenueManagementSettings": {
"enableCoreCPQ": true
}
}
}
```
Write file?
Write only if they accept this preview unchanged. A first generate that says
write or skip preview still uses this card. Write + change → preview
again, do not apply. After they accept: apply, show the **final written JSON**
in chat.
Pass the user's product or cloud words in the features array as-is.
## Refine diff card
Show this when patching an existing file. Source the bullets from helper
`diff` (preview --base with a structured delta). Do not put the JSON in
report.md.
Intent paraphrase: Add Communities to the existing Developer scratch-def.
Delta sent (example): `{"addFeatures":["Communities"]}`
- Base: config/project-scratch-def.json
- baseSha256: (from helper — optional on apply as a race guard)
- Features added: Communities
- Features removed: (none)
- Features quantity changed: (none) — or e.g. EducationCloud:3 → EducationCloud:5
from helper `featuresQuantityChanged` (same-base quantity edits)
- Edition: unchanged (Developer)
- Fields added/removed/changed: (none) — or list top-level keys from helper
`fieldsAdded` / `fieldsRemoved` / `fieldsChanged`
- Settings added: communitiesSettings.enableNetworksEnabled = true
- Settings removed: (none)
- Settings changed: (none) — or list paths whose values changed
(helper `settingsChanged`)
- Orphaned required settings: (none)
**Required in the chat reply (not in report.md):** show the schema-valid
resulting helper `document` as a fenced JSON block.
Write file?
If orphaned required settings are listed, ask whether to delete them before
writing. Removing a feature does not silently delete unrelated settings.
## Shape + features variant
User supplied sourceOrg (or snapshot id/name).
- sourceOrg: 00D000000000001AAA
- Features: Communities, API
- Settings: communitiesSettings.enableNetworksEnabled = true
- Output path (after confirm): config/project-scratch-def.json
**Required in chat:** fenced JSON of preview `document` (sourceOrg + features +
enriched settings).
Write file?
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |