migration-create

A workflow for creating safe database schema migrations, which are controlled changes to the structure of stored data. It separates changes, checks their risk, asks for confirmation before destructive operations, applies access policies, regenerates derived files, and runs a smoke test.

In plain words
What is it for?
Use it when adding, changing, or removing database tables, columns, access policies, or other schema objects. It first discovers the project's database and migration tools instead of assuming them.
Why use it?
It reduces the chance of exposing a new table, drifting generated types, blocking a large table, or deleting or renaming data without explicit approval. It also keeps each change easier to review and roll back.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/vindm/dotclaude/migration-create
Any agent
npx skills add vindm/dotclaude --skill migration-create
Clone the repo
git clone --depth 1 https://github.com/vindm/dotclaude

Made for: Claude Code, Codex.

Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,146 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00078 $0.01146
Opus 5 $0.00039 $0.00573
Sonnet 5 $0.00016 $0.00229
Haiku 4.5 $0.00008 $0.00115

Measured yesterday against content hash 49d4ada14559, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

migration-create 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 yesterday.

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.

deferred/skills/migration-create/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migration create

Schema migrations fail in ways code review and tests don't catch: a new table ships wide open because its access policy was forgotten, generated types drift because nobody regenerated them, a destructive drop or rename goes in without anyone opting into the loss, or a blocking DDL statement takes a large table offline. Catch these before the migration applies, when the cost is one conversation rather than a rollback.

One migration is one atomic change. Don't bundle an additive column, a backfill, and a policy change into a single file; each is its own migration so each can be reasoned about and rolled back independently. Never edit a historical migration file — old migrations are frozen artifacts; corrections go through a new migration, never by retroactively rewriting an applied one.

Step 0 — Discover the project's migration mechanism

Do not assume the tool, the command, or the database. Find them at runtime before composing anything:

  • The migration mechanism. Look for a migrations directory, an ORM or migration CLI in the dependency manifest, or a database-tooling config. That tells you how migrations are authored and applied here.
  • The conventions. Read two or three existing migrations. Mirror exactly what's there: identifier casing, table singular-vs-plural, foreign-key and timestamp naming, the timestamp type, numeric-type choices, and whether constraints are inline or named separately. Convention drift compounds — one off-style migration nudges the next one further off.
  • The access-control mechanism. Row-level security policies, a permissions layer, application-level access control — each shapes the policy step differently.
  • The regeneration command. Whatever turns the live schema back into typed artifacts (generated types, query bindings, an ORM client). Find the actual command this project uses.
  • The cross-cutting concerns this project tracks. Telemetry on new write paths, audit logging, backup wiring, cache invalidation — read the project's own conventions so the closing reminders match reality.

Read the full file on GitHub · 52 lines

Changes

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.

  1. yesterday First seen · 52 lines · 78 tokens per session scan A 49d4ada14559

Subscribe to this mod's changes

migration-create is a skill published in the GitHub repository vindm/dotclaude (1 stars, last pushed 5d ago), licensed MIT. It adds 78 tokens to every session and 1,146 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

claude-md-review

Audit a CLAUDE.md file for the patterns that actually degrade Claude Code's output — vagueness, unnamed files, stale facts, and bloat. Use when asked to review, audit, improve, shrink, or fix a CLAUDE.md, and when a project's results feel inconsistent or Claude keeps rediscovering the same context.

wesammustafa/Claude-Code-Everything-You-Need-to-Know · 69 tokens

code-reviewer

Automatic code quality and best practices analysis. Use proactively when files are modified, saved, or committed. Analyzes code style, patterns, potential bugs, and security basics. Triggers on file changes, git diff, code edits, quality mentions.

alirezarezvani/claude-code-tresor · 54 tokens

git-commit-helper

Generate conventional commit messages automatically. Use when user runs git commit, stages changes, or asks for commit message help. Analyzes git diff to create clear, descriptive conventional commit messages. Triggers on git commit, staged changes, commit message requests.

alirezarezvani/claude-code-tresor · 55 tokens

test-generator

Automatically suggest tests for new functions and components. Use when new code is written, functions added, or user mentions testing. Creates test scaffolding with Jest, Vitest, Pytest patterns. Triggers on new functions, components, test requests, testing mentions.

alirezarezvani/claude-code-tresor · 55 tokens

api-documenter

Auto-generate API documentation from code and comments. Use when API endpoints change, or user mentions API docs. Creates OpenAPI/Swagger specs from code. Triggers on API file changes, documentation requests, endpoint additions.

alirezarezvani/claude-code-tresor · 48 tokens

readme-updater

Keep README files current with project changes. Use when project structure changes, features added, or setup instructions modified. Suggests README updates based on code changes. Triggers on significant project changes, new features, dependency changes.

alirezarezvani/claude-code-tresor · 49 tokens