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 saifoelloh/golang-best-practices-skill --skill migration-safetygit clone --depth 1 https://github.com/saifoelloh/golang-best-practices-skillWrote 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/saifoelloh/golang-best-practices-skill/migration-safety)<a href="https://agentmods.dev/skills/saifoelloh/golang-best-practices-skill/migration-safety"><img src="https://agentmods.dev/badge/skills/saifoelloh/golang-best-practices-skill/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/saifoelloh/golang-best-practices-skill/migration-safety"><img src="https://agentmods.dev/badge/skills/saifoelloh/golang-best-practices-skill/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.00065 | $0.00688 |
| Opus 5 | $0.00032 | $0.00344 |
| Sonnet 5 | $0.00013 | $0.00138 |
| Haiku 4.5 | $0.00006 | $0.00069 |
Grade A, and why
gorm-sql-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 12d 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 — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migration Safety
Expert-level review of database migration safety for production PostgreSQL deployments. Ensures zero-downtime schema changes, correct rollback capability, and idempotent migrations.
When to Apply
Use this skill when:
- Writing new migration files (
*.up.sql,*.down.sql) - Using GORM
AutoMigrate - Adding columns, indexes, or constraints to existing tables
- Dropping columns or tables
- Reviewing migrations before deploying to production
Zero-Downtime Migration Checklist
Before any production migration:
- NOT NULL column has DEFAULT or backfill migration first
- Indexes use
CONCURRENTLY - Migration is idempotent (
IF NOT EXISTS/IF EXISTS) -
down.sqlrollback file exists and is tested - DROP COLUMN is in a separate deploy after code references removed
- AutoMigrate is not in the application startup path
Rule Categories
| Priority | Count | Focus |
|---|---|---|
| Critical | 3 | AutoMigrate in production, NOT NULL backfill, missing rollback |
| High | 2 | CONCURRENTLY indexes, idempotent migrations |
| Medium | 1 | DROP COLUMN deprecation period |
Rules Covered (6 total)
Critical Issues (3)
critical-no-automigrate-production— Never run AutoMigrate in production startup pathcritical-not-null-backfill— NOT NULL column addition requires 3-step migrationcritical-always-provide-rollback— Every migration must have a paireddown.sql
High-Impact Patterns (2)
high-create-index-concurrently— UseCREATE INDEX CONCURRENTLYto avoid write lockshigh-idempotent-migration— UseIF NOT EXISTS/IF EXISTSfor safe re-runs
Medium Improvements (1)
medium-drop-column-deprecation— Deprecate before dropping — never drop in same deploy as code changes
Trigger Phrases
- "Review this migration"
- "Is this migration safe?"
- "ALTER TABLE"
- "ADD COLUMN / DROP COLUMN"
- "CREATE INDEX"
- "AutoMigrate"
- "Schema change"
- "Zero-downtime migration"
Related Skills
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 12d ago First seen · 76 lines · 65 tokens per session scan A b57dd3513477
gorm-sql-migration-safety is a skill published in the GitHub repository saifoelloh/golang-best-practices-skill (15 stars, last pushed 6mo ago), licensed MIT. It adds 65 tokens to every session and 688 once invoked, about $0.0003 per session on Opus 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-30.
Other skills, from other repositories
multitenant
Architecture multitenant avec approche tiered (Shared/Dedicated Schema/DB), RBAC/ABAC, field-level encryption. Use when working with multitenant applications, tenant isolation, data segregation.
postgres-drizzle
Proactively apply when creating APIs, backends, or data models. Triggers on PostgreSQL, Postgres, Drizzle, drizzle-orm, drizzle-kit, database, schema, pgTable, tables, columns, indexes, queries, migrations, ORM, relations, relational queries, joins, transactions, SQL, connection pooling, PgBouncer, N+1, JSONB, RLS…
testing-paperclip
Paperclip-Testing-Strategie — Vitest, Plugin-Test-Harness aus @paperclipai/plugin-sdk/testing, echte Postgres-Integration-Tests, Cross-Tenant-Isolation. Verwenden Sie dies beim Schreiben oder Reviewen von Paperclip-Tests.
database-management
Standards for SQLAlchemy async models, PostgreSQL indexing, UTC datetimes, and Alembic migrations.
postgres-patterns
PostgreSQL database patterns for query optimization, schema design, indexing, and security. Based on Supabase best practices.
alloydb-basics
Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations. Use when creating, configuring, or administering AlloyDB databases. Do NOT use for general PostgreSQL instances (e.g. Cloud SQL) or other GCP databases.