agentsclimarketplace

Deployment safety

Skill 05-deepak-patidar/claude-skills/deployment-safety

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".From its SKILL.md

Install
npx -y skills add 05-deepak-patidar/claude-skills --skill deployment-safety

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.7 KB, 999 tokens by cl100k_base, as published. Nobody here has run it

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

  1. "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).
  2. "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 -r with 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, set lock_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:

  1. Confirm the running version fingerprint matches what you shipped.
  2. Hit the golden path end-to-end (login → one core read → one core write) against production.
  3. Watch error rate/logs for the first minutes; compare to pre-deploy baseline.
  4. 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.
  • latest tags, unpinned deps, or --force pushes to the deploy branch.
  • Secrets pasted into CI logs, Dockerfiles (ENV SECRET=... is baked into layers), or shell history when a secret store exists.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most containers cloud skills give in 999 tokens

Counted across 607 of the 657 authors here whose files we hold, read 2026-08-07

  • Run containers as a non-root userin 66 of 607, across 46 files
  • Use multi-stage buildsin 53 of 607, across 44 files
  • Use Promise.all for independent operationsin 47 of 607, across 13 files
  • Import directly instead of barrel filesin 46 of 607, across 12 files
  • Use ternary instead of AND for conditionalsin 45 of 607, across 12 files
  • Use Set or Map for O(1) lookupsin 42 of 607, across 10 files
  • Create a .dockerignore filein 41 of 607, across 31 files
  • Read individual rule files for detailsin 39 of 607, across 9 files
  • Copy dependency files before source codein 36 of 607, across 23 files
  • Authenticate server actions like API routesin 35 of 607, across 7 files
  • Use next/dynamic for heavy componentsin 34 of 607, across 9 files
  • Use React.cache for per-request deduplicationin 34 of 607, across 10 files

Said here and by no other author read

  • establish deploy verification and rollback plans
  • fail fast and loud on invalid configuration
  • verify the running commit fingerprint
  • expand, migrate, then contract database schemas
  • take a backup before destructive operations
  • keep migrations idempotent and coexistence-safe

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,861. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.