[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78CWSZN62APDH546TSXBWMS":3,"skill-same:01M78CWSZN62APDH546TSXBWMS":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},"01M78CWSZN62APDH546TSXBWMS","api-contract",null,"Verify field-level alignment between ORM schema, Zod schemas, and route handler shapes, or that SQL migrations match ORM tables. NOT for writing new routes (use api-integration) or code style (use code-standards).","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\u002Fapi-contract\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: api-contract\ndescription: \"Verify field-level alignment between ORM schema, Zod schemas, and route handler shapes, or that SQL migrations match ORM tables. NOT for writing new routes (use api-integration) or code style (use code-standards).\"\nversion: \"1.0.0\"\nowner: \"swarmery-core\"\nallowed-tools: Read, Grep, Glob\ndisable-model-invocation: true\ndocs:\n  status: reviewed\n  source_sha: 863955755827\n  updated: 2026-08-06\n---\n\n# Purpose\n\nDetects field-name, type, and nullable\u002Foptional mismatches across the layers defining an API entity: the ORM schema (`apps\u002F\u003CmainApp>\u002Fsrc\u002Flib\u002Fdb\u002Fschema.ts`), the Zod schema, the route handler's JSON response, and the SQL migrations in the infrastructure repo. Examples use Drizzle and Flyway-style migrations — adapt to the project's stack (project.json -> `stack.db`). Read-only: fixes go to `@implementation-agent` or a developer.\n\n# Rules (never violate)\n\n- Read-only skill (Read, Grep, Glob) — never auto-fix a mismatch; refuse if asked.\n- Every finding cites `file:line` and carries a severity; findings below 80% confidence are marked `[LOW-CONFIDENCE]`.\n- The report contains zero placeholder text and ends with `CONTRACT-ISSUES: {entity} | CRITICAL: {n} | HIGH: {n} | MEDIUM: {n} | LOW: {n}`.\n- A field name that *differs between layers* is this skill's job; a naming *convention* preference belongs to `code-standards`.\n- Do not flag Zod `.optional()` vs ORM `.default()`, migration-tool bookkeeping tables, or vendored\u002Fgenerated files; wire-protocol fields keep UPPER_SNAKE_CASE.\n- Stop and ask on an ORM type with no Zod equivalent, or >10 Critical findings in one entity.\n\n# Resources\n\n- Read `resources\u002Fverification-procedure.md` when running a check — the 7-step procedure, output template, severity criteria, self-check, escalation, and failure modes.\n- Read `resources\u002Fworked-example-device.md` when you need a full end-to-end example with real code across all four layers.\n\n# How to use\n\n## What it does\n\nChecks that one API entity means the same thing in every layer: it reads the ORM table, the Zod schema, the route handler's JSON response, and the SQL migration, then compares them field by field and reports every mismatch with a `file:line` citation, a severity, and a suggested fix. It never edits code.\n\n## When to use it\n\n- You added, renamed, or retyped an ORM column and want to know what drifted.\n- You changed a route handler's response shape or wrote a new Zod schema.\n- A SQL migration landed and the ORM table definition needs verification.\n\nNot for writing routes (`api-integration`), convention review (`code-standards`), or complexity audits (`code-quality`).\n\n## How to invoke\n\n```\nSkill(skill: \"core:api-contract\")\n```\n\nPass `entity` (e.g. `order-line-item`) and `scope` (`single-entity` or `full-scan`); the skill locates the four sources itself — no file paths needed.\n\n## Worked example\n\n```\nSkill(skill: \"core:api-contract\")\nentity: order-line-item, scope: single-entity\n```\n\nThe skill compares the `order_line_item` table, its Zod schema, the route handler, and the migration. It finds Zod declares `productId` while ORM and SQL use `product_id`, plus raw ORM output with no validation — three cited findings, closing with `CONTRACT-ISSUES: order-line-item | CRITICAL: 0 | HIGH: 0 | MEDIUM: 2 | LOW: 1`.\n\n## Related\n\n- `api-integration` — building the route; `code-standards` — conventions; `code-quality` — complexity audits.\n","# Purpose\n\nDetects field-name, type, and nullable\u002Foptional mismatches across the layers defining an API entity: the ORM schema (`apps\u002F\u003CmainApp>\u002Fsrc\u002Flib\u002Fdb\u002Fschema.ts`), the Zod schema, the route handler's JSON response, and the SQL migrations in the infrastructure repo. Examples use Drizzle and Flyway-style migrations — adapt to the project's stack (project.json -> `stack.db`). Read-only: fixes go to `@implementation-agent` or a developer.\n\n# Rules (never violate)\n\n- Read-only skill (Read, Grep, Glob) — never auto-fix a mismatch; refuse if asked.\n- Every finding cites `file:line` and carries a severity; findings below 80% confidence are marked `[LOW-CONFIDENCE]`.\n- The report contains zero placeholder text and ends with `CONTRACT-ISSUES: {entity} | CRITICAL: {n} | HIGH: {n} | MEDIUM: {n} | LOW: {n}`.\n- A field name that *differs between layers* is this skill's job; a naming *convention* preference belongs to `code-standards`.\n- Do not flag Zod `.optional()` vs ORM `.default()`, migration-tool bookkeeping tables, or vendored\u002Fgenerated files; wire-protocol fields keep UPPER_SNAKE_CASE.\n- Stop and ask on an ORM type with no Zod equivalent, or >10 Critical findings in one entity.\n\n# Resources\n\n- Read `resources\u002Fverification-procedure.md` when running a check — the 7-step procedure, output template, severity criteria, self-check, escalation, and failure modes.\n- Read `resources\u002Fworked-example-device.md` when you need a full end-to-end example with real code across all four layers.\n\n# How to use\n\n## What it does\n\nChecks that one API entity means the same thing in every layer: it reads the ORM table, the Zod schema, the route handler's JSON response, and the SQL migration, then compares them field by field and reports every mismatch with a `file:line` citation, a severity, and a suggested fix. It never edits code.\n\n## When to use it\n\n- You added, renamed, or retyped an ORM column and want to know what drifted.\n- You changed a route handler's response shape or wrote a new Zod schema.\n- A SQL migration landed and the ORM table definition needs verification.\n\nNot for writing routes (`api-integration`), convention review (`code-standards`), or complexity audits (`code-quality`).\n\n## How to invoke\n\n```\nSkill(skill: \"core:api-contract\")\n```\n\nPass `entity` (e.g. `order-line-item`) and `scope` (`single-entity` or `full-scan`); the skill locates the four sources itself — no file paths needed.\n\n## Worked example\n\n```\nSkill(skill: \"core:api-contract\")\nentity: order-line-item, scope: single-entity\n```\n\nThe skill compares the `order_line_item` table, its Zod schema, the route handler, and the migration. It finds Zod declares `productId` while ORM and SQL use `product_id`, plus raw ORM output with no validation — three cited findings, closing with `CONTRACT-ISSUES: order-line-item | CRITICAL: 0 | HIGH: 0 | MEDIUM: 2 | LOW: 1`.\n\n## Related\n\n- `api-integration` — building the route; `code-standards` — conventions; `code-quality` — complexity audits.\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,863955755827,"swarmery-core","1.0.0","Read, Grep, Glob",true,"main","2d9e918cc79c9b17b59356780ff0a3da38a3e98a","plugins\u002Fcore\u002Fskills\u002Fapi-contract",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 api-contract",{"tool":46,"command":47},"bunx","bunx skills add atretyak1985\u002Fswarmery --skill api-contract",{"tool":49,"command":50},"pnpm","pnpm dlx skills add atretyak1985\u002Fswarmery --skill api-contract","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fcore\u002Fskills\u002Fapi-contract\u002FSKILL.md",[53,59],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"resources\u002Fverification-procedure.md","REFERENCE","参考文档",8503,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fcore\u002Fskills\u002Fapi-contract\u002Fresources\u002Fverification-procedure.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"resources\u002Fworked-example-device.md",2620,"https:\u002F\u002Fgithub.com\u002Fatretyak1985\u002Fswarmery\u002Fblob\u002Fmain\u002Fplugins\u002Fcore\u002Fskills\u002Fapi-contract\u002Fresources\u002Fworked-example-device.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",[],[]]