forcedotcom/sf-skills

dx-org-shape-manage

ALWAYS USE THIS SKILL to create, list, or delete org shapes.

Zobacz źródło
Oryginalny dokument Skill

Treść z repozytorium z zachowaniem nagłówków, przykładów, kodu, tabel, linków i obrazów.

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 snapshots, 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:

  • CreateshapeId, 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.
  • DeleteorgId, 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 snapshotdx-org-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
z tego samego repozytorium

Więcej Skills

Wszystkie Skills
forcedotcom
Społeczność

agentforce-d360-analyze

Data Cloud 360° view of a single Agentforce session. TRIGGER when user asks to trace, inspect, summarize, or describe a specific Agentforce session by session id (Agent Session UUID 019d… or MessagingSession id 0Mw…). Also triggers on session discovery — find/list/search sessions by time, agent, channel, outcome, or conversation text — when the user has no session id yet. DO NOT TRIGGER for design-time architecture questions (use agentforce-architecture-analyze instead) or for runtime perf/latency/SLO questions that require platform telemetry beyond Data Cloud.

instalacje
1
GitHub Stars
972
Aktualizacja
7 wrz
forcedotcom
Społeczność

agentforce-generate

Build, modify, audit, repair, optimize, debug, and deploy agents with Agentforce Agent Script. TRIGGER when: user creates, reviews, or changes .agent files or aiAuthoringBundle metadata; asks to fix AgentScript, audit an existing agent, run an AgentScript health check, common-pitfall review, or baseline-versus-candidate repair loop; changes a response, action, subagent, route, state flow, or Agent Spec; previews, debugs, deploys, publishes, or tests agents; uses sf agent generate/preview/publish/test; or manages Agentforce MCP servers, tools, assets, or authentication. DO NOT TRIGGER when: Apex, Flow, Prompt Template, Experience Cloud, or general Salesforce CLI work is unrelated to Agent Script; or the primary input is a production session or trace ID rather than an agent artifact.

instalacje
1
GitHub Stars
972
Aktualizacja
7 wrz
forcedotcom
Społeczność

platform-quick-deploy

Deploy validated metadata to a Production Salesforce org without re-running tests. TRIGGER when the user wants to deploy to production, says 'quick deploy', 'promote', 'ship to prod', or has just validated and wants to push the change live. REQUIRES a recent sf project deploy validate job ID (≤10 days old, ≤3 days for --use-most-recent). DO NOT TRIGGER for sandbox/scratch deploys (use platform-metadata-deploy) or unvalidated deploys (use platform-deploy-validate first).

instalacje
1
GitHub Stars
972
Aktualizacja
7 wrz
forcedotcom
Społeczność

agentforce-test

Write, run, and analyze structured test suites for Agentforce agents — functional AND security. TRIGGER when: user writes or modifies test spec YAML (AiEvaluationDefinition); runs sf agent test create, run, run-eval, or results commands; asks about test coverage strategy, metric selection, or custom evaluations; interprets test results or diagnoses test failures; asks about batch testing, regression suites, or CI/CD test integration; requests security testing, OWASP LLM Top 10, red-teaming, penetration testing, prompt-injection tests, a security grade, or a vulnerability assessment of an agent. DO NOT TRIGGER when: user creates, modifies, previews, or debugs .agent files (use agentforce-generate); deploys or publishes agents; writes Agent Script code; uses sf agent preview for development iteration; analyzes production session traces (use agentforce-observe); performs a static safety review of .agent file content (use agentforce-generate Section 15).

instalacje
3
GitHub Stars
972
Aktualizacja
7 wrz