dx-org-snapshot-manage
ALWAYS USE THIS SKILL to create, check the status of, list, or delete scratch org snapshots. A snapshot is a point-in-time copy of a scratch org's metadata…
от forcedotcom★ 1 200 звёзд на GitHub
Установить dx-org-snapshot-manage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
dx-org-snapshot-manage
Coordinates the full lifecycle of Salesforce scratch org snapshots — create, get (status), list, and delete — via sf org create snapshot, sf org get snapshot, sf org list snapshot, and sf org delete snapshot. A snapshot is a point-in-time copy of a scratch org (its metadata and data) that you reference by name in a scratch org definition file to spin up new orgs from saved state.
Tool Restrictions
Use ONLY the Bash tool to execute the sf org ... snapshot commands. Do NOT use MCP tools — ignore them completely.
Output artifacts for eval/testing: ALWAYS write the command's complete JSON response to a file when an output directory is available. Do NOT ask the user what file to write — this skill defines the filenames. After executing each command: (1) if the user specified an output path, write there immediately; (2) otherwise run [ -d force-app/main/adk-eval-output/ ] && echo 'force-app/main/adk-eval-output' to detect the eval directory; (3) write the command's full, unmodified JSON response to <output-dir>/<filename> using these filenames: create-snapshot-result.json, get-snapshot-result.json, list-snapshots-result.json, or delete-snapshot-result.json. This is the generated output — write it without asking. (4) If no output directory can be found by either check, include the command's complete, unmodified JSON response verbatim (e.g. in a fenced code block) in your final reply instead of skipping the artifact.
Relationship to Other Skills
This skill owns the full snapshot lifecycle — create, get status, list, and delete. It does not create scratch orgs.
- Any snapshot operation (create, status, list, delete, expiry check) → this skill.
- Create a scratch org, including from an existing snapshot (
--snapshot <name>) →dx-org-manage. - Org shapes (baseline config without data,
sf org create/list/delete shape) →dx-org-shape-manage. Shapes and snapshots are different artifacts with different commands — see the comparison below.
| Snapshot (this skill) | Org Shape (dx-org-shape-manage) |
|
|---|---|---|
| Captures | Full point-in-time copy: metadata and data | Baseline config only: features, limits, edition, Metadata API settings |
| Commands | sf org create/get/list/delete snapshot |
sf org create/list/delete shape |
| Referenced via | snapshot (name) in the scratch def file |
sourceOrg (org ID) in the scratch def file |
| Prerequisite | Dev Hub has Scratch Org Snapshots enabled | Source org has Org Shape for Scratch Orgs enabled |
| Operates against | A Dev Hub (--target-dev-hub) |
The source org (--target-org) |
Scope
- In scope: Creating (
sf org create snapshot), getting status (sf org get snapshot), listing (sf org list snapshot), and deleting (sf org delete snapshot) scratch org snapshots - Out of scope: Creating org shapes (
dx-org-shape-manage), creating scratch orgs — including from a snapshot (dx-org-manage)
Required Inputs
Infer from the user's request:
- Operation: create, get, list, or delete (see Workflow step 1)
- Dev Hub: Username or alias of the Dev Hub that owns the snapshots. Passed via
--target-dev-hub(-v); optional if thetarget-dev-hubconfig variable is set. All four commands operate against a Dev Hub, never--target-org. - Source org (create only): Scratch org ID (starts with
00D), username, or alias to snapshot. Passed via--source-org(-o). - Snapshot name (create only): A unique name for the snapshot, max 15 characters. Passed via
--name(-n). - Snapshot name or ID (get & delete only): Name, or ID (starts with
0Oo), of the snapshot. Passed via--snapshot(-s). - Description (create, optional): Documents snapshot contents.
- Expiry threshold in days (expiring-soon listing only): There is no CLI flag for this — it's a client-side filter on
ExpirationDate(see Command Patterns).
Workflow
- Identify the operation and match it to the command pattern below.
- Resolve the Dev Hub — if
--target-dev-hubisn't provided, check the default withsf config get target-dev-hub. Never fabricate a placeholder Dev Hub name (e.g.my-dev-hub) — an unresolved hub is a hard stop; advisesf org login web --set-default-dev-hubinstead. - For create, confirm the source org and snapshot name — the source must be a scratch org; the name must be unique in the Dev Hub and ≤15 characters.
- Execute via Bash tool with the
--jsonflag. - Report the result (see Output Expectations and the example files).
Command Patterns
| Operation | User intent | Execute via Bash tool |
|---|---|---|
| Create | Create snapshot with name only | sf org create snapshot --source-org <orgId|alias> --name <SnapshotName> --json |
| Create | Create snapshot with description |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- examples/create_error_output.json
- examples/create_success_output.json
- examples/delete_output.json
- examples/get_output.json
- examples/list_output.json
- references/cli_flags.md
- references/snapshot_usage.md
FAQ
Что делает скилл dx-org-snapshot-manage?
ALWAYS USE THIS SKILL to create, check the status of, list, or delete scratch org snapshots. A snapshot is a point-in-time copy of a scratch org's metadata AND data, referenced by name in the `snapshot` field of a scratch org definition file. Use when the user asks to create/take a snapshot, check a snapshot's status or creation progress, list/show/view existing snapshots (including filtering for snapshots expiring soon), or delete/remove a snapshot. Requires a Dev Hub with Scratch Org Snapshots enabled. DO NOT TRIGGER for creating org shapes (use dx-org-shape-manage) or for creating scratch orgs, including from an existing snapshot via `--snapshot` (use dx-org-manage).
Как установить скилл dx-org-snapshot-manage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dx-org-snapshot-manage запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…