Loading...
Loading...
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).
npx skill4agent add forcedotcom/sf-skills dx-org-snapshot-managesf org create snapshotsf org get snapshotsf org list snapshotsf org delete snapshotsf org ... snapshot[ -d force-app/main/adk-eval-output/ ] && echo 'force-app/main/adk-eval-output'<output-dir>/<filename>create-snapshot-result.jsonget-snapshot-result.jsonlist-snapshots-result.jsondelete-snapshot-result.json--snapshot <name>dx-org-managesf org create/list/delete shapedx-org-shape-manage| Snapshot (this skill) | Org Shape ( | |
|---|---|---|
| Captures | Full point-in-time copy: metadata and data | Baseline config only: features, limits, edition, Metadata API settings |
| Commands | | |
| Referenced via | | |
| Prerequisite | Dev Hub has Scratch Org Snapshots enabled | Source org has Org Shape for Scratch Orgs enabled |
| Operates against | A Dev Hub ( | The source org ( |
sf org create snapshotsf org get snapshotsf org list snapshotsf org delete snapshotdx-org-shape-managedx-org-manage--target-dev-hub-vtarget-dev-hub--target-org00D--source-org-o--name-n0Oo--snapshot-sExpirationDate--target-dev-hubsf config get target-dev-hubmy-dev-hubsf org login web --set-default-dev-hub--json| Operation | User intent | Execute via Bash tool |
|---|---|---|
| Create | Create snapshot with name only | |
| Create | Create snapshot with description | |
| Create | Specify Dev Hub explicitly | |
| Get | Check a snapshot's status/details | |
| List | List all snapshots in the Dev Hub | |
| List | List snapshots expiring within N days | |
| Delete | Delete a snapshot (with confirm prompt) | |
| Delete | Delete without prompting (scripts/CI) | |
| Delete | Delete multiple/all snapshots | First |
createStatusInProgressExpirationDatenullsf org get snapshotStatusActiveexamples/create_success_output.jsonexamples/get_output.json| Constraint | Rationale |
|---|---|
Always use | Provides structured output for reliable parsing and error handling |
| All commands operate against a Dev Hub | |
| Dev Hub must have Scratch Org Snapshots enabled | Otherwise commands fail — contact Salesforce to enable it |
| Source org (create) must be a scratch org | Snapshots only work with scratch orgs |
| Snapshot names must be unique in the Dev Hub, ≤15 characters | Longer names fail with |
| Creation is asynchronous | |
| There is no update/rename/extend-expiration command. | Verified — the CLI (and the underlying platform object) exposes only create/get/list/delete. To change a snapshot's name, description, or expiration, delete it and create a new one. |
| There is no bulk-delete command. | Each |
| Returns every visible snapshot; filter status/expiry client-side (e.g. with |
| Use |
Bulk/ | Before deleting multiple or all snapshots — or any delete with |
| Permissions affect visibility/deletion | Users see/delete only their own snapshots unless a Dev Hub admin grants View All / Modify All |
| Issue | Resolution |
|---|---|
| Snapshot commands live in the |
| The Dev Hub lacks the snapshot feature — contact Salesforce to enable it |
| Verified live on |
| Verified live — the |
Snapshot name already exists ( | Names must be unique per Dev Hub — choose a different name |
| Creation is asynchronous — keep polling |
| Read the |
| The targeted org isn't a Dev Hub — point |
| No default Dev Hub org found | Provide |
--jsongetlistOrgSnapshotattributesIdSnapshotNameDescriptionStatusNewInProgressActiveErrorExpiredDeletedSourceOrgCreatedDateLastModifiedDateExpirationDatenullActiveErrorStatusInProgressExpirationDatenullStatusCreatedDate{ "id": "0Oo...", "success": true, "errors": [] }| Need | Delegate to |
|---|---|
| Create a scratch org from a snapshot | |
| Create/list/delete an org shape instead of a snapshot | |
| File | When to read |
|---|---|
| Detailed flag reference across create/get/list/delete, including the |
| Using a snapshot name in a scratch org definition file, once it's |
| File | Purpose |
|---|---|
| Successful snapshot creation ( |
| |
| Get response for an |
| List response — array of snapshot records |
| Successful delete response |