add-migration
/add-migration
Create and review a database migration for a finished model change (mapping configuration, generated model artifacts, permission chain, API contract) when the user explicitly invokes /add-migration.
- Author
- kadirguloglu ↗
- Repository
- kg-devkit ↗
- Licence
- MIT
- Last repository change
- 11.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Create and review a database migration for a finished model change (mapping configuration, generated model artifacts, permission chain, API contract) when the user explicitly invokes /add-migration.
Arguments
/add-migration <MigrationName>
Original author description
Create and review a database migration for a finished model change (mapping configuration, generated model artifacts, permission chain, API contract) when the user explicitly invokes /add-migration.
How it works
SKILL.md has no level-two headings · 37 lines, 465 words
SKILL.md preview
---
name: add-migration
description: Create and review a database migration for a finished model change (mapping configuration, generated model artifacts, permission chain, API contract) when the user explicitly invokes /add-migration.
disable-model-invocation: true
argument-hint: "<MigrationName>"
---
# Add a migration
When the user invokes `/add-migration <Name>`, turn the schema change into a migration named `<Name>`. The repo's
`AGENTS.md`/`CLAUDE.md` limits and its `Project profile` apply (the `Persistence` entry gives the migration
command, migrations directory, naming and conventions). This skill grants NO authority to apply the migration to
a database, commit, push or deploy. The profile may add limits; it cannot remove a limit stated in this skill. Without a Persistence entry, find the ORM's migration tooling in the repo and
ask the user to confirm the command before running it.
1. **Scope.** `git status --short`; preserve the user's changes. Read the changed entities and their mapping
configuration. Use a similar existing migration in the migrations directory as the example.
2. **Finish the model, then generate.** Do not generate before entity and configuration are done. Check the
profile's conventions: base entity (tenant/soft-delete filters), unique indexes with the soft-delete filter,
plain-key reference validation, money/decimal rules. Add no default rows to lookup/reference data unless the user asked.
3. **Generate.** Verify the command via the profile's help, then use the profile's
migration command with a name that follows existing naming (`Add…`/`Change…`). Prefer the project's wrapper over
raw tool calls, since wrappers often clean stray folders.
4. **Inspect the output.** The migration and the generated model artifacts the profile lists (EF Core: designer and model snapshot) must change together. `Up` must contain only the
intended difference (unrelated column/index changes mean the model needs another look). Assess schema reversal
and data restoration separately: recreating a dropped column does not restore its values. Document lossy or
irreversible `Up`/`Down` operations and follow the profile's rollback policy; never claim data recovery without
evidence. For data-transforming migrations, record effects on existing rows (default, NULL, index build time).
5. **Permissions**, if the change adds one: follow the profile's chain (constant and catalog, permission seed,
migration, read-only role lists, frontend permission codes).
6. **Contract.** If DTOs/endpoints changed too, regenerate the API types/OpenAPI with the profile's command; the
generated files belong in the commit.
7. **Verify.** Build the backend and run the focused tests for the area (schema tests may need Docker). Apply the
migration to the local database ONLY if the user asks. Never reset the database.
8. **Gate.** Use the profile's `Finish gate` as the source of reviewer names and triggers (including schema,
migration and permission/tenant changes); if the profile has no gate, read
`${CLAUDE_PLUGIN_ROOT}/references/finish-gate-default.md` and use its table. Pass the evidence as
`${CLAUDE_PLUGIN_ROOT}/references/review-packet.md` describes. Ambiguous gate rules must be clarified
before declaring verification complete. Required review that is unavailable, FAIL or UNCLEAR blocks a verified
handoff; do not invent a passing verdict.
9. **Report** (profile's report language): migration name and files, `Up`/`Down` summary, effect on existing data,
commands run and counts, checks that could not run (for example no Docker), reviewer verdicts.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · kadirguloglu/kg-devkit | 96 | MIT |
| artk0de/tearags-mcp | 100 | MIT |
| KyRocks19/divination-station-takeoff | 100 | AGPL-3.0 |
| kadirguloglu/kg-devkit | 96 | MIT |
Database snapshot: 13.11.2026 · package version 82e4b9230e02 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95database-migration
Create database migration with schema changes and rollback. Auto-invoke when user says "create migration", "add table", "modify schema", or "change database". - 100spree-resource
Use when the user wants to add a new model, database table, or REST API endpoint to a Spree 6 project. Covers `spree:api_resource` (model + migration + Store/Admin API controllers + serializers + factory + controller specs + routes + permission scope) and `spree:model` (model +… - 90create-migration
Create a new database migration file for the OWID MySQL database. Use when the user needs to create a database schema change or migration. - 100prisma-migration
Creates Prisma schema models and generates database migrations from the entity model. Use when the user asks to "create a migration", "update the schema", "set up database tables", "write a Prisma migration", or mentions schema migration, DB migration, database versioning, or Prisma schema changes. - 100backend-migration-writer
Authors a safe, reversible database migration — up and down files, data-backfill plan, lock-budget analysis, and rollback strategy. Pulled by the `backend` specialist. TRIGGER: "write the migration for X", "generate the up/down for X column", "add a reversible migration for X",… - 100migration-safety-checker
This skill should be used when the user asks to "create a migration", "run makemigrations", "modify a model field", "rename a column", or mentions "schema change", "alter table", "database migration". Validates migrations are production-safe.