From skillry-devops-and-release
Use when you need to perform non-deploying deployment readiness checks for env, build, DB, secrets, and rollback.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skillry-devops-and-release:60-deployment-preflight-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Perform a structured pre-deployment readiness check without executing the deployment. Verify all required environment variables are present in the target environment, pending database migrations are identified and safe, the build artifact is valid and matches CI, the health endpoint is configured, a rollback plan exists, and a smoke test suite is defined. Produce a pass/fail checklist and a blo...
Perform a structured pre-deployment readiness check without executing the deployment. Verify all required environment variables are present in the target environment, pending database migrations are identified and safe, the build artifact is valid and matches CI, the health endpoint is configured, a rollback plan exists, and a smoke test suite is defined. Produce a pass/fail checklist and a blocker list before the team pulls the deploy trigger. This skill is strictly read-only verification — it runs status/info commands only, never apply, migrate, or push.
58-ci-cd-pipeline-review to audit those gates)..env.example, README, or a config schema) against the target environment (secrets store, ConfigMap, config vars). List any variable present in the schema but missing from the target.prisma migrate status, sequelize db:migrate:status, flyway info, rails db:migrate:status). Flag destructive ones (column/table drop, non-nullable add without default)./health or /healthz returns 200 only when fully initialized (DB, cache, required services reachable) and the load balancer uses it, not just a TCP check..env.example.# Env gap: schema keys present in .env.example but missing from the target
comm -23 \
<(grep -vE '^\s*#|^\s*$' .env.example | cut -d= -f1 | sort) \
<(printenv | cut -d= -f1 | sort) # swap printenv for the target store's key list
# Migration status (read-only — never run the migration here)
npx prisma migrate status # Prisma
npx sequelize db:migrate:status # Sequelize
flyway info # Flyway
# Flag destructive migration statements in pending SQL
grep -rniE "drop (table|column)|alter .* drop|not null" prisma/migrations/ migrations/
# Verify the deployed artifact matches CI (image SHA / build id)
docker inspect --format '{{.Id}}' myimage:tag # compare to the CI-published digest
## Deployment Preflight Report
### Build artifact
- Artifact ID / image SHA | CI build verified: yes/no | Matches deploy commit: yes/no
### Environment variable check
| Variable | Required | Present in target | Status |
| DATABASE_URL | yes | yes | OK |
| STRIPE_SECRET_KEY | yes | NO | BLOCKER |
### Database migration status
| Migration | Status | Destructive | Backward compatible |
### Health check
- Endpoint | Checks DB: yes/no | Load balancer configured: yes/no
### Rollback plan
- Code: prev image tag available | DB: migrations reversible | Feature flag kill switch
### Smoke test suite
- Defined: yes/no | Covers this release: yes/no | Est. run time
### Blockers (must resolve before deploy)
### Warnings (proceed only with acknowledgment)
Classify every pending migration before sign-off — this is where most rolling-deploy outages originate:
| Migration | Safe for zero-downtime? | Why / mitigation |
|---|---|---|
| Add nullable column | Yes | old code ignores it |
| Add column with default | Usually | safe if the DB backfills without a long lock |
| Add NOT NULL column, no default | No | old-code inserts fail; add nullable + backfill + constraint in steps |
| Rename column | No | old code reads the old name; use expand/contract (add new, dual-write, drop old later) |
| Drop column | No (this release) | confirm no running code reads it; drop one release after code stops using it |
| Add index | Yes if CONCURRENTLY | a plain CREATE INDEX locks writes |
The general rule: a migration must be compatible with both the currently running code and the incoming code during the rollout window. If it is not, split it across releases (expand/contract).
Preflight finds a pending migration 0042_add_user_region.sql:
ALTER TABLE users ADD COLUMN region VARCHAR(2) NOT NULL;
Classify as a blocker for a rolling deploy: it adds a NOT NULL column with no default, so any insert from the still-running old version (which does not set region) fails for the duration of the rollout. Mitigation in the report: split into (1) add the column nullable now, (2) backfill existing rows and have new code populate it, (3) add the NOT NULL constraint in a later release once all writers set it. Mark the original single-statement migration as "do not deploy as-is", and confirm there is a tested rollback (the column add is reversible, but the constraint add is the risky step). No migration command is executed during preflight — only the status/info read and this classification.
DROP COLUMN cannot be undone without data loss; confirm old code no longer reads it before dropping.A rollback plan is not "redeploy the old image" — each change type has a different reversal path, and some are not reversible at all:
| Change type | Rollback path | Caveat |
|---|---|---|
| Code only | redeploy previous image tag | confirm the tag still exists in the registry |
| Additive migration | leave it applied; roll back code | safe — old code ignores the new column |
| Destructive migration | restore from backup | data written after deploy may be lost; prefer expand/contract |
| Config change | restore previous values | document the old values before changing them |
| Feature behind a flag | flip the flag off | no redeploy needed — the fastest rollback |
The safest releases keep risky changes behind a flag so rollback is a flag flip, not a redeploy. The preflight must confirm that the rollback path for every change in the release is documented and, for the database, actually tested — a rollback procedure that has never been executed is an assumption, not a plan.
Return the Deployment Preflight Report block above: build artifact verification, an env-var gap table (BLOCKER on any missing required var), migration status with destructive/compat flags, health-check and rollback assessments, smoke-test status, and two ordered lists — blockers that must be resolved and warnings that can proceed only with acknowledgment.
kubectl apply, heroku releases, docker push, or equivalent.Done means the artifact was verified against CI, env-var gaps and pending migrations were identified with destructive/compat flags, health-check and rollback plans were assessed, smoke tests were confirmed, and a blocker list was produced — with no deploy or migration command executed.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub fluxonlab/skillry --plugin skillry-devops-and-release