[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78CYP7QMDSZBCVVX83CFVEN":3,"skill-same:01M78CYP7QMDSZBCVVX83CFVEN":63},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":52},"01M78CYP7QMDSZBCVVX83CFVEN","migration-check",null,"Validate SQL migration safety, ORM-to-migration alignment, or schema drift between the DB and Zod\u002FDTO types. NOT for deployment config (use deployment) or IaC drift (use infrastructure-as-code).","atretyak1985\u002Fswarmery","atretyak1985","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1436737?v=4","01M78CTSX57YH0EYY9YGH0TWKX","Andrii Tretiak","01M78CTSXRPJPYQ7GNPMP45TYX",8,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fcore\u002Fskills\u002Fmigration-check\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: migration-check\ndescription: \"Validate SQL migration safety, ORM-to-migration alignment, or schema drift between the DB and Zod\u002FDTO types. NOT for deployment config (use deployment) or IaC drift (use infrastructure-as-code).\"\nversion: \"1.0.0\"\nowner: \"swarmery-core\"\ndisable-model-invocation: true\nallowed-tools: Read, Grep, Glob, Bash\ndocs:\n  status: reviewed\n  source_sha: 5fd5a0178153\n  updated: 2026-08-06\n---\n\n# Purpose\n\nValidate migration safety and schema consistency for the project's PostgreSQL database: check migration SQL files for safety issues and verify alignment between the migration-managed schema, the main app's ORM schema (`apps\u002F\u003CmainApp>\u002Fsrc\u002Flib\u002Fdb\u002Fschema.ts`), and the Zod\u002FDTO validation types in route handlers. Examples use Flyway-style migrations and Drizzle ORM — adapt to the project's actual tools (project.json -> `stack.db`).\n\n# Rules\n\n- Discover migration files from disk (`ls` the migrations directory) — never rely on a static \"known migrations\" table.\n- Never suggest modifying an already-applied migration — create a new migration instead.\n- Never approve a migration adding NOT NULL without DEFAULT on a table with existing data; large-table indexes need `CREATE INDEX CONCURRENTLY`.\n- Use \"Zod\u002FDTO\" terminology in reports, never \"Java Entity\" (unless the project actually has Java services).\n- Never mix DDL and DML in one migration file.\n- STOP and escalate on: `DROP TABLE`\u002F`TRUNCATE` against a production table, an ORM schema missing or 5+ columns out of sync, or a `FAILED` (partially applied) migration.\n\n# Resources\n\n- Read `resources\u002Fsafety-checks-and-procedure.md` when reviewing migrations — the five-step procedure, eight safety checks, inputs\u002Foutputs, self-check, escalation, failure modes, related skills.\n- Read `resources\u002Fworked-examples.md` when writing the report — a full safety-review example (with idempotency fix) and the Migration Report template with the alignment table.\n\n# How to use\n\n## What it does\n\nReviews database migrations before they cause an incident: checks each SQL file for the things that break deploys (irreversibility, destructive statements, locking index builds, `NOT NULL` without default, bad naming, missing idempotency guards), then compares what migrations create against the ORM schema and Zod\u002FDTO types. One report covers migration safety and layer drift.\n\n## When to use it\n\n- A new migration file needs a safety verdict before it is applied.\n- You changed the schema and want the ORM definitions confirmed against the SQL.\n- A release checklist calls for a pre-deploy migration review.\n- Not for deploying (the project's infra pack skills), IaC drift (`infrastructure-as-code`), field-level contract tracing (`api-contract`), or pod health (`troubleshooting`).\n\n## How to invoke\n\n```\nSkill(skill: \"core:migration-check\")\n```\n\nInputs: `migration_file` (optional — omit to sweep the directory) and `scope` (`safety-check`, `schema-alignment`, or `full-audit`). Output is a markdown Migration Report — max 60 lines for `safety-check`, 120 for `full-audit`. Read-only: nothing is applied or modified.\n\n## Worked example\n\n```\nSkill(skill: \"core:migration-check\")\nReview V1.0.4__add_order_status.sql before I apply it — scope: safety-check\n```\n\nThe skill lists the migrations directory from disk, reads the file, runs the checks, and reports: reversible YES, no destructive operations, index uses `CONCURRENTLY`, `NOT NULL` carries a `DEFAULT` — and one PARTIAL: the index is guarded with `IF NOT EXISTS` but the `ADD COLUMN` is not. You get the corrected line to paste back.\n","# Purpose\n\nValidate migration safety and schema consistency for the project's PostgreSQL database: check migration SQL files for safety issues and verify alignment between the migration-managed schema, the main app's ORM schema (`apps\u002F\u003CmainApp>\u002Fsrc\u002Flib\u002Fdb\u002Fschema.ts`), and the Zod\u002FDTO validation types in route handlers. Examples use Flyway-style migrations and Drizzle ORM — adapt to the project's actual tools (project.json -> `stack.db`).\n\n# Rules\n\n- Discover migration files from disk (`ls` the migrations directory) — never rely on a static \"known migrations\" table.\n- Never suggest modifying an already-applied migration — create a new migration instead.\n- Never approve a migration adding NOT NULL without DEFAULT on a table with existing data; large-table indexes need `CREATE INDEX CONCURRENTLY`.\n- Use \"Zod\u002FDTO\" terminology in reports, never \"Java Entity\" (unless the project actually has Java services).\n- Never mix DDL and DML in one migration file.\n- STOP and escalate on: `DROP TABLE`\u002F`TRUNCATE` against a production table, an ORM schema missing or 5+ columns out of sync, or a `FAILED` (partially applied) migration.\n\n# Resources\n\n- Read `resources\u002Fsafety-checks-and-procedure.md` when reviewing migrations — the five-step procedure, eight safety checks, inputs\u002Foutputs, self-check, escalation, failure modes, related skills.\n- Read `resources\u002Fworked-examples.md` when writing the report — a full safety-review example (with idempotency fix) and the Migration Report template with the alignment table.\n\n# How to use\n\n## What it does\n\nReviews database migrations before they cause an incident: checks each SQL file for the things that break deploys (irreversibility, destructive statements, locking index builds, `NOT NULL` without default, bad naming, missing idempotency guards), then compares what migrations create against the ORM schema and Zod\u002FDTO types. One report covers migration safety and layer drift.\n\n## When to use it\n\n- A new migration file needs a safety verdict before it is applied.\n- You changed the schema and want the ORM definitions confirmed against the SQL.\n- A release checklist calls for a pre-deploy migration review.\n- Not for deploying (the project's infra pack skills), IaC drift (`infrastructure-as-code`), field-level contract tracing (`api-contract`), or pod health (`troubleshooting`).\n\n## How to invoke\n\n```\nSkill(skill: \"core:migration-check\")\n```\n\nInputs: `migration_file` (optional — omit to sweep the directory) and `scope` (`safety-check`, `schema-alignment`, or `full-audit`). Output is a markdown Migration Report — max 60 lines for `safety-check`, 120 for `full-audit`. Read-only: nothing is applied or modified.\n\n## Worked example\n\n```\nSkill(skill: \"core:migration-check\")\nReview V1.0.4__add_order_status.sql before I apply it — scope: safety-check\n```\n\nThe skill lists the migrations directory from disk, reads the file, runs the checks, and reports: reversible YES, no destructive operations, index uses `CONCURRENTLY`, `NOT NULL` carries a `DEFAULT` — and one PARTIAL: the index is guarded with `IF NOT EXISTS` but the `ADD COLUMN` is not. You get the corrected line to paste back.\n",{"docs":24,"name":5,"owner":28,"version":29,"description":7,"allowed-tools":30,"disable-model-invocation":31},{"status":25,"updated":26,"source_sha":27},"reviewed",1785974400000,"5fd5a0178153","swarmery-core","1.0.0","Read, Grep, Glob, Bash",true,"main","2d9e918cc79c9b17b59356780ff0a3da38a3e98a","plugins\u002Fcore\u002Fskills\u002Fmigration-check",5,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery","https:\u002F\u002Fatretyak1985.github.io\u002Fswarmery\u002F","https:\u002F\u002Fgithub.com\u002Fatretyak1985","2026-11-11 04:29:12",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":31},[42,45,48],{"tool":43,"command":44},"npx","npx skills add atretyak1985\u002Fswarmery --skill migration-check",{"tool":46,"command":47},"bunx","bunx skills add atretyak1985\u002Fswarmery --skill migration-check",{"tool":49,"command":50},"pnpm","pnpm dlx skills add atretyak1985\u002Fswarmery --skill migration-check","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fcore\u002Fskills\u002Fmigration-check\u002FSKILL.md",[53,59],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"resources\u002Fsafety-checks-and-procedure.md","REFERENCE","参考文档",6629,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fcore\u002Fskills\u002Fmigration-check\u002Fresources\u002Fsafety-checks-and-procedure.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"resources\u002Fworked-examples.md",1705,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fcore\u002Fskills\u002Fmigration-check\u002Fresources\u002Fworked-examples.md",[64,71,77,84,91,98],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M78D4T1FFWFW19Z44AHH5BSY","short-desc","Too short.","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fshort-desc\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M78D4S0TWT42WXFJHC1DBN0R","no-frontmatter","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fno-frontmatter\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M78D4Q14P8DJ4W78N62F3EG2","global-skill","Fixture global skill (minimal user-scope shape, format doc §2.3).","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fglobal-skill\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M78D4N1JHGQJQ7EZ43KY5SV3","documented-skill","Fixture skill whose usage guide deliberately omits the Worked example subsection.","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fskills\u002Fdocumented-skill\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M78D4KVNZ03GBKGDFJZWW5FJ","z","NOT auto-discovered — only skills\u002F is scanned for plugins (§2.2).","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fplugins\u002Fcache\u002Fmkt\u002Ftoolpack\u002F1.0.0\u002Fworkflow-skills\u002Fz\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M78D4JMBRZWK51HFE5RZJGHC","y","Plugin skill y from toolpack — stored as \"toolpack:y\".","https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Ftools\u002Fswarmery\u002Ftestdata\u002Fsysconfig\u002Fclaude\u002Fplugins\u002Fcache\u002Fmkt\u002Ftoolpack\u002F1.0.0\u002Fskills\u002Fy\u002FSKILL.md",[],[]]