/sf-devops:dx-org-shape-managefrom Salesforce — DevOps & Orgs
Creates, lists, and deletes Salesforce org shapes (baseline configuration captures) via sf CLI commands. Use when capturing or replicating an org's edition, features, limits, and Metadata API settings without data or metadata.
Ships in Salesforce — DevOps & Orgs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Coordinates the full lifecycle of Salesforce org shapes — create, list, and delete — via sf org create shape, sf org list shape, and sf org delete shape. An org shape captures the baseline setup of a source org (features, limits, edition, and Metadata API settings) without its data or metadata.
Use ONLY the Bash tool to execute the sf org ... shape 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 (e.g. "write all generated files into folder X"), 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 (including the status/result/warnings wrapper) to <output-dir>/<filename> using these filenames: create-shape-result.json for shape creation, list-shapes-result.json for listing shapes, list-shapes-inactive-result.json for the inactive-shapes SOQL query, or delete-shapes-result.json for shape deletion. This is the generated output — write it without asking. Do NOT say "no files to generate" for these operations; the JSON result IS the output artifact.
sf org create shape), listing (sf org list shape), listing including inactive shapes for a specific source org (SOQL against ShapeRepresentation), and deleting (sf org delete shape) org shapesdx-org-snapshot-manage), creating scratch orgs (use dx-org-manage)Infer from the user's request:
--target-org. Plain listing (Active/InProgress only) needs no source org.Notes:
--name or --description flag — a shape is identified by the source org's ID, not a custom name.--target-dev-hub flag — the shape commands operate on the source org directly, not a Dev Hub.sf config get target-org.--json flag.| Operation | User intent | Execute via Bash tool |
|---|---|---|
| Create | Create shape from an org | sf org create shape --target-org <alias> --json |
| Create | Create shape from the default target org | sf org create shape --json |
| List | List all org shapes + IDs/status (Active/InProgress only) | sf org list shape --json |
| List | Save the list to a file | sf org list shape --json > tmp/MyOrgShapeList.json |
| List (including inactive) | List all shapes — including Inactive ones — for a specific source org | sf data query --target-org <alias> --query "SELECT Id, Name, Status, CreatedDate, LastModifiedDate FROM ShapeRepresentation" --json |
| Delete | Delete shapes for an org (with confirm prompt) | sf org delete shape --target-org <alias> --json |
| Delete | Delete shapes without prompting (scripts/CI) | sf org delete shape --target-org <alias> --no-prompt --json |
After creating a shape, run sf org list shape --json to get its org ID.
sf org list shape has no flag to surface Inactive shapes and no --target-org flag (it always scans every locally authenticated org). To see a source org's full shape history — including shapes superseded by a later sf org create shape run — query ShapeRepresentation directly:
sf data query --target-org <alias> --query "SELECT Id, Name, Status, CreatedDate, LastModifiedDate FROM ShapeRepresentation" --json
Only use this query when the user explicitly asks for inactive or all/historical shapes for a named source org. For ordinary "list my org shapes" requests, keep using sf org list shape — it is the documented, cross-org command and matches the rest of this skill's behavior.
Notes:
ShapeRepresentation has no SourceOrgId, username, or alias field — report the raw query fields (Id, Name, Status, CreatedDate, LastModifiedDate) as returned; do not invent an orgId/username/alias for these rows.WHERE Status = 'Inactive' to scope to only inactive shapes if the user asks for inactive shapes specifically (as opposed to "all"/"history").ShapeRepresentation CRUD access as create/delete.| Constraint | Rationale |
|---|---|
Always use --json flag | Provides structured output for reliable parsing and error handling |
| Source org must have Org Shape for Scratch Orgs enabled | Without it, create/delete fail with a no-access error — enable via Setup → Scratch Orgs → Enable Org Shape for Scratch Orgs in the source org |
User needs access to the ShapeRepresentation object | Without CRUD access, create fails with NoCrudAccessCreateShape — ask the org admin |
--target-org is the SOURCE org, not a Dev Hub | Create/delete operate on this org; it is not a Dev Hub operation. List takes no --target-org |
No --name / --description flags | A shape is keyed off the source org's ID, not a custom name |
| One active shape per source org | Re-running create replaces the prior shape (marks it inactive). delete removes all shapes for the org |
delete prompts for confirmation by default | Use --no-prompt (-p) for non-interactive/CI use; declining the prompt aborts with no deletion |
| Issue | Resolution |
|---|---|
ShapeRepresentationNoAccess — "The org needs to be enabled for org shape before one can be created" | Source org isn't enabled for org shape — in the source org go to Setup → Scratch Orgs → Enable Org Shape for Scratch Orgs, turn it on, then retry |
NoCrudAccessCreateShape — "Can't create org shape. Contact the org admin..." | You lack access to the ShapeRepresentation object — ask the org admin to grant access, then retry |
ShapeCreateFailed — "Error creating scratch definition file..." | Generic create failure — verify the source org is reachable/authenticated and retry; if it persists, contact Salesforce support |
UNKNOWN_EXCEPTION on create (generic error with a support ErrorId, reproducible on retry) | The source org is not fully enabled for org shape even though ShapeRepresentation may be partially visible — confirm Setup → Scratch Orgs → Enable Org Shape for Scratch Orgs is on in the source org and that your user has CRUD on ShapeRepresentation, then retry |
sf org list shape returns an empty list | No shapes exist yet (or none are Active/InProgress) — create one with sf org create shape |
sf org list shape doesn't show a shape the user expects | It only surfaces Active/InProgress shapes and has no flag to change this — a prior sf org create shape run may have marked it Inactive. Use the SOQL query in "Listing Inactive Shapes" against that specific source org instead |
| Delete exits with code 68 (partial failure) | Some shapes failed to delete — inspect the failures array in the JSON for per-shape messages, then retry |
| Delete exits with code 1 (all failed) | Deletion failed entirely — confirm the org is enabled for org shape and you have access |
No org found for <alias> / NamedOrgNotFoundError | Source org alias doesn't exist or isn't authenticated — verify with sf org list or re-auth with sf org login web |
No default target org and --target-org omitted | Provide --target-org <alias> or set a default with sf config set target-org=<alias> |
All commands return JSON when --json is used:
shapeId, success, and errors.orgId, username, alias, shapeId, status (Active or InProgress), createdBy, and createdDate.records, totalSize, done), each record with Id, Name, Status (Active, InProgress, or Inactive), CreatedDate, and LastModifiedDate — no orgId/username/alias, since ShapeRepresentation has no such fields.orgId, shapeIds (deleted), and failures. Returns no result if the user declines the confirmation prompt.See the example files referenced below for full response structures.
| Need | Delegate to |
|---|---|
| Create a scratch org, or create/use a snapshot to make one | dx-org-manage skill |
| Create, check status of, list, or delete a snapshot itself | dx-org-snapshot-manage skill |
| File | When to read |
|---|---|
examples/create_success_output.json | To understand the successful shape-creation response structure |
examples/create_error_output.json | To handle common create error scenarios |
examples/list_output.json | To understand the list response structure (org IDs, status) |
examples/list_inactive_output.json | To understand the SOQL query response structure for listing shapes including Inactive ones |
examples/delete_output.json | To understand the delete response structure (deleted IDs, failures) |
references/cli_flags.md | For detailed explanation of all flags across create/list/delete |
examples/create_error_output.json (opens in a new tab)examples/create_success_output.json (opens in a new tab)examples/delete_output.json (opens in a new tab)examples/list_inactive_output.json (opens in a new tab)examples/list_output.json (opens in a new tab)references/cli_flags.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub reej-consulting/reej-sf-skills --plugin sf-devops27 skills in this plugin
/automation-sandbox-post-copy-config-generateGenerates the JSON config file that the Salesforce sandbox post-copy automation tool consumes, from a customer SOP in any format (PDF, xlsx, csv, JSON, docx, Markdown, plain text, or a screenshot of an endpoint table). Use when the user asks to create, build, generate, produce, or convert a post-copy or post-refresh automation config — turning a sandbox-refresh SOP into a JSON array of OutboundMessages (OBM), RemoteSiteSettings, ScheduledApex, and Flows entries with ConfigurationName, Label, Fields, IsActive, and ExecutionOrder. Also trigger for phrasings like "post-copy config", "post-refresh automation JSON", "update the outbound message (OBM) endpoints after refresh", "convert this SOP to config", "remote site settings JSON", "refresh planner to JSON", or "sandbox refresh config". DO NOT TRIGGER when: user wants to deploy the generated config to an org (use platform-metadata-deploy), or apply/execute/run/dry-run the post-copy automation JSON against a sandbox (use automation-sandbox-post-copy-configure)./automation-sandbox-post-copy-configureApply a Salesforce sandbox post-copy automation JSON config against a target org. Use when the user asks to apply, run, execute, dry-run, or preview a post-copy or post-refresh config file (e.g. `post-copy-config.json`) against a sandbox — including activating/deactivating a Flow (PATCH `FlowDefinition.Metadata.activeVersionNumber` to the version, or `null`), re-pointing an OBM endpoint, updating a RemoteSiteSetting URL, or re-scheduling a ScheduledApex job after refresh. Also trigger for phrasings like "apply post-copy config", "run post-copy automation", "activate Flow <name> post-refresh", "deactivate Flow <name>", "re-point outbound messages after refresh", or "configure sandbox after refresh". Per entry, derive the Tooling API sobject, verify via describe, resolve the Id via SOQL, then PATCH the compound `Metadata` field (`ScheduledApex` uses anonymous Apex). DO NOT TRIGGER for generating config JSON from an SOP (use `automation-sandbox-post-copy-config-generate`) or for deploying metadata XML./dx-app-analytics-queryISV App Analytics metadata types — AppAnalyticsQueryRequest and AppAnalyticsSettings. Use this skill when the user asks about retrieving managed package usage data, configuring App Analytics simulation mode, querying subscriber snapshots, or understanding the AppAnalyticsQueryRequest lifecycle (New → Pending → Complete → Expired). TRIGGER when: user mentions App Analytics, AppAnalyticsQueryRequest, AppAnalyticsSettings, package usage data, subscriber analytics, ISV analytics, or simulation mode for app analytics. DO NOT TRIGGER when: the task is about standard Salesforce reports/dashboards (use reporting skills), custom SOQL on Account/Contact (use querying-soql), or Data Cloud query/search (use retrieving-datacloud)./dx-devops-conflict-resolveUse this skill to diagnose and resolve what blocks a DevOps Center promotion of a work item's feature branch: Git merge conflicts and deployment failures. DevOps Center is Git-backed, so overlapping metadata changes surface as merge conflicts against the target stage branch, resolved with git (detect, resolve markers, commit, push). Deploy failures often cite a missing dependency a full promotion can fix when the component already exists on the branch. TRIGGER when the user wants to check a work item for conflicts before promoting, resolve merge conflicts or leftover conflict markers in metadata files (.xml, .object-meta.xml, .cls), reconcile a feature branch with its target stage branch, or diagnose why a DevOps Center promotion or deployment failed and whether a full promotion or a missing-dependency fix will resolve it. DO NOT TRIGGER for running the promotion itself (use dx-devops-promote), creating or updating work items (use dx-devops-work-item-manage), or deploying metadata directly to an org./dx-devops-pipeline-manageUse this skill to manage the full lifecycle of a DevOps Center pipeline — list all pipelines, get a single pipeline's details, create a new pipeline linked to a Git repository, add or remove stages, rename a stage, add or remove Salesforce environments on stages, attach or detach projects, and activate or deactivate the pipeline. Invoke when the user wants to set up a release pipeline, wire promotion stages across integration, UAT, staging, and production orgs, connect environments to stages, attach a project, or activate a continuous delivery pipeline. Uses sf devops pipeline and sf devops stage commands with --json output. DO NOT TRIGGER for work-item lifecycle, promotion or deployment execution, conflict detection, or standalone project creation (separate skills)./dx-devops-project-manageUse to list, view, or manage DevOps Center projects in a Salesforce org — show all projects, create a project, or update an existing project's name, description, or active status. Invoke to run sf devops project list on any listing request, or to create a project, set up a new pipeline foundation, initialize DevOps Center for a feature, update project settings, or activate/deactivate (archive) a project. Consolidates sf devops project list/create/update. DO NOT TRIGGER for work item, pipeline, promotion, or conflict operations — those are separate skills.3 plugins ship this exact skill · first indexed Oct 9, 2026
Other plugins' skills for the same job