shennawardana23/skillme/deployment-patterns
Claude Code and agent skill by shennawardana23/skillme
- community
Checking that the SKILL.md file is still in the repository.
Guides production rollout strategy — rolling/blue-green/canary deployments, liveness/readiness/startup probes, startup config validation, and rollback planning. Use when choosing a deployment strategy, implementing health check endpoints or Kubernetes probes, planning a rollback path before a release, or reviewing a production-readiness checklist before a launch. For building the container image itself, see docker-patterns; for the pipeline that runs the deploy, see ci-cd-and-automation.
Install
npx vskill@latest install shennawardana23/skillme/deployment-patternsSKILL.md
The same SKILL.md was published earlier as shennawardana23/skillme/deployment-patterns.
Deployment Patterns
This skill is about what happens once a built, tested artifact is ready to go live: how traffic moves to it, how the platform knows it's healthy, and how to get back to the last good state if it isn't. Building the image is docker-patterns; the pipeline that builds, tests, and triggers the deploy is ci-cd-and-automation.
Choosing a rollout strategy
| Strategy | Mechanism | Rollback speed | Cost | Use when | |
|---|---|---|---|---|---|
| Rolling (default) | Replace instances gradually; old and new run simultaneously | Redeploy previous image (not instant) | No extra infra | Standard deploys with backward-compatible changes | |
| Blue-green | Two full environments; switch traffic atomically | Instant (switch back) | 2x infra during deploy | Critical services, near-zero tolerance for bad deploys | |
| Canary | Small traffic % to new version first, then ramp | Fast (cut canary traffic) | Requires traffic-splitting infra | High-traffic services, risky changes |
Rolling deployment's hard requirement: the old and new versions must be able to run simultaneously against the same database and message schema — if a migration or message format isn't backward-compatible with the version being replaced, a rolling deploy will have some requests hit old code and some hit new code mid-rollout, and one of them breaks. See database-migrations' expand/migrate/contract pattern for how to make a schema change safe under this constraint.
Health checks: three distinct signals, not one
Conflating liveness and readiness into one endpoint is the most common mistake: a liveness check that also pings the database means a transient database blip restarts every instance simultaneously instead of just pulling them from rotation — turning a brief dependency hiccup into a full outage during the restart storm.
Startup config validation — fail fast, not fail-weird
Validate every required environment variable at process start, before serving a single request:
A service that starts successfully with a missing config value and fails on the first request that needs it turns a deploy-time problem into a production incident hours later — validate everything the process needs at startup, exit non-zero immediately if anything is missing or malformed.
Rollback: plan it before you need it
Rollback checklist, verified before the release it protects, not during the incident:
- [ ] Previous image/artifact is still available and tagged (not
overwritten by the new build)
- [ ] Database migrations for this release are backward-compatible with
the previous code version (expand/migrate/contract, never a bare destructive change in the same release as new code that needs it)
- [ ] Risky new behavior is behind a feature flag that can be disabled
without a redeploy
- [ ] Rollback has actually been exercised in staging, not just
documented
Production readiness checklist
Application: structured logging with no PII (observability-and-instrumentation), error handling covers edge cases, no hardcoded secrets.
Infrastructure: image is reproducible (pinned base image versions — docker-patterns), resource limits set (CPU/memory), horizontal scaling min/max configured, TLS on every endpoint.
Monitoring: RED metrics exported, alerts configured on symptoms with runbook links (observability-and-instrumentation), uptime monitoring on the readiness endpoint specifically (not liveness — liveness can be "up" while the instance can't actually serve a real request).
Operations: rollback plan documented and tested, migration tested against production-sized data (database-migrations), on-call rotation defined for this service before it goes live.
Gotchas
- A
readinessProbewith too aggressive afailureThreshold/periodSeconds
pulls an instance out of rotation on a single slow response — tune against the endpoint's actual p99, not a guess.
startupProbeabsence on a slow-starting service means the
livenessProbe's initialDelaySeconds has to cover worst-case startup time for every restart, forever — a dedicated startupProbe with a longer allowance decouples "how long can startup take" from "how quickly do we detect a genuinely hung process" once running.
- Rolling deployment with a schema change that isn't backward-compatible
is a guaranteed partial-outage window — the old code path will run against the new schema (or vice versa) for however long the rollout takes, not an instant.
- Blue-green's "instant rollback" assumption breaks if the new version
already wrote data in a format the old version can't read — the atomic-switch guarantee only covers the application layer, not shared mutable state.
Real-world grounding
Knight Capital's 2012 production incident is the canonical case for rollout-strategy risk: a new deployment was rolled out to 7 of 8 production servers, leaving one server running old code that reinterpreted a repurposed configuration flag as a signal to activate a long-dormant test feature — the mismatch between what was deployed where went undetected, and the resulting erroneous trading activity cost the firm roughly $440 million in the 45 minutes before it was manually stopped. The lesson generalizes directly: a rollout strategy is only as safe as the guarantee that every instance is verifiably running one consistent, known version — "it's probably fully rolled out by now" is not a verification step.
Verification
- [ ] Rollout strategy matches the risk level of the change (rolling default; blue-green/canary for higher-risk releases)
- [ ] Liveness and readiness are separate endpoints with separate failure semantics
- [ ] All required config is validated at startup; the process exits non-zero on missing/invalid config rather than starting degraded
- [ ] A rollback path exists, is documented, and has been exercised in staging
- [ ] Any schema change in this release is backward-compatible with the version being replaced during rollout
- [ ] Alerts and uptime monitoring target the readiness endpoint, not just liveness
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/deployment-patterns/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shennawardana23/skillme/deployment-patterns)