db-migration
Skill1 starsChanged 24 days agoMITView on GitHub
Creates a safe database migration with the project's ORM or migration tool: designs the change, generates it locally, reviews the SQL, plans expand/contract for breaking changes, and writes rollback notes. Never applies migrations to shared, staging or production databases. Use for any schema change.
27 other projects use a version of this.
Adopted by
Most recently taken up by
- mohitkale/wordpress-devkittheir own version, first seen Nov 15, 2026
- chrysogonus/prompt-maker-studiotheir own version, first seen Nov 15, 2026
- ricci-labs/twisetheir own version, first seen Nov 8, 2026
- aniketshukla1/sdlc-kittheir own version, first seen Nov 8, 2026
- globalmpc/backendskillstheir own version, first seen Nov 8, 2026
- F3-Nation/f3-nationtheir own version, first seen Nov 2, 2026
Used with
Projects with it also use api-endpoint, add-api-endpoint and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
tadoEngSkillapi-endpoint
Add or change a backend API endpoint on this product, keeping Pydantic as the single contract authority and regenerating the TypeScript client. Use when asked to add an endpoint, expose data to the frontend, change a request or response shape, or wire a new backend capability into a page.
Also in 4 projects that use this
dream-horizon-orgSkilladd-api-endpoint
Step-by-step workflow for adding a new REST API endpoint to pulse-server. Use when creating a new backend endpoint, route, resource, or API in backend/server/.
Also in 3 projects that use this
SentrySkillwrite-tests
Write tests following project conventions. Use when adding new tests or modifying existing ones.
Also in 3 projects that use this
Microsoft AzureSkillgit-workflow
Squad branching model: dev-first workflow with insiders preview channel
Also in 3 projects that use this
Microsoft AzureSkilldesign
Design rules and conventions for the API Center Portal. Use when editing detail pages, card components, badges, layout, navigation, sidebars, or headers. Covers badge styling, metadata placement, page navigation patterns, and layout alignment.
Also in 3 projects that use this
AnthropicSkilldebug
Structured debugging session — reproduce, isolate, diagnose, and fix. Trigger with an error message or stack trace, "this works in staging but not prod", "something broke after the deploy", or when behavior diverges from expected and the cause isn't obvious.
Also in 3 projects that use this
- +1 more from Azure
Other versions27 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 27
- dipu-bd/lightnovel-crawler★ 2.6ksame name
- lncrawl/lightnovel-crawler★ 2.6ksame name
- openmeterio/openmeter★ 2.5ksame name
- F3-Nation/f3-nation★ 211same name
- hiromaily/go-crypto-wallet★ 128same name
- nrjdalal/zerostarter★ 65same name
- globalmpc/backendskills★ 63same name
- xin-lai/CodeSpirit★ 56same name
- NicholasFlemmer/styx-app★ 32same name
- nikandr-surkov/ai-saas-starter★ 16same name
17 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository100 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- add-ai-featureSkill
- add-authSkill
- add-cmsSkill
- add-i18nSkill
- add-paymentsSkill
- add-realtimeSkill
- adoptSkill
- analytics-planSkill
- api-contractSkill
- architecture-decisionSkill
- architecture-reviewSkill
- brainstormSkill
- brand-identitySkill
- bug-reportSkill
- bug-triageSkill
- changelogSkill
- ci-setupSkill
- client-demoSkill
- competitor-auditSkill
- consistency-checkSkill
- content-calendarSkill
- content-strategySkill
- create-architectureSkill
- create-epicsSkill
- create-storiesSkill
- cro-reviewSkill
- data-modelSkill
- dependency-auditSkill
- deploy-setupSkill
- design-reviewSkill
- design-systemSkill
- design-tokensSkill
- dev-storySkill
- e2eSkill
- email-flowsSkill
- estimateSkill
- experimentSkill
- feature-specSkill
- funnel-reviewSkill
- gate-checkSkill
- helpSkill
- hotfixSkill
- incidentSkill
- install-depsSkill
- launch-checklistSkill
- load-testSkill
- market-researchSkill
- milestone-reviewSkill
- observability-setupSkill
- onboardSkill
- perf-auditSkill
- personasSkill
- postmortemSkill
- privacy-auditSkill
- project-stage-detectSkill
- propagate-design-changeSkill
- prototypeSkill
- refactorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 44
Update the schema file (Prisma schema, Drizzle tables, SQLAlchemy/Django/Eloquent/ ActiveRecord models), then generate with the stack's …
- Distinctive: line 52
Read the generated SQL and check:
- Very specific: line 53
no unintended DROP or table rewrite
- Very specific: line 63
Write a rollback note in the migration folder or the story's ## Notes: the reverse migration or the follow-up migration that undoes it, and …
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DB Migration
Schema changes are the one kind of code that can destroy data. This skill
generates and reviews the migration locally and prints the deploy step for
the user. It never runs migrate deploy, db push, migrate reset,
supabase db push or anything that touches a shared database.
Inputs
- The change (argument) and the story/spec it serves
docs/architecture/data-model.md(update it alongside)project.yaml → stack.database,stack.orm,.claude/docs/stack-matrix.md(migration commands)- Existing migrations folder (
prisma/migrations,drizzle/,alembic/versions,*/migrations,database/migrations,db/migrate)
Phases
Phase 1: Design
Spawn data-engineer (+ the data specialist for the stack) to propose the change:
columns, types, constraints, indexes, defaults, and the data impact.
Classify it:
- Additive (new table, nullable column, new index): one migration.
- Breaking (rename, drop, type change, NOT NULL on existing data): expand →
migrate → contract across separate deploys:
- Expand: add the new column/table; code writes both.
- Backfill: batched data migration (script or job), idempotent.
- Switch reads to the new shape.
- Contract: drop the old column in a later release.
Show the plan and ask "Proceed?"
Phase 2: Generate locally
Update the schema file (Prisma schema, Drizzle tables, SQLAlchemy/Django/Eloquent/
ActiveRecord models), then generate with the stack's create-only/generate
command (e.g. npx prisma migrate dev --create-only --name <slug>,
npx drizzle-kit generate, alembic revision --autogenerate -m,
python manage.py makemigrations). Ask before each write and command.
Phase 3: Review the SQL
Read the generated SQL and check:
- no unintended
DROPor table rewrite - large tables: indexes
CONCURRENTLY(Postgres), no long locks; NOT NULL added after backfill - defaults that are cheap (no volatile defaults rewriting big tables)
- foreign keys indexed; constraints named
- RLS policies for new tables on Supabase
Report findings; fix and regenerate as needed.
Phase 4: Rollback and docs
Write a rollback note in the migration folder or the story's ## Notes:
the reverse migration or the follow-up migration that undoes it, and whether
data can be lost. Update docs/architecture/data-model.md. Ask before writing.
Phase 5: Hand off
Tell the user the commands to apply it, in order:
- local:
npx prisma migrate dev(or equivalent), which they may let you run on the local dev DB - deploy: the CI/deploy step (e.g.
npx prisma migrate deployrun by the pipeline), after a backup
Next step
Back to /dev-story for the code that uses the new schema.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

