add-migration
Skill2 starsChanged 2 days agoMITView on GitHub
Adds a database migration to the store package. Use when a change needs a new table, column or index, or a change to stored data.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- M0xoo/wisptheir own version, first seen Nov 29, 2026
- WispAgents/wisptheir own version, first seen Nov 29, 2026
- allswebtech/trouteaitheir own version, first seen Nov 29, 2026
- Kangentic/kangentictheir own version, first seen Nov 24, 2026
- andy-dendy-repo/governtheir own version, first seen Nov 16, 2026
- Krzysztof318/MailFathomtheir own version, first seen Nov 15, 2026
Used with
Projects with it also use add-provider.
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.
PydanticSkilladd-provider
Add a new inference provider to genai-prices, including provider data, matching, usage extractors, update automation, cassettes, agentic checks, generated artifacts, and Python/JavaScript/Go parity tests. Use for a new provider, not a new model on an existing provider.
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- OpenAEV-Platform/openaev★ 1.9ksame name
- c9s/bbgo★ 1.7ksame name
- Pipelex/pipelex★ 951same name
- earlyaidopters/claudeclaw★ 171same name
- Kangentic/kangentic★ 154same name
- allswebtech/trouteai★ 36same name
- fathomise/MailFathom★ 22same name
- Krzysztof318/MailFathom★ 22same name
- WispAgents/wisp★ 17same name
- andy-dendy-repo/govern★ 2same name
7 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 repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-chainSkill
- add-mcp-toolSkill
- add-protocol-operationSkill
- add-venueSkill
- clean-diffSkill
- debug-failureSkill
- handle-security-reportSkill
- releaseSkill
- review-diffSkill
- review-money-pathSkill
- review-testsSkill
- run-testsSkill
- shape-commitSkill
- speed-up-testsSkill
- test-telegramSkill
- tune-ciSkill
- vet-releaseSkill
- write-adrSkill
- binference-toolsSkill
- copy-tradingSkill
- dca-planSkill
- meme-huntingSkill
- safe-swapSkill
- token-due-diligenceSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 15 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Never edit, rename or renumber a migration that has shipped.
- Very specific: line 27
Write its Postgres form under the same file name in src/migrations/<database>-postgres/ (database spec, section 6.3): times and integers …
- Distinctive: line 36
Write transactions stay synchronous: plan the async work first, reread the rows that decide, then write and commit.
- Distinctive: line 43
Run the store's contract suite and the migration runner test.
- Very specific: line 44
Run postgres-forms.postgres.test.ts, which compares both databases after each version, on BINFERENCE_TEST_POSTGRES_URL or Docker.
“Common” is measured: kept by at least 6 in 10 of the 15 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
Add a migration
Migrations are numbered, forward-only and never edited after a release. binference check --fix
runs them after it takes a backup.
1. Name the file
- The next free number, four digits, then a snake_case name:
0007_add_order_tags.ts. - Never edit, rename or renumber a migration that has shipped. A mistake is fixed by the next migration.
- There is no
downstep.
2. Write it
- One migration runs in one transaction; a failure rolls all of it back.
- Tables and columns are snake_case.
- Ids are UUIDv7 text with their type prefix (
int_,ord_,cnf_,tx_,agt_,wal_). - Times are epoch milliseconds in UTC.
- Amounts are decimal strings of base units, never integers: SQLite integers stop at 64 bits.
- The ledger is append-only. A migration never updates or deletes ledger rows.
- Raw SQL belongs in migrations and the schema bootstrap only. Queries elsewhere use Kysely.
- Write its Postgres form under the same file name in
src/migrations/<database>-postgres/(database spec, section 6.3): times and integersbigint, flagssmallintchecked to 0 or 1, amountsnumeric(78,0), JSONtextcheckedIS JSON, other textCOLLATE "C", aGLOBas a regular expression, a trigger as PL/pgSQL withSET search_path FROM CURRENT, no schema named. A write-order key takes its value fromcounters.check:storefails a migration without it.
3. Move the code with it
- The store port and its SQLite adapter change in the same commit as the migration.
- Write transactions stay synchronous: plan the async work first, reread the rows that decide, then write and commit.
- A new money column gets a contract test that round-trips 2^64 + 1.
4. Test
- The migrated-schema test sees the new table or column.
- Run the store's contract suite and the migration runner test.
- Run
postgres-forms.postgres.test.ts, which compares both databases after each version, onBINFERENCE_TEST_POSTGRES_URLor Docker. - Run
pnpm check.
5. Report
Name the migration, what it changes, and the tests that cover it. Mention it in the pull request body, since it changes every user's database on the next start.
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.

