forcedotcom/sf-skills / plugins/builder/dx-devops/skills/dx-devops-project-manage
dx-devops-project-manage
VerifiedUse 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 12.9 KB |
| examples/common-workflows.md | markdown | 5.6 KB |
| references/cli-commands.md | markdown | 7.2 KB |
| scripts/create-project.shexecutable | script | 2.1 KB |
| scripts/list-projects.shexecutable | script | 1.9 KB |
| scripts/update-project.shexecutable | script | 3.9 KB |
scripts/update-project.sh
View on GitHub#!/usr/bin/env bash
# Deterministically update a DevOps Center project's name, description, and/or
# active status. Accepts a project ID or a project name (resolved via the list).
# At least one of --name / --description / --is-active|--no-is-active is required.
# Usage:
# scripts/update-project.sh --project (<id>|name:<name>) \
# [--name <new-name>] [--description <new-desc>] \
# [--is-active|--no-is-active] [--target-org <alias>]
# Prints "UPDATED <id>" on success; exits 2 on CLI error, 3 if the name cannot
# be resolved, 1 on usage error.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT="" NEW_NAME="" NEW_DESC="" ACTIVE="" ORG=""
have_name=0 have_desc=0
while [ $# -gt 0 ]; do
case "$1" in
--project) PROJECT="${2:?}"; shift 2 ;;
--name) NEW_NAME="${2:?}"; have_name=1; shift 2 ;;
--description) NEW_DESC="${2:?}"; have_desc=1; shift 2 ;;
--is-active) ACTIVE="true"; shift ;;
--no-is-active) ACTIVE="false"; shift ;;
--target-org) ORG="${2:?}"; shift 2 ;;
*) echo "ERROR: unknown arg '$1'" >&2; exit 1 ;;
esac
done
[ -n "$PROJECT" ] || { echo "ERROR: --project (<id>|name:<name>) is required" >&2; exit 1; }
if [ "$have_name" -eq 0 ] && [ "$have_desc" -eq 0 ] && [ -z "$ACTIVE" ]; then
echo "ERROR: at least one of --name, --description, or --is-active/--no-is-active is required" >&2; exit 1
fi
# Resolve name:<name> to an ID; otherwise treat as a literal ID. list-projects.sh
# --resolve exits 3 (no such project) or 2 (auth / CLI / JSON failure); propagate
# the real code so a failed read is never masked as a clean "not found".
case "$PROJECT" in
name:*)
rrc=0
PID=$("$HERE/list-projects.sh" --resolve "${PROJECT#name:}" "$ORG") || rrc=$?
[ "$rrc" -eq 0 ] || exit "$rrc"
;;
*) PID="$PROJECT" ;;
esac
flag=(); [ -n "$ORG" ] && flag=(--target-org "$ORG")
args=(--project-id "$PID")
[ "$have_name" -eq 1 ] && args+=(--name "$NEW_NAME")
[ "$have_desc" -eq 1 ] && args+=(--description "$NEW_DESC")
[ "$ACTIVE" = "true" ] && args+=(--is-active)
[ "$ACTIVE" = "false" ] && args+=(--no-is-active)
err=$(mktemp); rc=0
sf devops project update "${args[@]}" "${flag[@]+"${flag[@]}"}" --json >/dev/null 2>"$err" || rc=$?
if [ "$rc" -ne 0 ]; then
echo "ERROR: project update failed (sf exited $rc): $(tr '\n' ' ' <"$err")" >&2
rm -f "$err"; exit 2
fi
rm -f "$err"
# Verify persistence: re-read the project from the authoritative
# .result.projects[] list envelope and assert each requested field took effect.
# Never trust the update command's own exit code / output shape alone.
verr=$(mktemp); vrc=0
LIST=$(sf devops project list "${flag[@]+"${flag[@]}"}" --json 2>"$verr") || vrc=$?
if [ "$vrc" -ne 0 ]; then
echo "ERROR: update succeeded but the verification re-read failed (sf exited $vrc): $(tr '\n' ' ' <"$verr")" >&2
rm -f "$verr"; exit 2
fi
rm -f "$verr"
REC=$(echo "$LIST" | jq -c --arg id "$PID" '.result.projects[]? | select(.Id == $id)')
if [ -z "$REC" ]; then
echo "ERROR: update reported success but project '$PID' is not in the project list" >&2; exit 2
fi
if [ "$have_name" -eq 1 ]; then
GOT=$(echo "$REC" | jq -r '.Name')
[ "$GOT" = "$NEW_NAME" ] || { echo "ERROR: name not persisted (expected '$NEW_NAME', got '$GOT')" >&2; exit 2; }
fi
if [ "$have_desc" -eq 1 ]; then
GOT=$(echo "$REC" | jq -r '.Description // ""')
[ "$GOT" = "$NEW_DESC" ] || { echo "ERROR: description not persisted (expected '$NEW_DESC', got '$GOT')" >&2; exit 2; }
fi
if [ -n "$ACTIVE" ]; then
# The list envelope exposes IsActive only on some API versions. Assert it when
# present; when absent (null), the field is not verifiable from the list, so we
# fall back to the update command's success (already confirmed above) for it.
GOT=$(echo "$REC" | jq -r '.IsActive // "absent"')
if [ "$GOT" != "absent" ] && [ "$GOT" != "$ACTIVE" ]; then
echo "ERROR: active status not persisted (expected '$ACTIVE', got '$GOT')" >&2; exit 2
fi
fi
echo "UPDATED $PID"; exit 0
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 119k | Updated | Claude CodeCodex | Verified | Install |
| 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: 118k | Updated | Claude CodeCodex | Verified | Install |