db-migrate
Skill113 starsChanged 9 days agoMITView on GitHub
Create and apply a Prisma migration safely against the remote (tunneled) PostgreSQL. Use for schema changes - "create a migration", "apply migrations", "add a column/table".
19 other projects use a version of this.
Adopted by
Most recently taken up by
- harmnot/trackfudtheir own version, first seen Nov 15, 2026
- lablup/backend.aitheir own version, first seen Oct 8, 2026
- linuxfoundation/insightstheir own version, first seen Oct 8, 2026
- Ame-Al/ametheir own version, first seen Oct 8, 2026
- simstudioai/simtheir own version, first seen Oct 8, 2026
- mgiovani/cc-arsenaltheir own version, first seen Sep 25, 2026
Used with
Projects with it also use react-query-best-practices, you-might-not-need-a-callback and 6 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.
bibektimilsina00Skillreact-query-best-practices
Audit and fix React Query usage in apps/web — enforce query key factories, signal forwarding, staleTime, and proper mutation patterns. Use when reviewing or fixing server-state code.
Also in 3 projects that use this
bibektimilsina00Skillyou-might-not-need-a-callback
Analyze and fix useCallback anti-patterns in your code
Also in 3 projects that use this
MicrosoftSkillcleanup
Also in 3 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 7 projects that use this
VercelSkilldeploy
Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".
Also in 4 projects that use this
- +3 more from bibektimilsina00
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- simstudioai/sim★ 30ksame name
- lablup/backend.ai★ 679same name
- linuxfoundation/insights★ 288same name
- alexeykrol/claude-code-starter★ 194same name
- getsentry/abacus★ 77same name
- lfrodrigues/packt-claude-code-course-auth★ 9same name
- mgiovani/cc-arsenal★ 8same name
- mean-weasel/bullhorn★ 4same name
- pgnzbl-ux/crucible★ 4same name
- vndee/engineering-skills★ 3same name
9 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 repository9 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- commitSkill
- knip-cleanupSkill
- prod-dry-runSkill
- pr-reviewSkill
- releaseSkill
- restart-terminalSkill
- teaser-videoSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Ask the user before touching production.
- Very specific: line 31
Never run db:reset without explicit user confirmation - it wipes the database it points at.
“Common” is measured: kept by at least 6 in 10 of the 14 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 migrate
The tunneled database (bun run db:tunnel, localhost:5433) is production. prisma migrate
dev can demand a reset there, which wipes it, so never run it. All commands
are bun --cwd=apps/api run ….
- Edit the schema - split by domain under
apps/api/prisma/schema/*.prisma. - Restore a throwaway copy:
pg_dumpprod through the tunnel, restore it into a local PostgreSQL on another port (e.g. 5434), and pointDATABASE_URLat it for every step below until step 6. A local PostgreSQL and the tunnel both default to 5433 - checkdocker psfirst. db:diffprints the SQL from the database to the schema (read-only). Save it asapps/api/prisma/migrations/<yyyymmddhhmmss>_<name>/migration.sqland edit it: Prisma turns renames into drop + add - hand-edit toALTER ... RENAMEwhen data must survive. Data fixes that need TS logic go in a one-offapps/api/scripts/<name>.tswith a--dry-runreport.migrate deployapplies every pending migration at once, so a script can't run between two of them. When the migration needs the script's output, run the script first against the old schema, have it fill a staging table the migration joins on, and make the migrationRAISE EXCEPTIONbefore any change if rows are left unmapped (20261026070000_board_idsin git history). Partial unique indexes aren't in the Prisma schema;db:diffwon't emit them, so write them by hand.db:migrate:applyagainst the copy, run the data script, spot-check counts and samples, and run the app against the copy. Thendb:generate.- Ask the user before touching production.
- Production: fresh
pg_dumpbackup,db:migrate:applythrough the tunnel, the data script, then deploy the matching images back to back. Never leave code that accepts both shapes.
Never run db:reset without explicit user confirmation - it wipes the database it points at.
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.

