Dx Org Shape Manage

作者 forcedotcome5164d94d751無授權條款1K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫昨天更新

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/checking/listing/deleting snapshots (use dx-org-snapshot-manage) or for creating scratch orgs (use dx-org-manage).

僅含說明DevOps & Cloud
AI 產生的概覽

管理 Salesforce 組織形狀:建立、列出和刪除來源組織擷取的基準設定。

功能
使用 sf CLI 協調 Salesforce 組織形狀的生命週期:從來源組織建立形狀、列出既有形狀及其 ID 和狀態、透過 SOQL 查詢列出非作用中或歷史形狀,以及刪除形狀。它會擷取來源組織的基準設定(功能、限制、版本、Metadata API 設定),不包含資料或中繼資料。命令使用 --json 旗標執行,當有輸出目錄時,完整的 JSON 回應會寫入指定的輸出檔案。
適用情境
當使用者要求建立、擷取、列出、檢視或刪除 Salesforce 組織形狀(包括非作用中或已被取代的形狀),或複製組織的設定、版本或限制時使用。不適用於快照或建立臨時組織,這些由其他技能處理。
執行需求
需要 sf CLI(2.0.0 或更新版本)以及一個已驗證的來源組織,該組織需啟用 Org Shape for Scratch Orgs 並具有 ShapeRepresentation 物件的存取權。僅為說明文件,不附帶指令碼。

dx-org-shape-manage

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.


Tool Restrictions

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.


Scope

  • In scope: Creating (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 shapes
  • Out of scope: Creating/checking/listing/deleting snapshots (use dx-org-snapshot-manage), creating scratch orgs (use dx-org-manage)

Required Inputs

Infer from the user's request:

  • Operation: create, list, list-including-inactive, or delete (see Workflow step 1)
  • Source org (create, delete, & list-including-inactive): Username or alias of the org to shape / whose shapes to delete or query. Passed via --target-org. Plain listing (Active/InProgress only) needs no source org.

Notes:

  • There is no --name or --description flag — a shape is identified by the source org's ID, not a custom name.
  • There is no --target-dev-hub flag — the shape commands operate on the source org directly, not a Dev Hub.

Workflow

  1. Identify the operation and match it to the command pattern below.
  2. For create/delete, confirm the source org — identify the username/alias. If not provided, check the default with sf config get target-org.
  3. Execute via Bash tool with the --json flag.
  4. Report the result (see Output Expectations and the example files).

Command Patterns

OperationUser intentExecute via Bash tool
CreateCreate shape from an orgsf org create shape --target-org <alias> --json
CreateCreate shape from the default target orgsf org create shape --json
ListList all org shapes + IDs/status (Active/InProgress only)sf org list shape --json
ListSave the list to a filesf org list shape --json > tmp/MyOrgShapeList.json
List (including inactive)List all shapes — including Inactive ones — for a specific source orgsf data query --target-org <alias> --query "SELECT Id, Name, Status, CreatedDate, LastModifiedDate FROM ShapeRepresentation" --json
DeleteDelete shapes for an org (with confirm prompt)sf org delete shape --target-org <alias> --json
DeleteDelete 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.

Listing Inactive Shapes

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:

bash
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.
  • Add WHERE Status = 'Inactive' to scope to only inactive shapes if the user asks for inactive shapes specifically (as opposed to "all"/"history").
  • Requires the same ShapeRepresentation CRUD access as create/delete.

Rules / Constraints

ConstraintRationale
Always use --json flagProvides structured output for reliable parsing and error handling
Source org must have Org Shape for Scratch Orgs enabledWithout 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 objectWithout CRUD access, create fails with NoCrudAccessCreateShape — ask the org admin
--target-org is the SOURCE org, not a Dev HubCreate/delete operate on this org; it is not a Dev Hub operation. List takes no --target-org
No --name / --description flagsA shape is keyed off the source org's ID, not a custom name
One active shape per source orgRe-running create replaces the prior shape (marks it inactive). delete removes all shapes for the org
delete prompts for confirmation by defaultUse --no-prompt (-p) for non-interactive/CI use; declining the prompt aborts with no deletion

Troubleshooting

IssueResolution
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 listNo 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 expectsIt 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> / NamedOrgNotFoundErrorSource 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 omittedProvide --target-org <alias> or set a default with sf config set target-org=<alias>

Output Expectations

All commands return JSON when --json is used:

  • Create → shapeId, success, and errors.
  • List → an array of shapes, each with orgId, username, alias, shapeId, status (Active or InProgress), createdBy, and createdDate.
  • List (including inactive) → a SOQL query result (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.
  • Delete → 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.


Cross-Skill Integration

NeedDelegate to
Create a scratch org, or create/use a snapshot to make onedx-org-manage skill
Create, check status of, list, or delete a snapshot itselfdx-org-snapshot-manage skill

Reference File Index

FileWhen to read
examples/create_success_output.jsonTo understand the successful shape-creation response structure
examples/create_error_output.jsonTo handle common create error scenarios
examples/list_output.jsonTo understand the list response structure (org IDs, status)
examples/list_inactive_output.jsonTo understand the SOQL query response structure for listing shapes including Inactive ones
examples/delete_output.jsonTo understand the delete response structure (deleted IDs, failures)
references/cli_flags.mdFor detailed explanation of all flags across create/list/delete

來源與署名

來源:forcedotcom/sf-skills位於skills/dx-org-shape-manage提交e5164d9

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 forcedotcom/sf-skills 的技能

Service Itsm Teams Itservice Configure

forcedotcom

Configure the "Set Up Salesforce IT Service" checklist for Microsoft Teams Employee Service (ITSM) — the employee side, covering app enablement, marketplace install guidance, user access assignment, and Digital Experience Site selection. Use this for: 'turn on Salesforce IT Service', 'set up IT Service on Teams', 'assign Teams for Employee permission set', 'give employees access to Teams for Employee Service', 'manage user access for Teams ITSM', 'grant users the permission sets needed for Teams Employee Service', 'select a digital experience site for Teams', 'install Salesforce IT Service app on Teams', or any request to complete the IT Service half of the Teams ITSM Go page checklist (including the Manage User Access step). DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Desk/fulfiller half of the checklist (service-itsm-teams-itdesk-configure).

待分類1K昨天更新

Service Itsm Teams Coordinate

forcedotcom

End-to-end autopilot orchestrator for setting up Microsoft Teams integration in Salesforce Service Cloud ITSM — runs the whole flow (enable the Teams for Employee Service Go feature, register the Microsoft Entra app, populate Named Credentials, configure the IT Desk and IT Service checklists, turn on Swarming, and optionally embed the Agentforce agent) in one continuous pass, stopping only at the points a human must act. Use when the user asks to set up Microsoft Teams for ITSM end to end, 'set up teams for it service', 'do the whole teams itsm setup', 'configure microsoft teams for employee service', or wants a guided Teams ITSM walkthrough. Delegates each stage to a specialized child skill while driving the sequence itself. DO NOT TRIGGER when the user asks to enable Teams alone, configure just the IT Desk or IT Service checklist alone, or enable Swarming alone — delegate directly to the specific child skill in those cases.

待分類1K昨天更新

Service Itsm Teams Itdesk Configure

forcedotcom

Configure the "Set Up Salesforce IT Desk" checklist for Microsoft Teams Employee Service (ITSM) — the fulfiller/agent side, covering app enablement, marketplace install guidance, user access assignment, and Swarming collaboration-tool setup. Use this for: 'turn on Salesforce IT Desk', 'set up IT Desk on Teams', 'assign Teams for IT Desk permission set', 'set Teams as collaboration tool for swarming', 'install Salesforce IT Desk app on Teams', or any request to complete the IT Desk half of the Teams ITSM Go page checklist. DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Service/employee half of the checklist (service-itsm-teams-itservice-configure).

待分類1K昨天更新

Service Itsm Teams Debug

forcedotcom

透過對 Salesforce 組織執行通過/失敗設定檢查清單,診斷 Microsoft Teams 員工服務(ITSM)設定失敗問題。

DevOps & Cloud1K昨天更新

Service Itsm Teams Employee Agent Configure

forcedotcom

Configure the embedded Agentforce Employee Agent so it replies inside the Microsoft Teams ITSM custom client ('Salesforce Employee Assist' / 'Ask AI Agent'). Use this for: 'set up employee agent in Teams', 'embed Agentforce agent in Teams', 'make the IT Service Employee Agent reply in Teams', 'Teams Ask AI Agent not responding', 'agent joins then leaves without replying', 'configure MIAW deployment for Teams employee agent', 'Teams embedded messaging agent setup'. Builds the whole stack headlessly (zero Setup-UI clicks): the Web messaging channel with User Verification ON, the Enhanced Chat User Verification Key Set (JWKS_URL) it requires, the Teams_AgentForce custom-client deployment, the routing flow to the agent, and the Agent Access permission set that lets the portal user reach the agent. DO NOT TRIGGER for enabling the Teams feature Salesforce Go page toggle (service-itsm-teams-configure) or for configuring notification preferences.

待分類1K昨天更新

Service Itsm Swarming Configure

forcedotcom

透過 Connect API 呼叫啟用 Salesforce Swarming ITSM 功能,並將協作工具設為 Teams。

DevOps & Cloud1K昨天更新