Dx devops project manage

From forcedotcom/sf-skills · View interactive version

Dx devops project manage is an AI agent skill from the GitHub repository forcedotcom/sf-skills. Use 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, i

How to use this skill

Skill file

DevOps Center Project Management

Manages the complete DevOps Center project lifecycle — from listing existing projects through creation to updating project settings. Provides headless CLI-driven operations for autonomous release workflows.

Scope


Required Inputs

Gather or infer before proceeding:

Defaults unless specified:

If the user provides a clear request ("list all projects", "create a project called Release Alpha", "rename project X to Y"), proceed immediately without unnecessary questions.


Workflow

All operations use sf devops project CLI commands with --json output for structured consumption.

Phase 1 — Identify Operation

  1. Determine the operation type from user intent:

Phase 2 — Execute Operation

  1. Verify org authentication before any operation, checking the same org the operation will target:

```bash

# When a specific org is requested, check that alias (do NOT rely on the default org):

sf org display --target-org <alias> --json

# Only when no alias is supplied and a default org is expected:

sf org display --json

```

```bash

sf org login web --alias <alias>

```

> Deterministic project-list parsing, empty-list handling, name→ID resolution, idempotent create, and update are handled by the scripts in scripts/ — each script exits non-zero with an actionable message on failure. Pass the org alias as the trailing/--target-org argument when the target-org config var is not set; omit it to use the default org. The scripts read the authoritative .result.projects[] list envelope.

  1. List projects — when the user wants to see existing projects or resolve a project name to an ID:
  1. Create a project — when the user wants to create a new project:
  1. Update a project — when the user wants to change name, description, or active status:

Phase 3 — Report

  1. Report results (the scripts already verified success deterministically; report their output to the user):

Rules / Constraints

| Constraint | Rationale |

|-----------|-----------|

| Always use the sf devops project CLI | List/create/update MUST go through sf devops project (via the scripts/), never a salesforce_dx MCP tool or metadata query — those bypass this skill and fail the operation |

| All sf devops commands must use --json flag | Structured output is required for headless consumption; human-readable output is unreliable for parsing |

| --target-org required unless config var set | Every sf devops project command requires --target-org <alias> unless the target-org config var is already set |

| Project ID required for update | Use --project-id (-i); resolve from a name via sf devops project list --target-org <alias> --json when the user gives a name |

| --name required for create | A project cannot be created without a name |

| At least one update field required | Update command fails if none of --name, --description, or --is-active is provided |

| Use --is-active / --no-is-active for activation | Activate with --is-active, deactivate with --no-is-active; do not pass a value |

| Idempotent create operations | Check for an existing project with the same name before creating a duplicate |

| Never use interactive prompts | Skills run in headless environments; all inputs must be via CLI flags |

| A project is a prerequisite for work items and pipelines | Downstream skills (work-item-manage, pipeline-manage) need the project ID this skill returns |


Gotchas

| Issue | Resolution |

|-------|------------|

| No default org set | Run sf org display --json first; if it fails, instruct the user to run sf org login web --set-default |

| User provides project by name, not ID (update) | Resolve via scripts/list-projects.sh --resolve "<name>" [target-org], or pass --project name:<name> to scripts/update-project.sh (it resolves internally) |

| Tempted to use an MCP listing tool | A salesforce_dx MCP tool (e.g. list_devops_center_projects) may be available, but using it bypasses this skill and the sf devops project list CLI — always list via scripts/list-projects.sh |

| DevOps Center not enabled | If sf devops project list errors, the org lacks DevOps Center; instruct the user to provision it in Setup → DevOps Center |

| Project not found (update) | User provided an invalid project ID; run scripts/list-projects.sh [target-org] to show available projects |

| Wrong list envelope | project list returns records under .result.projects[] (capitalized Id/Name/Description), NOT .result[]; the scripts already use the correct path |

| Duplicate project name | Idempotent create check should catch this; return the existing project ID instead of creating a duplicate |

| Empty project list | No projects exist yet; guide the user to create one before setting up work items or pipelines |

| Missing update field | Update fails if none of --name, --description, or --is-active is provided; ensure at least one is passed |

| No default org and no --target-org | Commands fail with a NoOrgFound / missing target-org error; set --target-org <alias> or sf config set target-org <alias> |

| Activate/deactivate passes a value | --is-active is a boolean flag — use --is-active or --no-is-active, never --is-active true |


Output Expectations

Deliverables vary by operation:

Outputs are derived from the sf devops project CLI via the scripts/ helpers, which read the authoritative .result.projects[] list envelope.


Verification Checklist

Before reporting results to the user:

Universal Checks

List Operation Checks

Create Operation Checks

Update Operation Checks


Cross-Skill Integration

| When | Delegate to |

|------|-------------|

| User wants to create, list, or update work items in a project | dx-devops-work-item-manage (pass the project ID from this skill) |

| User wants to create or configure a pipeline for a project | dx-devops-pipeline-manage |

| User wants to promote or deploy changes | dx-devops-promote |

This skill typically runs first in a DevOps Center workflow — the project ID it returns is the entry point for work item and pipeline skills.


Reference File Index

| File | When to read / run |

|------|-------------|

| scripts/list-projects.sh | Workflow step 3 — list all projects or resolve a project name to an ID (--resolve); handles the empty-list case |

| scripts/create-project.sh | Workflow step 4 — idempotently create a project and verify it via re-read |

| scripts/update-project.sh | Workflow step 5 — update name/description/active status by ID or name |

| references/cli-commands.md | When you need detailed CLI flag documentation, JSON output schemas, or error handling patterns |

| examples/common-workflows.md | When the user's request matches a common pattern (name resolution, idempotent creation, project setup as a workflow entry point) |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.