add-migration
Skill2 starsChanged 32 days agoMITView on GitHub
Creates, reviews and verifies an EF Core migration for Govern after model changes (entities or configurations). Use when the EF model changed, the user asks for a migration, or tests fail with pending model changes.
13 other projects use a version of this.
Adopted by
Most recently taken up by
- Krzysztof318/MailFathomtheir own version, first seen Nov 15, 2026
- Kangentic/kangentictheir own version, first seen Nov 7, 2026
- Adham-Aly/quartermastertheir own version, first seen Nov 1, 2026
- Adham-Aly/implement-looptheir own version, first seen Nov 1, 2026
- fathomise/MailFathomtheir own version, first seen Oct 13, 2026
- chriswestt/claude-skillstheir own version, first seen Oct 9, 2026
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- OpenAEV-Platform/openaev★ 1.8ksame name
- c9s/bbgo★ 1.7ksame name
- Pipelex/pipelex★ 951same name
- earlyaidopters/claudeclaw★ 171same name
- Kangentic/kangentic★ 142same name
- fathomise/MailFathom★ 21same name
- Krzysztof318/MailFathom★ 21same name
- Adham-Aly/implement-loop★ 1same name
- Adham-Aly/quartermaster★ 1same name
- g-baskin/claudeclaw-os★ 1same name
3 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 repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-entitySkill
- add-infra-concernSkill
- add-use-caseSkill
- develop-featureSkill
- outdated-packagesSkill
- verifySkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
0
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
- Very specific: line 20
If user-secrets are configured for src/Govern.Api, the environment variables are not needed.
“Common” is measured: kept by at least 6 in 10 of the 12 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
1. Generate
Name the migration in PascalCase after what it does (AddOrders, AddUserDisplayName). No database connection is needed, but the host must build:
dotnet tool restore
ConnectionStrings__Govern="Host=localhost;Database=govern;Username=postgres;Password=unused" \
Jwt__SigningKey="design-time-only-key-not-a-secret-000000" \
dotnet ef migrations add <Name> --project src/Govern.Infrastructure --startup-project src/Govern.Api --output-dir Persistence/MigrationsIf user-secrets are configured for src/Govern.Api, the environment variables are not needed.
2. Review the generated Up/Down
- Data loss:
DropColumnorDropTablewhere you meant a rename. Fix the model (EF can't guess renames): remove the migration and hand the rename to EF withRenameColumnin a fresh migration only when necessary. Never edit the*.Designer.csor the snapshot (a hook blocks it). - New non-nullable columns on existing tables: need a default or a backfill.
- Checks:
- indexes for new foreign keys and unique business keys
DownreversesUp- snake_case names generated by convention, not hard-coded
- Undo a wrong migration:
dotnet ef migrations remove --project src/Govern.Infrastructure --startup-project src/Govern.Api. This only works while it hasn't been applied anywhere shared.
3. Verify
dotnet build Govern.slnx.dotnet test Govern.slnx. Integration tests apply all migrations to a fresh Postgres container at startup, so a broken migration fails there.- Optionally apply to the local database: run the Api (it migrates on startup) and inspect with the
postgresMCP, read-only. - For non-trivial schema changes, run the
ef-core-specialistagent.
4. Deploy note
Production applies migrations at startup (DatabaseMigrationService). For destructive or long-running changes, plan an expand/contract sequence across releases and document it in the PR.
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.

