[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GGCNB4PCQE6DXMJGY7NAJ2":3,"skill-same:01M6GGCNB4PCQE6DXMJGY7NAJ2":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6GGCNB4PCQE6DXMJGY7NAJ2","database-migration",null,"When writing, reviewing, or running a database schema migration — adding, dropping, or altering tables, columns, indexes, or constraints — with any migration tool (Alembic, Rails, Prisma, Room, Core Data, Flyway, Liquibase, raw SQL). Use before generating a migration file, or when one appears in a diff\u002FPR.","ahmadulhoq\u002Fagentskel","ahmadulhoq","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3884252?v=4","01M6GGC32SQTQ52FY4JB14FYSY","Ahmadul Hoq","01M6GGC37CJEYM63V3WEHY4Y8V",13,"MIT","https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdatabase-migration\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"database","migration","database migration","tool","with","alembic","database schema","prisma","indexes","schema","diff","use","writing","rails","data","file","core","pr","schema migration","sql","2026-11-10 10:12:30",false,"---\nname: database-migration\nlicense: MIT\ndescription: When writing, reviewing, or running a database schema migration — adding, dropping, or altering tables, columns, indexes, or constraints — with any migration tool (Alembic, Rails, Prisma, Room, Core Data, Flyway, Liquibase, raw SQL). Use before generating a migration file, or when one appears in a diff\u002FPR.\n---\n\n# Database Migration Standards\n\n## Step 1 — Identify the Migration System\n- [ ] Find the existing migration directory\u002Ftool in use (grep for `migrations\u002F`, `alembic\u002F`, `db\u002Fmigrate\u002F`, Room `@Database` version, Core Data model versions, `prisma\u002Fmigrations\u002F`).\n- [ ] Match the existing naming\u002Fordering convention exactly (timestamp prefix, sequence number, etc).\n- [ ] Never introduce a new migration tool or pattern when one is already established.\n\n## Step 2 — Reversibility\n- [ ] Every migration must have a working rollback path (`down`\u002F`revert`) unless the platform doesn't support one — state why in the migration if so.\n- [ ] Test the rollback, not just the forward migration.\n\n## Step 3 — Backward Compatibility (Zero-Downtime)\n- [ ] Assume old application code may still run against the new schema during a rolling deploy.\n- [ ] Additive first: add new columns\u002Ftables nullable or with a default; ship code that uses them; only drop\u002Frename the old ones in a *later* migration once old code is fully retired.\n- [ ] Never rename or drop a column\u002Ftable in the same migration that introduces its replacement — split across separate migrations\u002Fdeploys.\n- [ ] Treat a rename as two migrations: add new, backfill, then remove old.\n\n## Step 4 — Data Safety\n- [ ] Any destructive operation (`DROP COLUMN`, `DROP TABLE`, `TRUNCATE`, a data-losing type change) requires explicit user confirmation before applying — flag it in the plan, don't just run it.\n- [ ] Batch large-table backfills; don't lock\u002Frewrite the whole table in one transaction.\n- [ ] Add `NOT NULL` only after backfilling existing rows — never add it without a default on a populated table.\n\n## Step 5 — Performance & Locking\n- [ ] Check whether the target table is large or hot; avoid migrations that take table-level locks on production-sized tables without a concurrency-safe strategy (e.g. `CREATE INDEX CONCURRENTLY` in Postgres, online DDL tools for MySQL).\n- [ ] Index creation\u002Fremoval on hot paths must use the platform's concurrent\u002Fonline option.\n\n## Step 6 — Never Edit an Applied Migration\n- [ ] Once a migration has been merged or deployed, never edit it — write a new migration for further changes. Editing history breaks checksums and desyncs teammates' local state.\n\n## Step 7 — Verify\n- [ ] Run the migration up and down against a local\u002Ftest database before committing.\n- [ ] Confirm dependent application code is compatible with both pre- and post-migration schema state during rollout.\n\n## Common Rationalizations\n\n| Rationalization | Why it's wrong | Do this instead |\n|---|---|---|\n| \"It's a small table, I'll add NOT NULL directly\" | Even small tables can have rows that violate the constraint. | Backfill existing rows, then add the constraint. |\n| \"I'll just rename the column, it's simpler\" | Old running instances break instantly on deploy. | Add the new column, dual-write\u002Fbackfill, retire the old one in a later migration. |\n| \"No one rolls back anyway, skip the down migration\" | Rollback is the safety net for a bad deploy. | Always write and test the down migration. |\n| \"This migration already ran in prod, I'll just tweak it\" | Editing an applied migration desyncs anyone who already ran it. | Write a new migration instead. |\n| \"This destructive change is needed, I'll just run it\" | Data loss is irreversible; the user should decide. | Flag the destructive op and get explicit confirmation before running. |\n\n**Gate:** Do not generate or run a migration until Steps 1-5 have been checked for the specific change being made.\n","# Database Migration Standards\n\n## Step 1 — Identify the Migration System\n- [ ] Find the existing migration directory\u002Ftool in use (grep for `migrations\u002F`, `alembic\u002F`, `db\u002Fmigrate\u002F`, Room `@Database` version, Core Data model versions, `prisma\u002Fmigrations\u002F`).\n- [ ] Match the existing naming\u002Fordering convention exactly (timestamp prefix, sequence number, etc).\n- [ ] Never introduce a new migration tool or pattern when one is already established.\n\n## Step 2 — Reversibility\n- [ ] Every migration must have a working rollback path (`down`\u002F`revert`) unless the platform doesn't support one — state why in the migration if so.\n- [ ] Test the rollback, not just the forward migration.\n\n## Step 3 — Backward Compatibility (Zero-Downtime)\n- [ ] Assume old application code may still run against the new schema during a rolling deploy.\n- [ ] Additive first: add new columns\u002Ftables nullable or with a default; ship code that uses them; only drop\u002Frename the old ones in a *later* migration once old code is fully retired.\n- [ ] Never rename or drop a column\u002Ftable in the same migration that introduces its replacement — split across separate migrations\u002Fdeploys.\n- [ ] Treat a rename as two migrations: add new, backfill, then remove old.\n\n## Step 4 — Data Safety\n- [ ] Any destructive operation (`DROP COLUMN`, `DROP TABLE`, `TRUNCATE`, a data-losing type change) requires explicit user confirmation before applying — flag it in the plan, don't just run it.\n- [ ] Batch large-table backfills; don't lock\u002Frewrite the whole table in one transaction.\n- [ ] Add `NOT NULL` only after backfilling existing rows — never add it without a default on a populated table.\n\n## Step 5 — Performance & Locking\n- [ ] Check whether the target table is large or hot; avoid migrations that take table-level locks on production-sized tables without a concurrency-safe strategy (e.g. `CREATE INDEX CONCURRENTLY` in Postgres, online DDL tools for MySQL).\n- [ ] Index creation\u002Fremoval on hot paths must use the platform's concurrent\u002Fonline option.\n\n## Step 6 — Never Edit an Applied Migration\n- [ ] Once a migration has been merged or deployed, never edit it — write a new migration for further changes. Editing history breaks checksums and desyncs teammates' local state.\n\n## Step 7 — Verify\n- [ ] Run the migration up and down against a local\u002Ftest database before committing.\n- [ ] Confirm dependent application code is compatible with both pre- and post-migration schema state during rollout.\n\n## Common Rationalizations\n\n| Rationalization | Why it's wrong | Do this instead |\n|---|---|---|\n| \"It's a small table, I'll add NOT NULL directly\" | Even small tables can have rows that violate the constraint. | Backfill existing rows, then add the constraint. |\n| \"I'll just rename the column, it's simpler\" | Old running instances break instantly on deploy. | Add the new column, dual-write\u002Fbackfill, retire the old one in a later migration. |\n| \"No one rolls back anyway, skip the down migration\" | Rollback is the safety net for a bad deploy. | Always write and test the down migration. |\n| \"This migration already ran in prod, I'll just tweak it\" | Editing an applied migration desyncs anyone who already ran it. | Write a new migration instead. |\n| \"This destructive change is needed, I'll just run it\" | Data loss is irreversible; the user should decide. | Flag the destructive op and get explicit confirmation before running. |\n\n**Gate:** Do not generate or run a migration until Steps 1-5 have been checked for the specific change being made.\n",{"name":5,"license":15,"description":7},"main","d94c109a4fad51623dc6048315860e53b32673fb",".agents\u002Fskills\u002Fdatabase-migration",3,"https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel","https:\u002F\u002Fgithub.com\u002Fahmadulhoq","2026-11-07 00:53:22",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add ahmadulhoq\u002Fagentskel --skill database-migration",{"tool":67,"command":68},"bunx","bunx skills add ahmadulhoq\u002Fagentskel --skill database-migration",{"tool":70,"command":71},"pnpm","pnpm dlx skills add ahmadulhoq\u002Fagentskel --skill database-migration","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdatabase-migration\u002FSKILL.md",true,[],[76,95,121,144,169,183],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":49},"01M6GGSN2D57Y8BR50X08Y695H","setup-project","When setting up agentskel on a new project that does not yet have .memory\u002F or .agents\u002F. Use when the user says \"set up agentskel\", \"install agentskel\", or \"add agent memory to this project\".","https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel\u002Fblob\u002Fmain\u002Fskills\u002Fsetup-project\u002FSKILL.md",[],[83,84,85,86,87,88,40,89,90,91,92,93,94],"setup project","project","setup","memory","add","up","install","add agent","user","new project","SET","agent memory",{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":49},"01M6GGSJ6HD2DFVZQTESJ81GYM","using-git-worktrees","When running long feature implementations, parallel branch work, or build\u002Ftest scripts that must not interfere with the user's active working directory. Creates isolated execution environments via git worktrees in sibling directories.","https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel\u002Fblob\u002Fmain\u002Froles\u002Fdev\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[102,103,104,105,106,107,108,109,110,111,112,113,114,33,115,116,117,118,119,120],"git worktrees","worktrees","git","using git worktrees","Using git","test","directory","execution","parallel","work","branch","directories","environments","via","long","scripts","feature","active","build",{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":130,"publishedAt":49},"01M6GGSCFPK7MDSZH96XTNZR9B","test-engineer","When designing test strategy, analysing coverage, or writing tests outside the TDD cycle. Also use when working with CI pipelines or validating changes end-to-end.","https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel\u002Fblob\u002Fmain\u002Froles\u002Fdev\u002Fskills\u002Ftest-engineer\u002FSKILL.md",[127],{"categoryNo":128,"categoryName":129,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[131,132,107,133,134,135,136,137,138,40,139,33,140,141,142,41,143],"test engineer","engineer","tests","tdd cycle","cycle","end","test strategy","pipelines","tdd","strategy","ci","writing tests","coverage",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":154,"publishedAt":49},"01M6GGS8YA9XZB6DWV22JC0YTB","test-driven-development","When implementing logic changes during develop-feature or implement-task. Use the Red-Green-Refactor cycle to write a failing test before any production code.","https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel\u002Fblob\u002Fmain\u002Froles\u002Fdev\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[150,153],{"categoryNo":151,"categoryName":152,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",{"categoryNo":128,"categoryName":129,"taxonomyType":21,"taxonomyTypeDesc":22},[155,156,107,157,158,159,118,160,161,135,162,40,163,164,165,166,167,168],"development","test driven development","driven","task","red","logic","green","red-green-refactor","write","develop","refactor","Production","code","implement",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":49},"01M6GGS61D41ZJG4D8XAS97H62","task-planner","When decomposing a feature or spec into implementable subtasks, estimating scope, or orchestrating multi-step work across subagents.","https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel\u002Fblob\u002Fmain\u002Froles\u002Fdev\u002Fskills\u002Ftask-planner\u002FSKILL.md",[],[176,158,177,118,178,179,111,180,181,182],"task planner","planner","across","subagents","spec","scope","multi",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":189,"publishedAt":49},"01M6GGS30NJW4Q7QN4KVT0CV08","systematic-debugger","When applying debugging techniques during any investigation — root cause tracing, bisect, defense-in-depth. Enforces hypothesis-first analysis and prohibits guess-and-check changes. Use standalone or inside the debug-issue workflow.","https:\u002F\u002Fgithub.com\u002Fahmadulhoq\u002Fagentskel\u002Fblob\u002Fmain\u002Froles\u002Fdev\u002Fskills\u002Fsystematic-debugger\u002FSKILL.md",[],[190,191,192,193,194,195,196,197,40,198,199,200,201,202,203,204,205,206,207,208],"systematic debugger","systematic","debugger","check","standalone","root","issue workflow","issue","bisect","investigation","analysis","first","defense","hypothesis","defense-in-depth","tracing","debugging","debug","workflow"]