Loading...
Loading...
ALWAYS USE THIS SKILL to create, list, or delete org shapes. An org shape is a captured baseline configuration (features, limits, edition, and Metadata API settings) of a source org, without its data or metadata. Use when the user asks to create/make/take an org shape, capture or replicate an org's configuration/edition/limits, list/show/view existing org shapes (including INACTIVE/superseded ones) or their IDs and status, or delete/remove org shapes for a source org. Requires a source org with Dev Hub and Org Shape for Scratch Orgs enabled. DO NOT TRIGGER for creating snapshots or scratch orgs (use dx-org-manage).
npx skill4agent add forcedotcom/sf-skills dx-org-shape-managesf org create shapesf org list shapesf org delete shapesf org ... shape[ -d force-app/main/adk-eval-output/ ] && echo 'force-app/main/adk-eval-output'statusresultwarnings<output-dir>/<filename>create-shape-result.jsonlist-shapes-result.jsonlist-shapes-inactive-result.jsondelete-shapes-result.jsonsf org create shapesf org list shapeShapeRepresentationsf org delete shapedx-org-manage--target-org--name--description--target-dev-hubsf config get target-org--json| Operation | User intent | Execute via Bash tool |
|---|---|---|
| Create | Create shape from an org | |
| Create | Create shape from the default target org | |
| List | List all org shapes + IDs/status (Active/InProgress only) | |
| List | Save the list to a file | |
| List (including inactive) | List all shapes — including | |
| Delete | Delete shapes for an org (with confirm prompt) | |
| Delete | Delete shapes without prompting (scripts/CI) | |
sf org list shape --jsonsf org list shapeInactive--target-orgsf org create shapeShapeRepresentationsf data query --target-org <alias> --query "SELECT Id, Name, Status, CreatedDate, LastModifiedDate FROM ShapeRepresentation" --jsonsf org list shapeShapeRepresentationSourceOrgIdusernamealiasIdNameStatusCreatedDateLastModifiedDateorgIdusernamealiasWHERE Status = 'Inactive'ShapeRepresentation| Constraint | Rationale |
|---|---|
Always use | 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 | Without CRUD access, create fails with |
| Create/delete operate on this org; it is not a Dev Hub operation. List takes no |
No | 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). |
| Use |
| Issue | Resolution |
|---|---|
| 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 |
| You lack access to the |
| Generic create failure — verify the source org is reachable/authenticated and retry; if it persists, contact Salesforce support |
| The source org is not fully enabled for org shape even though |
| No shapes exist yet (or none are |
| It only surfaces |
| Delete exits with code 68 (partial failure) | Some shapes failed to delete — inspect the |
| Delete exits with code 1 (all failed) | Deletion failed entirely — confirm the org is enabled for org shape and you have access |
| Source org alias doesn't exist or isn't authenticated — verify with |
No default target org and | Provide |
--jsonshapeIdsuccesserrorsorgIdusernamealiasshapeIdstatusActiveInProgresscreatedBycreatedDaterecordstotalSizedoneIdNameStatusActiveInProgressInactiveCreatedDateLastModifiedDateorgIdusernamealiasShapeRepresentationorgIdshapeIdsfailures| Need | Delegate to |
|---|---|
| Create a scratch org, or create/use a snapshot | |
| File | When to read |
|---|---|
| To understand the successful shape-creation response structure |
| To handle common create error scenarios |
| To understand the list response structure (org IDs, status) |
| To understand the SOQL query response structure for listing shapes including |
| To understand the delete response structure (deleted IDs, failures) |
| For detailed explanation of all flags across create/list/delete |