deployment-safety
Skill4 starsChanged 4 months agoMITView on GitHub
Safe shipping to production on any platform (Render, Vercel, AWS, Docker, bare VM). Use when deploying, releasing, configuring CI/CD, writing Dockerfiles or infra config, running migrations against production, or when the user says "deploy", "release", "go live", "ship", "rollback", or "production".
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Ionate-Technologies/indium-agentkittheir own version, first seen Oct 20, 2026
- Indium-AI-Labs/indium-agentkittheir own version, first seen Oct 11, 2026
- adtn0810/truestacktheir own version, first seen Sep 12, 2026
- stevancris/sre-ai-agenttheir own version, first seen Jun 14, 2026
- microsoft/PilotSwarmtheir own version, first seen Mar 6, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- Indium-AI-Labs/indium-agentkit★ 18same name
- Ionate-Technologies/indium-agentkit★ 17same name
- microsoft/PilotSwarm★ 14same name
- adtn0810/truestack★ 2same name
- stevancris/sre-ai-agent★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository23 other files it gives its agents.
- ai-agent-designSkill
- ai-build-qualitySkill
- ai-engineeringSkill
- api-contract-designSkill
- architecture-designSkill
- change-hygieneSkill
- code-qualitySkill
- database-designSkill
- data-privacy-complianceSkill
- dependency-disciplineSkill
- docs-and-runbooksSkill
- legacy-code-changesSkill
- observability-readinessSkill
- payments-and-moneySkill
- performance-improvementSkill
- product-ux-qualitySkill
- release-readinessSkill
- requirements-to-specSkill
- root-cause-debuggingSkill
- saas-multi-tenancySkill
- system-designSkill
- testing-strategySkill
- threat-model-securitySkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Every env var the code reads exists in the target environment.
- Distinctive: line 25
Verify the deployed commit: expose a version/commit fingerprint endpoint or log line so you can confirm what's actually running (never …
- Distinctive: line 28
Expand → migrate → contract: Never deploy a migration and the code that requires it as one atomic hope.
- Distinctive: line 35
Prefer progressive exposure for risky changes: feature flag, canary instance, or percentage rollout.
- Distinctive: line 43
Only then report "deployed".
- Distinctive: line 48
After any incident-driven rollback, the fix re-ships with a test or guard that would have caught it.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deployment Safety
A deploy is a bet that new code behaves in an environment you've never run it in. This skill makes the bet survivable: every deploy must be verifiable (you can tell if it worked) and reversible (you can undo it faster than users notice).
The two questions before any deploy
- "How will I know within 5 minutes if this broke something?" — if the answer is "users will tell us", stop and add the signal first (health check, error rate, a smoke request you'll run).
- "What is the undo?" — redeploy previous image/commit? feature flag off? config revert? If the undo involves a database, see the migration rules below, because code rolls back; data does not.
Gates
Gate 1: Build determinism
- The artifact deployed is the artifact tested: build once, promote the same image/bundle through environments. Rebuilding per-environment invites "works in staging" drift.
- Pin versions: base images by tag (ideally digest), lockfiles committed and honored (
npm ci,pip install -rwith pins). A deploy should not change behavior because a dependency released overnight. - Know your build-time vs run-time config split. Anything baked at build (e.g.
NEXT_PUBLIC_*) cannot be fixed by editing env vars later — document which is which.
Gate 2: Config & secrets parity
- Every env var the code reads exists in the target environment. Diff code's required config against the platform's actual config before deploying, not after the crash loop.
- Fail fast and loud on missing/invalid config at boot — a clear startup error beats a 3 a.m. NullPointerException.
- Verify the deployed commit: expose a version/commit fingerprint endpoint or log line so you can confirm what's actually running (never assume the deploy took).
Gate 3: Database migrations — the irreversible part
- Expand → migrate → contract. Never deploy a migration and the code that requires it as one atomic hope. Order: (1) additive migration (new nullable column/table) → (2) code that writes both/reads either → (3) backfill → (4) code that uses only new → (5) drop old, releases later.
- Destructive operations (DROP, ALTER TYPE, DELETE, renames) get: a stated rollback plan, a backup/snapshot taken first, and explicit user confirmation. A rename is a drop in disguise — do add+backfill+drop instead.
- Migrations must be safe to run twice (idempotent or guarded) and safe while old code is still running (the previous version and new schema coexist during rollout).
- Long locks kill production: on Postgres, add indexes
CONCURRENTLY, avoid full-table rewrites in peak hours, setlock_timeout.
Gate 4: Rollout
- Health checks must check readiness (can serve: DB reachable, migrations applied) not just liveness (process up). Zero-downtime deploys are only as good as the readiness probe.
- Prefer progressive exposure for risky changes: feature flag, canary instance, or percentage rollout. The flag default must be the old behavior.
- Graceful shutdown: handle SIGTERM, drain in-flight requests, stop accepting new work (critical for workers/queues — a killed job must be re-runnable).
Gate 5: Post-deploy verification (non-optional)
Within minutes of the deploy, actually do — don't just plan to do:
- Confirm the running version fingerprint matches what you shipped.
- Hit the golden path end-to-end (login → one core read → one core write) against production.
- Watch error rate/logs for the first minutes; compare to pre-deploy baseline.
- Only then report "deployed". A deploy without verification is a deploy that might have happened.
Rollback discipline
- Practice the rollback path before you need it; a documented-but-never-run rollback is fiction.
- Roll back on symptom, investigate on stable — don't debug forward in production while users bleed unless rollback is impossible.
- After any incident-driven rollback, the fix re-ships with a test or guard that would have caught it.
Anti-patterns to refuse
- "Just SSH in and edit it" — snowflake changes that the next deploy silently reverts.
- Deploying Friday-evening/holiday-eve changes that touch auth, money, or migrations without explicit user acknowledgment.
latesttags, unpinned deps, or--forcepushes to the deploy branch.- Secrets pasted into CI logs, Dockerfiles (
ENV SECRET=...is baked into layers), or shell history when a secret store exists.
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.

