Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add luqiang-code/claude-code-skills --skill db-migration-safetygit clone --depth 1 https://github.com/luqiang-code/claude-code-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/luqiang-code/claude-code-skills/db-migration-safety)<a href="https://agentmods.dev/skills/luqiang-code/claude-code-skills/db-migration-safety"><img src="https://agentmods.dev/badge/skills/luqiang-code/claude-code-skills/db-migration-safety/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/luqiang-code/claude-code-skills/db-migration-safety"><img src="https://agentmods.dev/badge/skills/luqiang-code/claude-code-skills/db-migration-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.00686 |
| Opus 5.5 | $0.00016 | $0.00274 |
| Sonnet 5.5 | $0.00008 | $0.00137 |
| Haiku 4.5 | $0.00004 | $0.00069 |
Grade A, and why
db-migration-safety scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Migration Safety Review
Review migrations for safety risks before they hit production.
When to Use
- About to run a migration on a large table
- Reviewing a PR with migration files
- User mentions "migration", "schema change", "alter table"
When NOT to Use
- Writing new migrations (use normal review for that)
- NoSQL databases (different safety profile)
- Small dev databases with no data
Workflow
- Read the migration file(s)
- For each operation, check:
Adding a column
- Does it have a DEFAULT? (instant in PG11+, slow without)
- Is it NOT NULL without DEFAULT? (DANGER: will fail on existing rows)
- Is there a backfill plan for existing rows?
Removing a column
- Are there any code references still using it? (grep the codebase)
- Is it part of any indexes or constraints?
Adding an index
- Is it CREATE INDEX CONCURRENTLY? (non-blocking, preferred)
- Estimated index size and creation time on table with N rows?
Changing a column type
- Will it lock the table? (most type changes require ACCESS EXCLUSIVE lock)
- Is there data that won't convert cleanly?
Adding a foreign key
- Are both tables on the same database?
- Is the referenced column indexed?
- Check for rollback safety: does the
downmigration actually revert theup? - Flag any operations that will cause downtime
- Output a risk assessment
Output Format
## Migration Safety Review: 0042_add_user_preferences.sql
### Risk: HIGH
- Line 12: ALTER TABLE users ADD COLUMN preferences JSONB NOT NULL
→ Will fail if users table has rows. Add DEFAULT '{}' first.
### Risk: MEDIUM
- Line 8: CREATE INDEX idx_users_email ON users(email)
→ Consider CREATE INDEX CONCURRENTLY to avoid table lock
→ Table has ~500K rows, estimated time: ~3s
### Safe
- Line 3: CREATE TABLE user_preferences — new table, no risk
- Line 15: ALTER TABLE users ADD COLUMN timezone VARCHAR DEFAULT 'UTC' — has DEFAULT, PG11+, instant
### Rollback: PARTIAL
- Down migration removes user_preferences table (destructive, data loss)
→ Consider RENAME instead of DROP for rollback safety
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 91 lines · 39 tokens per session scan A d381c07a967f
db-migration-safety is a skill published in the GitHub repository luqiang-code/claude-code-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 39 tokens to every session and 686 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
database-expert
Advanced database design and administration for PostgreSQL, MongoDB, and Redis. Use when designing schemas, optimizing queries, managing database performance, or implementing data patterns.
generic-fullstack-feature-developer
Guide feature development for full-stack applications with architecture focus. Covers Next.js App Router patterns, NestJS backend services, database models, data workflows, and seamless integration. Use when adding new features, refactoring existing code, or planning major changes.
agent-database-expert
Specialist subagent: Expert database architect and engineer for PostgreSQL, MongoDB, Redis, and all major databases. Use when designing schemas, optimizing queries, planning migrations, implementing caching, or troubleshooting database performance.
dev-prisma
Pointer to Prisma's own agent skills (prisma-cli, prisma-client-api...) and how to install them, plus the schema-change workflow. Use for Prisma ORM work (schema, migrations, queries, schema.prisma) only when no prisma- skill is installed; when one is, use it instead.
dev-supabase
Backend development with Supabase. Trigger when the user wants to configure auth, the database, or Supabase storage.
ops-database
Database schema design. Trigger when the user wants to create tables, migrations, or optimize queries.