Agent skill

Dx Org Snapshot Manage

by forcedotcom in forcedotcom/sf-skills

ALWAYS USE THIS SKILL to create, check the status of, list, or delete scratch org snapshots.

Apache-2.0Auto-check passedSales & Support

Install Dx Org Snapshot Manage

skills CLI
$ npx skills add forcedotcom/sf-skills --skill dx-org-snapshot-manage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install forcedotcom/sf-skills dx-org-snapshot-manage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/forcedotcom/sf-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dx-org-snapshot-manage .claude/skills/dx-org-snapshot-manage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dx-org-snapshot-manage
GitHub stars
1.1k
Token cost
~3.3k tokens
SKILL.md length
1,529 words
Files
8 (incl. references)
Skills in repo
252
Repo updated
First seen
Licence
Apache-2.0

At a glance

ALWAYS USE THIS SKILL to create, check the status of, list, or delete scratch org snapshots.

  • Works in 5 steps: Identify the operation and match it to… → Resolve the Dev Hub — if… → For create, confirm the source org and… → …
  • Check the status of
  • SKILL.md covers Tool Restrictions, Relationship to Other Skills, Scope and Required Inputs, plus 7 more sections
  • Calls sf

What it does

Dx Org Snapshot Manage is an agent skill from forcedotcom/sf-skills. 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…

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `examples/create_error_output.json`, `examples/create_success_output.json` and `examples/delete_output.json`).

It sits in Sales & Support. It works with Salesforce. The repository describes itself as: Salesforce's curated collection of agent skills for building applications. Optimized for Agentforce Vibes, compatible with all AI tools. The licence is Apache-2.0.

When your agent uses it

  • Check the status of
  • Delete scratch org snapshots
  • The user asks to create/take a snapshot
  • Check a snapshots status

Example prompts

  • “Use the dx-org-snapshot-manage skill to alway USE THIS SKILL to create, check the status of, list, or delete scratch org snapshots”
  • “/dx-org-snapshot-manage”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Identify the operation and match it to the command pattern below.
  2. Resolve the Dev Hub — if --target-dev-hub isn't provided, check the default with sf config get target-dev-hub. Never fabricate a…
  3. 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…
  4. Execute via Bash tool with the --json flag.
  5. Report the result (see Output Expectations and the example files).

What it can do on your machine

Read from SKILL.md and the folder at commit 4bbae5c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • sf

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dx Org Snapshot Manage loads about 3.3k tokens when it runs, and up to ~5.7k if it reads all its reference files. Until then it costs about 175 tokens; SKILL.md has 1,529 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~175
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from forcedotcom/sf-skills at commit 4bbae5c, republished under its Apache-2.0 licence (© forcedotcom). 1,529 words, ~3,257 tokens.

Download SKILL.mdSave it as .claude/skills/dx-org-snapshot-manage/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
dx-org-snapshot-manage
description
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).
metadata.version
1.0
metadata.domains
Developer Experience
metadata.minApiVersion
60.0
metadata.relatedSkills
dx-org-manage, dx-org-shape-manage

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)
CapturesFull point-in-time copy: metadata and dataBaseline config only: features, limits, edition, Metadata API settings
Commandssf org create/get/list/delete snapshotsf org create/list/delete shape
Referenced viasnapshot (name) in the scratch def filesourceOrg (org ID) in the scratch def file
PrerequisiteDev Hub has Scratch Org Snapshots enabledSource org has Org Shape for Scratch Orgs enabled
Operates againstA 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 the target-dev-hub config 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

  1. Identify the operation and match it to the command pattern below.
  2. Resolve the Dev Hub — if --target-dev-hub isn't provided, check the default with sf config get target-dev-hub. Never fabricate a placeholder Dev Hub name (e.g. my-dev-hub) — an unresolved hub is a hard stop; advise sf org login web --set-default-dev-hub instead.
  3. 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.
  4. Execute via Bash tool with the --json flag.
  5. Report the result (see Output Expectations and the example files).
Command Patterns
OperationUser intentExecute via Bash tool
CreateCreate snapshot with name onlysf org create snapshot --source-org <orgId|alias> --name <SnapshotName> --json
CreateCreate snapshot with descriptionsf org create snapshot --source-org <orgId|alias> --name <SnapshotName> --description "<desc>" --json
CreateSpecify Dev Hub explicitlysf org create snapshot --source-org <orgId|alias> --name <SnapshotName> --target-dev-hub <devHub> --json
GetCheck a snapshot's status/detailssf org get snapshot --snapshot <name|0Oo...> --json
ListList all snapshots in the Dev Hubsf org list snapshot --json
ListList snapshots expiring within N dayssf org list snapshot --json → filter on ExpirationDate with jq (see references/cli_flags.md)
DeleteDelete a snapshot (with confirm prompt)sf org delete snapshot --snapshot <name|0Oo...> --json
DeleteDelete without prompting (scripts/CI)sf org delete snapshot --snapshot <name|0Oo...> --no-prompt --json
DeleteDelete multiple/all snapshotsFirst sf org list snapshot --json, confirm the target names with the user, then run sf org delete snapshot --snapshot <name> once per snapshot — there is no bulk-delete command

Snapshot creation is asynchronous. create returns a record whose Status is typically InProgress initially, with ExpirationDate still null. Poll with sf org get snapshot until Status is Active (verified live against a real Dev Hub — see examples/create_success_output.json vs examples/get_output.json) before using the snapshot to create scratch orgs.


Show full SKILL.md (684 more words)Show less

Rules / Constraints

ConstraintRationale
Always use --json flagProvides structured output for reliable parsing and error handling
All commands operate against a Dev Hub--target-dev-hub (not --target-org) — optional only if the target-dev-hub config is set
Dev Hub must have Scratch Org Snapshots enabledOtherwise commands fail — contact Salesforce to enable it
Source org (create) must be a scratch orgSnapshots only work with scratch orgs
Snapshot names must be unique in the Dev Hub, ≤15 charactersLonger names fail with STRING_TOO_LONG (verified live)
Creation is asynchronouscreate may return before the snapshot is Active — poll with sf org get snapshot
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 sf org delete snapshot call removes exactly one snapshot
sf org list snapshot has no server-side filtersReturns every visible snapshot; filter status/expiry client-side (e.g. with jq)
delete prompts for confirmation by defaultUse --no-prompt (-p) for non-interactive/CI use
Bulk/--no-prompt deletes require an explicit confirmation stepBefore deleting multiple or all snapshots — or any delete with --no-prompt — first run sf org list snapshot --json, echo the resolved target names back to the user, and get explicit confirmation. Deletion is irreversible.
Permissions affect visibility/deletionUsers see/delete only their own snapshots unless a Dev Hub admin grants View All / Modify All

Troubleshooting

IssueResolution
@salesforce/plugin-signups does not exist in the registrySnapshot commands live in the signups plugin, bundled with a normal sf install. This means the CLI environment is incomplete (slim/offline image) — do NOT attempt sf plugins install in an offline environment, it will fail and loop. Advise repairing the environment (sf update, or a fresh install) from a connected machine.
Scratch Org Snapshots isn't enabled for your Dev Hub.The Dev Hub lacks the snapshot feature — contact Salesforce to enable it
No snapshot found with the given name or id: <value> (SingleRecordQuery_NoRecords)Verified live on get/delete — the name/ID doesn't exist in this Dev Hub. Run sf org list snapshot --json to see available snapshots
STRING_TOO_LONG — "Org Snapshot Name: data value too large... (max length=15)"Verified live — the --name value exceeds 15 characters. Shorten it and retry
Snapshot name already exists (DuplicateValue)Names must be unique per Dev Hub — choose a different name
Status is InProgress for a whileCreation is asynchronous — keep polling sf org get snapshot until Status becomes Active
Status is Error (see the Error field)Read the Error field, delete the failed snapshot, and recreate
NotADevHubErrorThe targeted org isn't a Dev Hub — point --target-dev-hub at an actual Dev Hub
No default Dev Hub org foundProvide --target-dev-hub <alias> or set a default with sf config set target-dev-hub=<alias>

Output Expectations

All commands return JSON when --json is used. get/list return the raw OrgSnapshot sobject record(s) — verified live, these include the sobject attributes wrapper plus Id, SnapshotName, Description, Status (New, InProgress, Active, Error, Expired, or Deleted), SourceOrg, CreatedDate, LastModifiedDate, ExpirationDate (null until Active), and Error.

  • Create → a single snapshot record (Status is InProgress immediately after creation; ExpirationDate is null).
  • Get → a single snapshot record — use it to poll Status.
  • List → an array of snapshot records, ordered by CreatedDate. Empty array if none exist.
  • Delete → { "id": "0Oo...", "success": true, "errors": [] }. No result if the user declines the confirmation prompt.

See the example files below for exact response structures (captured live against a real Dev Hub, not assumed).


Cross-Skill Integration

NeedDelegate to
Create a scratch org from a snapshotdx-org-manage skill (set snapshot to the snapshot name in the definition file, or --snapshot <name>)
Create/list/delete an org shape instead of a snapshotdx-org-shape-manage skill

Reference File Index

FileWhen to read
references/cli_flags.mdDetailed flag reference across create/get/list/delete, including the jq pipeline for filtering snapshots expiring soon
references/snapshot_usage.mdUsing a snapshot name in a scratch org definition file, once it's Active

Example Files

FilePurpose
examples/create_success_output.jsonSuccessful snapshot creation (Status: InProgress)
examples/create_error_output.jsonSTRING_TOO_LONG — name over 15 characters
examples/get_output.jsonGet response for an Active snapshot (ExpirationDate populated)
examples/list_output.jsonList response — array of snapshot records
examples/delete_output.jsonSuccessful delete response

© forcedotcom, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in skills/dx-org-snapshot-manage of forcedotcom/sf-skills.

  • SKILL.md
  • 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

Open the folder on GitHubat commit 4bbae5c

Compare with similar skills

Dx Org Snapshot Manage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dx Org Snapshot Manage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dx Org Snapshot Manage this skillforcedotcom/sf-skills1.1k—~3.3kAutomated safety check: PassApache-2.0
Services Extension Consumptionforcedotcom/salesforcedx-vscode1k—~5kAutomated safety check: PassBSD-3-Clause
Soql Lib Query Builderbeyond-the-cloud-dev/soql-lib154—~4.3kAutomated safety check: PassMIT
Sf DatacloudJaganpro/sf-skills424—~2.7kAutomated safety check: PassMIT
Soql Lib Selectorbeyond-the-cloud-dev/soql-lib154—~2kAutomated safety check: PassMIT
Core Extension APIforcedotcom/salesforcedx-vscode1k—~842Automated safety check: PassBSD-3-Clause

Similar skills

  • Services Extension Consumption

    forcedotcom/salesforcedx-vscode

    Consume the salesforcedx-vscode-services extension API. An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~5k tokensUpdated yesterday
    Sales & SupportAuto-check passed
  • Soql Lib Query Builder

    beyond-the-cloud-dev/soql-lib

    Builds Salesforce SOQL queries using the SOQL Lib fluent builder API (SOQL.cls).

    154 GitHub stars~4.3k tokensUpdated 7 days ago
    Sales & SupportAuto-check passed
  • Sf Datacloud

    Jaganpro/sf-skills

    Salesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows.

    424 GitHub stars~2.7k tokensUpdated 5 mo ago
    Sales & SupportAuto-check passed
  • Soql Lib Selector

    beyond-the-cloud-dev/soql-lib

    Creates Salesforce Apex selector classes using the SOQL Lib selector pattern.

    154 GitHub stars~2k tokensUpdated 7 days ago
    Sales & SupportAuto-check passed
  • Core Extension API

    forcedotcom/salesforcedx-vscode

    Public API exported by salesforcedx-vscode-core activate(). An agent skill from forcedotcom/salesforcedx-vscode.

    1k GitHub stars~842 tokensUpdated yesterday
    Sales & SupportAuto-check passed
  • Dev Setup

    Portwood-Global-Solutions/Portwood

    Get from a fresh clone of Portwood to a working, fully-tested Salesforce org.

    126 GitHub stars~1.1k tokensUpdated yesterday
    Sales & SupportAuto-check passed

More from forcedotcom/sf-skills

All 252 skills in this repo
  • Agentforce Architecture Analyze

    forcedotcom/sf-skills

    Declared architecture snapshot for one Agentforce agent: planner, topics, actions, flows, Apex, prompt templates, and NGA plugins.

    1.1k GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed
  • Agentforce D360 Analyze

    forcedotcom/sf-skills

    Data Cloud 360° view of a single Agentforce session. An agent skill from forcedotcom/sf-skills.

    1.1k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.3k tokensUpdated yesterday
    Auto-check: notes
  • Apply a Salesforce sandbox post-copy automation JSON config against a target org.

    1.1k GitHub stars~5.4k tokensUpdated yesterday
    Auto-check: notes
  • Design Systems Slds Apply

    forcedotcom/sf-skills

    Apply SLDS-compliant UI using the correct blueprints, styling hooks, utility classes, and icons.

    1.1k GitHub stars~3.7k tokensUpdated yesterday
    Auto-check passed
  • Experience Lwc Generate

    forcedotcom/sf-skills

    Lightning Web Components with PICKLES methodology and 165-point scoring.

    1.1k GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Dx Org Snapshot Manage

What does Dx Org Snapshot Manage do?

ALWAYS USE THIS SKILL to create, check the status of, list, or delete scratch org snapshots. Dx Org Snapshot Manage is an agent skill from forcedotcom/sf-skills. ALWAYS USE THIS SKILL to create, check the status of, list, or delete scratch org snapshots.

When should I use Dx Org Snapshot Manage?

Dx Org Snapshot Manage fits situations like: check the status of; delete scratch org snapshots; the user asks to create/take a snapshot; check a snapshots status.

How do I install Dx Org Snapshot Manage in Claude Code?

Run `npx skills add forcedotcom/sf-skills --skill dx-org-snapshot-manage -a claude-code`. Or copy the skill folder (skills/dx-org-snapshot-manage in forcedotcom/sf-skills) into .claude/skills/dx-org-snapshot-manage in your project. Claude Code loads it when a task matches its description.

How do I install Dx Org Snapshot Manage in Codex?

Run `npx skills add forcedotcom/sf-skills --skill dx-org-snapshot-manage -a codex`. Or copy the skill folder (skills/dx-org-snapshot-manage in forcedotcom/sf-skills) into .agents/skills/dx-org-snapshot-manage in your project. Codex loads it when a task matches its description.

Can I use Dx Org Snapshot Manage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add forcedotcom/sf-skills --skill dx-org-snapshot-manage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dx-org-snapshot-manage, .gemini/skills/dx-org-snapshot-manage, .github/skills/dx-org-snapshot-manage and .opencode/skills/dx-org-snapshot-manage in your project.

What does Dx Org Snapshot Manage need to run?

Going by SKILL.md and its folder, Dx Org Snapshot Manage needs the command-line tools its instructions call (sf).

Does Dx Org Snapshot Manage access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dx Org Snapshot Manage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dx Org Snapshot Manage use?

Dx Org Snapshot Manage is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dx Org Snapshot Manage use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.

What are the alternatives to Dx Org Snapshot Manage?

Skills that share tags, products or a category with Dx Org Snapshot Manage: Services Extension Consumption (forcedotcom/salesforcedx-vscode, 1k stars), Soql Lib Query Builder (beyond-the-cloud-dev/soql-lib, 154 stars), Sf Datacloud (Jaganpro/sf-skills, 424 stars) and Soql Lib Selector (beyond-the-cloud-dev/soql-lib, 154 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dx Org Snapshot Manage?

forcedotcom (a GitHub organization) maintains it in forcedotcom/sf-skills, which has 1,067 GitHub stars. The repository holds 252 skills in this directory. The repository was last updated on October 9, 2026.

Source: forcedotcom/sf-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.