/devops-skills:environment-promotion-strategyfrom devops-skills
Designs build/release promotion pipelines across environments (dev, staging, production) with gates, approvals, and configuration-per-environment handling. Use when defining promotion flows, adding approval gates, or syncing environment config.
Ships in devops-skills. 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.
None: SKILL.md is the whole skill.
Most organizations run more than one environment (at minimum dev, staging, production), and the central operational question is not "how do we deploy" but "under what conditions does a given build move from one environment to the next, and who/what decides." Without an explicit promotion strategy, teams either promote too loosely (untested changes reach production) or too rigidly (every environment requires a full manual process, so releases queue up and batch into large, risky changes). This skill covers designing the gates, approvals, and configuration handling that make promotion both safe and fast enough to not become the bottleneck.
values.yaml/.tfvars overlays, so the same build works unmodified in
every environment.environment: + manual jobs, or
the GitOps operator's manual-sync setting (see
gitops-workflow).Define what each environment is for, explicitly, and size gates accordingly:
Promote the artifact, not the source. The same container
image/package built once should flow through every environment
unmodified; only configuration changes per environment. Concretely:
version bump PRs (in a GitOps config repo) reference the same image
digest/tag across overlays/staging and overlays/prod — only the
overlay's environment-specific values differ.
# overlays/staging/kustomization.yaml
images:
- name: payments-api
newTag: "1.4.2"
configMapGenerator:
- name: payments-api-config
literals:
- LOG_LEVEL=debug
- EXTERNAL_API_URL=https://api.staging.example.com
# overlays/prod/kustomization.yaml
images:
- name: payments-api
newTag: "1.4.2" # same tag as staging — same artifact
configMapGenerator:
- name: payments-api-config
literals:
- LOG_LEVEL=info
- EXTERNAL_API_URL=https://api.example.com
Define promotion criteria per gate explicitly, not implicitly. Example criteria for staging → production promotion: all CI checks green, minimum soak time in staging (e.g., 24 hours or N business transactions observed with no new error-rate anomalies), no open Sev1/Sev2 incidents referencing the version, and required-reviewer approval recorded.
Implement the gate mechanically, don't rely on process memory. GitHub Actions example using environment protection + a required reviewer, chained after staging deploy:
deploy-staging:
runs-on: ubuntu-latest
environment: { name: staging }
steps: [ ... ]
deploy-production:
needs: deploy-staging
runs-on: ubuntu-latest
environment:
name: production # configured in repo settings: required reviewers
steps:
- run: ./deploy.sh prod ${{ needs.deploy-staging.outputs.version }}
The production GitHub Environment is configured (Settings →
Environments → production → required reviewers) so the job literally
cannot proceed without an approval click — the gate is enforced by the
platform, not by a runbook step someone might skip.
For multi-service releases, decide train vs. independent promotion explicitly. If services must move together (tightly coupled API contracts), define a release train: a fixed cadence (e.g., weekly) where all participating services' latest verified builds promote together, with a clear cutoff for what makes the train. If services are independently deployable (preferred where contracts allow it), let each promote on its own schedule — this is almost always faster overall, since one slow/blocked service doesn't hold up others.
Make promotion status visible. A dashboard or simple report
showing, per service, "what version is in each environment right now"
avoids the common failure mode of nobody being sure whether staging
and production have drifted apart. GitOps repos make this
straightforward to derive (diff overlays/staging vs.
overlays/prod image tags directly).
Roll back by demoting, using the same mechanism as promotion, not a special-case process — reverting the prod overlay's tag to the previous verified version and letting the ordinary deploy path apply it is more reliable than a bespoke "rollback script" maintained separately from the promotion path.
if (env === 'prod'))
— the latter means you're never really testing the same code path that
runs in production.Symptom: A change passes staging cleanly but breaks in production. Fix: Audit for drift between staging and production beyond intended config differences — mismatched downstream service versions, different data volume/shape, or a feature flag that's off in staging but on in production (or vice versa) are common causes; close the specific gap found rather than generically "testing more."
Symptom: Production and staging are running different versions and
nobody can say for certain which, without checking manually.
Fix: Adopt a GitOps config repo (see
gitops-workflow) where each environment's
deployed version is declared in a file, and build a simple report/diff
across environment overlays rather than relying on tribal knowledge or
kubectl spelunking.
Symptom: Releases queue up because production approval is a scarce, slow human bottleneck (one person, infrequently available). Fix: Either widen the approver pool (multiple people/teams authorized to approve production promotions) or replace part of the manual gate with automated canary analysis so routine, low-risk changes don't require a human at all, reserving manual approval for higher-risk changes.
Symptom: A hotfix was rebuilt directly against production configuration to "save time," bypassing the normal artifact-promotion path, and it later turns out staging never actually validated what's running in prod. Fix: Even for urgent fixes, build once and promote the same artifact through whatever gates can be compressed (fast-tracked review, shortened soak time) rather than skipping the pipeline and building a one-off artifact that was never validated anywhere else.
Symptom: A multi-service release train regularly slips because one lagging service blocks the rest. Fix: Re-examine whether all services in the train genuinely need to move together — if their API contracts are versioned and backward-compatible, decouple them into independent promotion instead of a synchronized train.
Scenario: payments-api version 1.4.2 needs to move from a merge on
main to production, through dev → staging → production, with a release
train not required (this service promotes independently).
main triggers CI (per
ci-cd-pipeline-design): build,
test, containerize, push ghcr.io/example/payments-api:1.4.2.dev overlay's tag to 1.4.2
and pushes; the GitOps operator deploys it within minutes — no
approval required.staging overlay to 1.4.2. This PR is auto-merged since
staging promotion criteria are "CI green" only.1.4.2 soaks in staging for the defined window (e.g., overnight);
automated synthetic transactions and error-rate monitors confirm no
regression.prod overlay to 1.4.2 is opened, referencing the
staging soak evidence (linked dashboard) in its description. The
production GitHub Environment requires one reviewer from the
on-call rotation; they review the change, confirm the staging
evidence, and approve.argocd app sync payments-api-prod,
executed by the same approver as a deliberate final step — completing
promotion to production for the exact artifact that was built once in
step 1 and never rebuilt.prod overlay bump PR (per
gitops-workflow), demoting production
back to 1.4.1 through the identical mechanism used to promote it.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin devops-skills16 skills in this plugin
/artifact-and-dependency-managementManages build artifacts and third-party dependencies through a private registry/proxy with lockfiles, version pinning, retention policies, and automated update workflows. Use when the user asks to "set up an artifact repository," "configure a package registry proxy/mirror," "pin/lock dependency versions," "clean up old artifacts," "handle a dependency update / Dependabot-Renovate PR," or "avoid a left-pad-style supply-chain incident."
/blue-green-canary-deploymentsDesigns and executes progressive delivery strategies — blue-green cutover, canary rollout, and traffic-shifted releases — with automated health checks and rollback triggers, typically on Kubernetes. Use when the user asks to "reduce deployment risk," "set up canary/blue-green deployments," "do a zero-downtime release," "gradually shift traffic to a new version," or "automatically roll back a bad deploy."
/ci-access-and-credential-lifecycle-managementManages the lifecycle of one-off/temporary repo and environment access grants and CI service-account credentials — granting time-boxed access for a specific task, revoking it reliably when the task ends, and rotating CI service-account tokens/keys before they expire or become stale. Use when the user asks to "give a contractor temporary repo access," "grant one-off access to the production environment," "rotate our CI service account token/API key," "find and revoke stale CI credentials," or "our CI token is about to expire, what do we do."
/ci-cd-pipeline-designDesigns and troubleshoots CI/CD pipelines (GitHub Actions, GitLab CI, or equivalent) including stage layout, caching, parallelization, quality gates, and secrets handling. Use when the user asks to "set up a CI/CD pipeline," "add a build/test/deploy workflow," "fix a failing pipeline stage," "speed up CI," "add branch protection / required checks," or "design a deployment pipeline" for an application or infrastructure repo.
/container-build-and-releaseBuilds, tags, scans, and publishes container images with reproducible, minimal, multi-stage Dockerfiles and a defensible tagging/release scheme. Use when the user asks to "write a Dockerfile," "reduce image size," "set up multi-arch builds," "tag and push a container image," "add image scanning to the pipeline," or "publish a release image to a registry."
/devops-delivery-metrics-and-dora-analysisMeasures and interprets the DORA four keys — deployment frequency, lead time for changes, mean time to restore (MTTR), and change failure rate — including how to compute each one correctly, common measurement pitfalls (vanity metrics, gaming the numbers, misclassifying a rollback), and how to use the results to drive process improvement rather than individual blame. Use when the user asks to "set up DORA metrics," "measure our deployment frequency/lead time," "what's our change failure rate," "are we an elite/high/medium/low performer," or "use delivery metrics to improve, not to blame the team."
Other plugins' skills for the same job