deployment-strategies
Skill4 starsChanged 4 months agoMITView on GitHub
Gets a change into production safely — blue-green, canary, rolling, feature flags, and the rollback that makes each of them safe. Use this whenever the user is planning a release, asks how to deploy without downtime, mentions canary or blue-green, is adding a feature flag, or is nervous about a risky change going out. For deploying an AI agent specifically, use agent-deployment; for the pipeline that runs the deploy, use ci-pipelines.
In this repository61 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-deploymentSkill
- agent-designSkill
- agent-evaluationSkill
- agent-hardeningSkill
- agent-implementationSkill
- agent-observabilitySkill
- agent-scopingSkill
- api-designSkill
- code-templatingSkill
- dependency-upgradeSkill
- error-handlingSkill
- feature-implementationSkill
- project-scaffoldingSkill
- refactoringSkill
- data-analysisSkill
- data-migrationSkill
- data-modelingSkill
- sql-queriesSkill
- ci-pipelinesSkill
- containerizationSkill
- infrastructure-as-codeSkill
- debuggingSkill
- issue-investigationSkill
- issue-triageSkill
- log-analysisSkill
- network-troubleshootingSkill
- performance-profilingSkill
- api-documentationSkill
- commit-messagesSkill
- diagrammingSkill
- markdown-docsSkill
- plain-languageSkill
- pr-descriptionsSkill
- release-notesSkill
- browser-testingSkill
- integration-testingSkill
- load-testingSkill
- test-dataSkill
- test-driven-developmentSkill
- unit-testingSkill
- deep-researchSkill
- feed-digestSkill
- summarizationSkill
- accessibility-reviewSkill
- code-analysisSkill
- code-lintingSkill
- code-reviewSkill
- auth-designSkill
- dependency-auditSkill
- secrets-managementSkill
- security-analysisSkill
- threat-modelingSkill
- capacity-planningSkill
- disaster-recoverySkill
- incident-responseSkill
- monitoring-setupSkill
- root-cause-analysisSkill
- runbooksSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Every deployment strategy is a way of buying information before you are fully committed.
- Distinctive: line 44
Not the last. Rehearse it before the deploy that needs it.
- Very specific: line 61
Use expand-then-contract so every intermediate state works with both versions.
- Distinctive: line 68
Write the numbers down in advance, because judgement degrades once a deploy is in flight and "it's probably fine" becomes very persuasive.
- Distinctive: line 89
Done when: every flag is either permanent by design or has a removal date.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deployment strategies
Every deployment strategy is a way of buying information before you are fully committed. They differ in what they cost and how much they tell you.
The question that decides everything: how quickly can you undo it, and what does undo not cover? A strategy without a tested rollback is not a strategy.
1. Separate deploy from release
The most useful idea here, and the one that unlocks the rest. Deploying is shipping the code; releasing is turning the behaviour on. When they are the same event, every deploy is risky and every rollback is a deploy.
Split them with a flag, and you can ship code continuously, turn a feature on for one account, and turn it off in seconds without a build.
Done when: you can change behaviour without shipping code.
2. Choose the strategy the risk warrants
| Strategy | Buys you | Costs |
| Rolling | Simple, no extra capacity | Both versions live at once; slow rollback |
| Blue-green | Instant switch and instant rollback | Double capacity during the switch |
| Canary | Real traffic on a small blast radius | Needs traffic splitting and per-version metrics |
| Feature flag | Per-user control, instant off | Flag debt, and both code paths must work |
| Shadow | Zero risk, real inputs | No user-visible result; needs response comparison |
Most changes need nothing more than rolling. Reserve the expensive strategies for changes that are hard to undo or hard to test, and note that the two-version overlap in rolling and canary is itself a constraint: both versions must tolerate each other's data.
Done when: the strategy matches the cost of being wrong.
3. Make rollback the first thing you test
Not the last. Rehearse it before the deploy that needs it.
- Time it. "We can roll back" means nothing if it takes 40 minutes
- Know what it does not undo: migrations already applied, messages already sent, caches already poisoned, data already written in the new shape. This list is the real risk
- Keep the previous version warm where the strategy allows an instant switch
- Roll back first, diagnose second. During an incident, understanding is not the priority.
See
incident-response
Done when: you have executed a rollback in a real environment and timed it.
4. Make the database change independent of the code change
The most common source of un-rollbackable deploys. If the new code requires a schema the old code cannot use, you cannot roll back — the deploy and the migration are now one atomic, irreversible event.
Use expand-then-contract so every intermediate state works with both versions. See
data-migration. This is what makes everything else in this skill possible.
Done when: the old version still runs against the new schema.
5. Define promotion and abort before you start
Write the numbers down in advance, because judgement degrades once a deploy is in flight and "it's probably fine" becomes very persuasive.
- Promote when: error rate within X of baseline for Y minutes, latency within Z, no new alert classes
- Abort when: any of those breach, or anything irreversible fires unexpectedly
- Compare against the old version running concurrently, not against yesterday. Canary is valuable precisely because it gives you a live control group
Done when: both thresholds are written and someone is watching them.
6. Manage flag debt deliberately
Feature flags are excellent and they accumulate. A codebase with 200 stale flags has an untestable number of possible states.
- Every flag gets an owner and a removal date at creation
- Remove it once the feature is fully on: the flag was scaffolding
- Distinguish release flags (temporary, removed) from operational switches (permanent, kill switches). Different lifecycles, and conflating them is how removal never happens
Done when: every flag is either permanent by design or has a removal date.
Report
State the strategy and why, the rollback procedure and when you last tested it, the promotion and abort criteria, and what the rollback would not undo. That last item is the one people discover at the worst moment.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

