/ship-pipeline:backup-verifyfrom ship-pipeline
Confirm database backups exist AND actually restore, by enumerating Neon branch snapshots / Supabase scheduled backups / pg_dump artifacts, restoring into a scratch branch, running smoke queries, and recording timestamped evidence. Use before any risky migration or production mutation, and on a monthly cadence regardless.
Ships in ship-pipeline. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
"A backup exists" and "a backup restores cleanly" are different claims, and only the second one matters during an incident. This skill does the actual restore drill — not just checking a dashboard says backups are enabled. Untested backups are a belief, not a fact.
This is the mandatory gate referenced by [[db-migration-safety]] before any production mutation, and should also run standalone on a monthly cadence so a restore is never being attempted for the first time during a real emergency.
Enumerate what backup mechanism the target database actually uses — don't assume:
neon snapshots list.supabase backups list --project-ref <ref> or Dashboard → Database → Backups.pg_dump: if neither managed backup exists, this is the fallback — confirm one has actually been run and stored somewhere durable (not just on a laptop).Confirm the most recent backup's timestamp and compare it against acceptable staleness for the task at hand — "backup from 6 days ago" is not acceptable evidence before a migration touching the Subscription table today.
Restore into a scratch branch/environment — never restore over the original:
neon snapshots restore <snapshot-id> --name backup-drill-<date> — never pass --finalize (it swaps the restored data in for the target branch) or a --target-branch that is production. Or branch from a point in time: neon branches create --parent <timestamp> --name backup-drill-<date>.supabase backups restore for a drill — it restores the live project itself, in place.pg_dump -Fc / -Fd): createdb backup_drill_<date> && pg_restore --no-owner -d backup_drill_<date> <dump_file> against a local or scratch Postgres instance.pg_dump output, or supabase db dump): psql -d backup_drill_<date> -f <dump.sql> — pg_restore only reads custom and directory formats. supabase db dump writes the schema only by default; a full copy also needs a --data-only dump.Run smoke queries against the restored copy to confirm data integrity, not just that the restore command exited 0:
-- Row counts on the tables that matter most (auth, billing)
SELECT 'User' AS table_name, COUNT(*) FROM "User"
UNION ALL SELECT 'Subscription', COUNT(*) FROM "Subscription"
UNION ALL SELECT 'Customer', COUNT(*) FROM "Customer";
-- Spot-check a known recent row exists and looks right
SELECT * FROM "Subscription" ORDER BY "updatedAt" DESC LIMIT 5;
-- Confirm referential integrity wasn't silently broken
SELECT COUNT(*) FROM "Subscription" s
LEFT JOIN "Customer" c ON c.id = s."customerId"
WHERE c.id IS NULL; -- should be 0
Compare row counts against the live database's counts at drill time (they should be close — some drift is expected if traffic occurred between backup and drill).
Tear down the scratch branch/database after recording evidence — don't leave restore drills lying around accumulating cost or confusion about which environment is "real."
Record evidence with timestamps — a one-paragraph log entry is enough, but it must include: backup mechanism, backup timestamp, restore-drill timestamp, row-count comparison, and pass/fail.
pg_restore, or treating a schema-only supabase db dump as a full backup.Sources: Neon backup and restore, Supabase backups, PostgreSQL pg_restore.
Report to the user: backup mechanism + timestamp of the backup used, the restore command run, smoke query results (row counts, integrity check), and confirmation the scratch environment was cleaned up. This evidence is what unblocks a migration gated by [[db-migration-safety]] — link back to it rather than re-describing.
pg_dump) — stop, surface this to the user immediately, this is a standing risk independent of whatever task prompted the check.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub stylusnexus/agent-plugins --plugin ship-pipeline16 skills in this plugin
/analytics-instrumentationPostHog event taxonomy and instrumentation review - object_verb naming, flat property schemas, identify/reset/group calls, PII exclusion, LLM usage events, a starter dashboard set (activation, retention, feature funnel), and a per-feature checklist. Use when instrumenting a new feature, auditing existing PostHog events, or setting up analytics for a new product, e.g. "add tracking", "what events should we fire", "review our PostHog events", "is there PII in analytics"./api-designREST conventions for Next.js App Router route handlers — resource naming, versioning, cursor pagination, one error envelope, Zod request/response validation, status-code rules, OpenAPI generated from Zod, and response scrubbing (no secrets, hashes, or other users' data). Use when asked to "design an API route", "add a new endpoint", "review this route handler", "fix our error responses", or "generate API docs"./cdfUse when the user types /cdf or $cdf, or asks for issue numbers "comma-delimited". Output any list of GitHub issues as one plain comma-separated line of numbers, nothing else added./db-migration-safetyWrite or review Prisma and Supabase database migrations safely using the expand-contract pattern, idempotent SQL, and batched backfills. Use when adding/changing columns or tables, writing a migration PR, or reviewing one before merge — especially against Neon Postgres or Supabase in production./db-truthGround every database claim in the live database. Repo-agnostic — pre-work verification before any spec, plan, or code that touches tables (schema shape, M2M vs scalar, RLS/permissions, function properties), and post-apply verification that migrations actually landed (ledger, object existence, type regen). Defers to a repo-local db-truth skill when one exists. Use BEFORE designing anything DB-touching and AFTER every migration apply./deployPromote the integration branch to production as one authorized batch. Repo-agnostic — detects the repo's branch names, merge strategy, and release tooling from its own history, and defers to any repo-local runbook. Freezes the source commit, proves the live artifact matches it, records migration, publish, smoke, and rollback evidence, and closes only issues proved shipped. Use when ready to push to production.