/sf-devops:dx-devops-pipeline-managefrom Salesforce — DevOps & Orgs
Manages the full lifecycle of a Salesforce DevOps Center pipeline: list, create, configure stages and environments, attach projects, and activate/deactivate using sf devops pipeline commands.
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; scripts run unread.
Manages the complete pipeline lifecycle in DevOps Center — from creation against a repository, through stage and environment configuration and project attachment, to activation of a ready-to-promote release pipeline. Provides headless CLI-driven operations for autonomous release workflows.
Gather or infer before proceeding:
sf devops pipeline list --json--repo, required). Repo flags differ by scenario:
--repo <url> — do not pass --repo-type/--create-repo--repo <name> --create-repo --repo-type github --repo-owner <org-or-user>--repo <name> --create-repo --repo-type bitbucket --bitbucket-workspace <workspace> (--bitbucket-project-key <key> optional)--description) optional in all cases--next-stage-id (the stage the new one precedes) — get stage IDs via sf devops pipeline get--org-type (Production or Sandbox)Defaults unless specified:
--json for headless consumption--target-org <alias> if not relying on the default orgIf the user gives a clear request ("create a pipeline on repo myorg/myrepo", "add a UAT stage before Production", "activate pipeline 0XB..."), proceed immediately without unnecessary questions.
All operations use sf devops pipeline and sf devops stage CLI commands with --json output for structured consumption. Pipeline IDs and stage IDs are the primary identifiers — resolve them via list and get before mutating.
Verify org authentication before any operation:
sf org display --json
sf org login web --set-default --alias <alias>sf devops pipeline list --json--target-org <alias> to every command when targeting a specific orgInspect pipelines:
sf devops pipeline list --json # all pipelines in the org
sf devops pipeline get --pipeline-id <pipeline-id> --json # one pipeline, with stages/repos/projects
list returns SObject records under .result.pipelines[] with capitalized fields (.Id, .Name, .IsActive) — it does not include stages or connected projectsget returns a single pipeline under .result with camelCase fields (.id, .name, .stages[], .connectedProjects[]); each stage has .id, .name, .nextStageId, .branchName, and .environment.{id,name}. Stages are a linked list — order is defined by nextStageId, and the terminal stage has nextStageId: null. Use get to discover stage IDs before any stage or environment operationCreate a pipeline — the pipeline must be linked to a Git repository. --name and --repo are always required; the remaining flags depend on the repo scenario:
# Existing repo (GitHub or Bitbucket) — pass the full repo URL, nothing else
sf devops pipeline create --name "<pipeline-name>" --repo <repo-url> --json
# New GitHub repo — requires --repo-owner
sf devops pipeline create --name "<pipeline-name>" --repo <repo-name> \
--create-repo --repo-type github --repo-owner <org-or-user> --json
# New Bitbucket repo — requires --bitbucket-workspace (--bitbucket-project-key optional)
sf devops pipeline create --name "<pipeline-name>" --repo <repo-name> \
--create-repo --repo-type bitbucket --bitbucket-workspace <workspace> \
--bitbucket-project-key <key> --json
# Custom stage chain (any scenario) — repeat --stage in promotion order
sf devops pipeline create --name "<pipeline-name>" --repo <repo-url> \
--stage Dev --stage QA --stage Prod --json
--repo-owner; Bitbucket new repo → --bitbucket-workspace. Omitting the provider's required flag fails the create--repo-type/--create-repo for an existing repo — supply only the repo URL via --repo-s/--stage once per stage in promotion order — e.g. --stage Dev --stage QA --stage Prod. This avoids adding/renaming stages afterward--description "<text>" optionally in any scenariosf devops pipeline list --json and check for a pipeline with the same name/repo; return the existing one if found. See references/parsing-patterns.md for the check-before-create snippetConfigure stages — a stage is added relative to an existing stage, then bound to an environment. Read references/cli-commands.md for full flag details before multi-stage work:
# Insert an empty stage BEFORE an existing stage (get the next-stage-id from `pipeline get`)
sf devops pipeline stage add --pipeline-id <id> --name "<stage-name>" --next-stage-id <stage-id> --json
# Rename a stage
sf devops pipeline stage update --pipeline-id <id> --stage-id <stage-id> --name "<new-name>" --json
# Delete a stage (predecessor auto-relinks to successor)
sf devops pipeline stage delete --pipeline-id <id> --stage-id <stage-id> --json
stage add inserts an empty stage (no branch/environment) before --next-stage-id; configure its environment separatelyBind environments to stages — attach a Salesforce org to a stage:
# Validate the org-type against the fixed enum BEFORE calling the CLI
bash scripts/validate-org-type.sh "<Production|Sandbox>" # exits non-zero on an invalid value
sf devops stage environment add --pipeline-id <id> --stage-id <stage-id> \
--environment-name "<env-name>" --org-type <Production|Sandbox> --json
# Remove an environment (pipeline must be inactive)
sf devops stage environment delete --pipeline-id <id> --environment-id <env-id> --json
--org-type must be exactly Production or Sandbox — run scripts/validate-org-type.sh <value> first and only proceed on exit 0stage environment add triggers an OAuth browser flow. In headless/CI runs pass --no-browser — the CLI prints a redirect URL for manual authenticationAttach / detach a project — a project can be attached to only one pipeline:
sf devops pipeline project add --pipeline-id <id> --project-id <project-id> --json
sf devops pipeline project delete --pipeline-id <id> --project-id <project-id> --json
sf devops project list --json (see references/parsing-patterns.md)Activate / deactivate / rename the pipeline:
# Before activating, confirm the deterministic ≥1-stage prerequisite
bash scripts/check-activation-ready.sh <id> [target-org] # exits non-zero if stage-less
sf devops pipeline update --pipeline-id <id> --activate --json # activate
sf devops pipeline update --pipeline-id <id> --deactivate --json # deactivate
sf devops pipeline update --pipeline-id <id> --name "<new-name>" --json # rename
--activate, run scripts/check-activation-ready.sh <id> and only proceed on exit 0 — it fails with an actionable message when the pipeline has no stages--activate and --deactivate are mutually exclusive; --deactivate and --name may be combined in one commandVerify operation success — use scripts/verify-operation.sh, which performs the deterministic JSON-status and post-state field checks and exits non-zero with an actionable message on mismatch:
# Assert a captured command's JSON status is 0 (pipe the CLI output in)
sf devops pipeline update --pipeline-id <id> --activate --json | bash scripts/verify-operation.sh status -
# Assert post-state after activate / stage / project ops
bash scripts/verify-operation.sh active <id> true [target-org] # isActive == true
bash scripts/verify-operation.sh has-stage <id> "<stage>" [target-org] # stage present in chain
bash scripts/verify-operation.sh has-project <id> "<project>" [target-org] # project connected
sf devops pipeline list --json by .Name and capture its .Idhas-stage / has-project modes above (they read sf devops pipeline get and check .result.stages[] / .result.connectedProjects[])active <id> true modeReport results:
get is for)nextStageId), connected projectsConfirm the items for the operation you performed. Do not report success until every applicable box holds:
sf devops command was run with --json and returned status: 0 (scripts/verify-operation.sh status -)sf devops pipeline list --json by name, and (for a new repo) the provider-specific flags were supplied (--repo-owner for GitHub, --bitbucket-workspace for Bitbucket)--org-type passed scripts/validate-org-type.sh (scripts/verify-operation.sh has-stage ...).result.connectedProjects[] (scripts/verify-operation.sh has-project ...)scripts/check-activation-ready.sh passed beforehand and .result.isActive is now true (scripts/verify-operation.sh active <id> true)| Constraint | Rationale |
|---|---|
All sf devops commands must use --json flag | Structured output is required for headless consumption; human-readable output is unreliable for parsing |
| A pipeline requires a Git repo at create time | sf devops pipeline create requires --name and --repo; for an existing repo pass only the URL, for a new repo add --create-repo and --repo-type |
| New-repo create needs provider-specific flags | GitHub requires --repo-owner; Bitbucket requires --bitbucket-workspace (--bitbucket-project-key optional). The wrong provider's flags fail the command |
| Pipeline ID required for get, update, and all stage/environment/project ops | These commands identify the pipeline only by --pipeline-id; obtain it via sf devops pipeline list |
Stage IDs come from pipeline get | stage add (--next-stage-id), stage update/delete (--stage-id), and stage environment add (--stage-id) all need stage IDs |
stage add inserts an empty stage before --next-stage-id | Stages carry no environment until one is added; build the chain by anchoring to the following stage |
--org-type must be exactly Production or Sandbox | The flag is a fixed enum; other values fail |
| Pipeline must have ≥1 stage before activation | sf devops pipeline update --activate rejects a stage-less pipeline |
| Do not modify stages after activate + promote | DevOps Center locks stage structure once changes have been promoted through an active pipeline |
| Environment delete requires an inactive pipeline | stage environment delete only succeeds while the pipeline is inactive |
| A project attaches to only one pipeline | pipeline project add fails if the project is already attached elsewhere; detach first |
| Idempotent create via check-before-create | The CLI does not dedupe; list existing pipelines and return the match instead of erroring |
Prefer --no-browser in headless runs | stage environment add opens an OAuth browser flow; --no-browser prints a redirect URL for CI |
| Issue | Resolution |
|---|---|
| No default org set | Run sf org display --json first; if it fails, instruct user to run sf org login web --set-default |
| Create fails — missing repo | --repo is required; pass an existing repo URL, or --create-repo + --repo-type for a new repo |
| New-repo create fails — missing provider flag | GitHub new repo needs --repo-owner; Bitbucket new repo needs --bitbucket-workspace. Don't mix providers' flags (--repo-owner with bitbucket, or --bitbucket-workspace with github) |
stage add fails — no next-stage-id | --next-stage-id is required; run sf devops pipeline get --pipeline-id <id> --json to find the stage IDs and pick the one the new stage should precede |
| Environment add hangs in CI | The OAuth browser flow blocks headless runs; add --no-browser and complete auth via the printed redirect URL |
| Activation rejected | The pipeline needs at least one stage; add a stage (and its environment) before --activate |
| Cannot modify stages | The pipeline is active and has promoted changes; stage structure is locked — configuration must complete before activation |
| Environment delete fails | The pipeline is active; deactivate with pipeline update --deactivate before deleting the environment |
| Project already attached | A project attaches to only one pipeline; detach from the other pipeline first via pipeline project delete |
| Pipeline / stage / project not found | The ID is invalid; run sf devops pipeline list --json, sf devops pipeline get --json, or sf devops project list --json to find valid IDs |
Deliverables vary by operation:
nextStageId), and connected projectsOutputs are derived from sf devops pipeline and sf devops stage CLI commands.
| Delegate to | When |
|---|---|
dx-devops-work-item-manage | The user wants to create or advance work items once the pipeline is active |
If a project the user wants to attach can't be found, resolve or list existing projects with sf devops project list --json (see references/parsing-patterns.md) rather than delegating — project creation is out of scope for this skill.
| File | When to read |
|---|---|
references/cli-commands.md | When you need detailed CLI flag documentation and JSON output schemas for each sf devops pipeline / sf devops stage command |
references/parsing-patterns.md | When you need jq snippets to parse the JSON (stage chains, pipeline/project ID resolution), error-handling reference, the check-before-create idempotent pattern, or auth requirements |
examples/common-workflows.md | When the user's request matches a common pattern (end-to-end pipeline setup, inserting a stage, binding an environment, attaching a project, activation) |
scripts/validate-org-type.sh | Run before stage environment add to validate --org-type against the Production/Sandbox enum |
scripts/check-activation-ready.sh | Run before pipeline update --activate to confirm the pipeline has ≥1 stage |
scripts/verify-operation.sh | Run in Phase 3 to assert a command's JSON status and post-state fields (status / active / has-stage / has-project) |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
devops-center, pipeline-management, release-pipeline, sf-cli, ci-cd
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-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./dx-devops-promoteUse this skill to drive the full DevOps Center promotion workflow for work items and pipeline stages — validate preconditions, prepare work items, optionally combine work items that share metadata, promote one or more work items or an entire stage to a target pipeline stage, and complete the promotion to finalize the deployment. TRIGGER when the user wants to promote a work item, advance changes to the next environment or stage, combine work items for a single promotion, or move metadata through the release pipeline. The mandatory validate step runs automatically at the start. DO NOT TRIGGER for work item creation or status updates (use dx-devops-work-item-manage), for conflict detection, or for polling an existing promotion's status.3 plugins in 2 repositories ship this exact skill · first indexed Aug 23, 2026
Other plugins' skills for the same job