/devops-skills:environment-managementfrom devops-skills
Guides keeping dev, staging, and prod as the same system at different sizes using values files instead of branches, ephemeral preview environments per pull request, and cost-effective non-prod setups. Use when provisioning environments, debugging prod-only bugs, or deciding environment differences.
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.
"It worked in staging" loses all meaning the moment staging is a different system than prod — different topology, different config format, a manually patched box nobody touched since it was built. Staging's entire job is to be a trustworthy predictor of what will happen in prod. Every divergence between them is a bug in that predictor, whether or not anyone notices it before the next incident.
The only differences that should exist between environments are the ones you'd defend out loud: scale, non-critical data, cost. Everything else — topology, versions, how config is structured — should be identical.
Environments should differ by the values you feed the same code, never by forking the code itself.
The moment staging and prod are separate directories or separate branches, they will diverge —
someone fixes a bug in one and forgets the other, or adds a resource to prod under deadline
pressure and never backports it. One codebase, one set of modules, environment-specific
.tfvars or equivalent values files is the only structure that makes divergence visible in a
diff instead of invisible until it breaks something.
See terraform-modules for the module-interface side of this and infrastructure-as-code for
the state-isolation side — each environment still needs its own state file even though it shares
code.
Done when: the diff between any two environments is fully expressed in their values files, with zero resource-definition files that exist in one environment's directory and not another's.
A shared staging environment queues every team behind whoever's currently testing something in it, and a broken staging blocks everyone at once. Ephemeral, per-PR preview environments — spun up on open, torn down on merge or close — remove the queue and catch integration bugs before merge instead of after, when they're entangled with everyone else's changes.
Done when: opening a pull request produces a working, isolated environment automatically, and closing or merging it tears the environment down automatically too.
Everything should be identical by default; every exception should be a conscious, documented choice, not an accident of how the environment happened to get built.
| Dimension | Prod | Non-prod (reasonable to differ) |
|---|---|---|
| Topology / architecture | source of truth | identical |
| Software versions | source of truth | identical |
| Instance count / size | full scale | smaller, still multi-instance |
| External integrations | real | sandboxed or mocked third parties |
| Data | real, sensitive | synthetic or scrubbed |
Anything outside this table that differs between environments is drift, not a deliberate decision — go find out how it happened.
Done when: every difference between staging and prod can be pointed to in this kind of table and defended, with no undocumented divergence left over.
Running every non-prod environment at full production scale is expensive and rarely necessary —
but shrinking it so far that it stops catching real bugs (single-instance when prod is clustered,
no autoscaling when prod scales) makes staging a false signal that's worse than no staging at
all. The goal is the cheapest version that still exercises the architecture prod actually runs.
See cost-optimization for the broader spend-control discipline this borrows from.
Done when: non-prod cost is materially lower than prod, and the team can still name a real bug that staging caught before it reached production.
Manually re-running terraform apply against prod with hand-edited variables is how "it worked in
staging" and "what actually got applied to prod" quietly diverge. Promotion should be the exact
same artifact and the exact same apply mechanism moving forward through environments, with only
the values file changing — tie this to continuous-delivery for the pipeline mechanics.
Done when: the artifact or plan applied to prod is provably the same one that was validated in staging, not a re-generated or hand-edited copy.
State which environments exist, whether preview environments are automated end to end, and where the documented, deliberate differences from prod are. Name the honest gap — usually a staging environment shrunk enough that it no longer catches real bugs, a preview environment that isn't torn down reliably, or a promotion path that still involves a manual apply — rather than claiming full parity.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub arjunprabhulal/devops-skills --plugin devops-skills88 skills in this plugin
/alertingCovers designing alerts that page a human only when a human needs to act — symptom-based alerting over cause-based, multi-window burn-rate alerts on error budgets, severity tiers that route between page/ticket/dashboard, requiring every page to link a runbook, and tuning out alert fatigue. Use this whenever the user is writing a new alert rule, asking why on-call is paged too often or missing real incidents, choosing an alert threshold, or designing severity routing. For the SLO the burn-rate math comes from use `slo-definition`, and for what a runbook should contain use `runbooks`./api-gatewayCovers the managed front-door pattern for APIs — request routing, centralized auth, rate limiting and quotas, request/response shaping, and recognizing when a gateway helps versus becomes a bottleneck or single point of failure. Use this whenever the user is designing an API entry point, adding rate limits or quotas, centralizing auth for several backend services, transforming a request between an external and internal contract, or debugging a gateway timeout. For east-west traffic between internal services use `service-connectivity`, and for token issuance details use `iam-access-management`./argocd-operationsCovers running Argo CD day to day — structuring app-of-apps, choosing sync policies and waves, reading health versus sync status correctly, and unsticking a degraded or hung Application. Use this whenever the user mentions Argo CD, an Application stuck "Progressing" or "OutOfSync," app-of-apps or ApplicationSets, sync waves and hooks, or asks why a deploy shows synced but the workload is unhealthy. For the underlying model this tool implements use `gitops`; for automated canary analysis on top of it use `progressive-delivery`; for the workloads it manages use `kubernetes-operations`.