Skip to content

forcedotcom/sf-skills / plugins/builder/dx-devops/skills/dx-devops-pipeline-manage

dx-devops-pipeline-manage

Verified

Use 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).

FileKindSize
SKILL.mdskill md19.3 KB
examples/common-workflows.mdmarkdown6.9 KB
references/cli-commands.mdmarkdown12.2 KB
references/parsing-patterns.mdmarkdown4.3 KB
scripts/check-activation-ready.shexecutablescript1.4 KB
scripts/validate-org-type.shexecutablescript541 B
scripts/verify-operation.shexecutablescript3.6 KB

scripts/verify-operation.sh

View on GitHub
#!/usr/bin/env bash
# Deterministically verify the result of a pipeline operation by checking the
# command's JSON status and the relevant post-state fields from `pipeline get`.
# Usage:
#   scripts/verify-operation.sh status <json-file-or-'-'>
#       -> assert the captured CLI JSON has .status == 0
#   scripts/verify-operation.sh active <pipeline-id> <true|false> [target-org]
#       -> assert .result.isActive matches the expected boolean
#   scripts/verify-operation.sh has-stage <pipeline-id> <stage-name> [target-org]
#       -> assert a stage with that name exists in the chain
#   scripts/verify-operation.sh has-project <pipeline-id> <project-name> [target-org]
#       -> assert a connected project with that name exists
# Exits 0 when the assertion holds; prints an actionable error and exits 1 otherwise.

set -euo pipefail

MODE="${1:?Usage: verify-operation.sh <status|active|has-stage|has-project> ...}"

# Read a pipeline once and hand back validated JSON on stdout. Distinguishes a
# failed CLI read / non-zero JSON status from a successful read (whose fields the
# caller then evaluates), so post-state checks never mistake a read failure for a
# "not found" result. Exits 2 with an actionable message on any read/JSON error.
GET_JSON=""
read_pipeline() {
  local pid="$1" org="$2"
  local flag=() err rc
  [ -n "$org" ] && flag=(--target-org "$org")
  # Capture stdout and stderr separately; do not let pipefail abort silently.
  err=$(mktemp)
  rc=0
  GET_JSON=$(sf devops pipeline get --pipeline-id "$pid" "${flag[@]+"${flag[@]}"}" --json 2>"$err") || rc=$?
  if [ "$rc" -ne 0 ]; then
    echo "ERROR: could not read pipeline '$pid' (sf exited $rc): $(tr '\n' ' ' <"$err")" >&2
    rm -f "$err"; exit 2
  fi
  rm -f "$err"
  local st
  st=$(echo "$GET_JSON" | jq -r '.status // 1' 2>/dev/null || echo 1)
  if [ "$st" != "0" ]; then
    local msg
    msg=$(echo "$GET_JSON" | jq -r '.message // "unknown error"' 2>/dev/null || echo "unparseable response")
    echo "ERROR: 'pipeline get' for '$pid' returned status $st — $msg" >&2
    exit 2
  fi
}

case "$MODE" in
  status)
    SRC="${2:?status mode needs a JSON file path or '-' for stdin}"
    JSON=$([ "$SRC" = "-" ] && cat || cat "$SRC")
    ST=$(echo "$JSON" | jq -r '.status // 1')
    if [ "$ST" = "0" ]; then echo "OK: command status 0"; exit 0; fi
    MSG=$(echo "$JSON" | jq -r '.message // "unknown error"')
    echo "ERROR: command returned status $ST — $MSG" >&2; exit 1
    ;;
  active)
    PID="${2:?}"; WANT="${3:?expected true|false}"; ORG="${4:-}"
    read_pipeline "$PID" "$ORG"   # exits 2 on read/JSON error before we evaluate fields
    GOT=$(echo "$GET_JSON" | jq -r '.result.isActive')
    if [ "$GOT" = "$WANT" ]; then echo "OK: isActive == $WANT"; exit 0; fi
    echo "ERROR: expected isActive=$WANT but pipeline '$PID' reports isActive=$GOT" >&2; exit 1
    ;;
  has-stage)
    PID="${2:?}"; NAME="${3:?stage name}"; ORG="${4:-}"
    read_pipeline "$PID" "$ORG"
    if echo "$GET_JSON" | jq -e --arg n "$NAME" '.result.stages[]? | select(.name == $n)' >/dev/null; then
      echo "OK: stage '$NAME' present"; exit 0
    fi
    echo "ERROR: stage '$NAME' not found in pipeline '$PID'" >&2; exit 1
    ;;
  has-project)
    PID="${2:?}"; NAME="${3:?project name}"; ORG="${4:-}"
    read_pipeline "$PID" "$ORG"
    if echo "$GET_JSON" | jq -e --arg n "$NAME" '.result.connectedProjects[]? | select(.name == $n)' >/dev/null; then
      echo "OK: project '$NAME' connected"; exit 0
    fi
    echo "ERROR: project '$NAME' not connected to pipeline '$PID'" >&2; exit 1
    ;;
  *)
    echo "ERROR: unknown mode '$MODE' (expected status|active|has-stage|has-project)" >&2; exit 1
    ;;
esac
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall