[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FAMR0N82269FGEZDCSXHDM":3,"skill-same:01M6FAMR0N82269FGEZDCSXHDM":87},{"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":31,"publishedAt":52,"linkOnly":53,"markdownContent":54,"markdownBody":55,"frontMatter":56,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":69,"ownerHtmlUrl":70,"ownerBlogUrl":6,"ownerDescription":71,"updatedAt":72,"install":73,"resources":86},"01M6FAMR0N82269FGEZDCSXHDM","generating-api-contracts",null,"Generate API contracts and OpenAPI specifications from code or design documents.\nUse when documenting API contracts and specifications.\nTrigger with phrases like \"generate API contract\", \"create OpenAPI spec\", or \"document API contract\".","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fgenerating-api-contracts\u002FSKILL.md",[18,23,28],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",{"categoryNo":29,"categoryName":30,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000037","律师与法务",[32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],"api","contracts","generating api contracts","use","specifications","with","trigger","io","contract","api contract","document","design","read","Bash","openapi","code","generate","create","documents","codex","2026-11-10 10:12:30",false,"---\nname: generating-api-contracts\ndescription: |\n  Generate API contracts and OpenAPI specifications from code or design documents.\n  Use when documenting API contracts and specifications.\n  Trigger with phrases like \"generate API contract\", \"create OpenAPI spec\", or \"document API contract\".\n  \nallowed-tools: Read, Write, Edit, Grep, Glob, Bash(api:contract-*)\nversion: 1.0.0\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\nlicense: MIT\ncompatible-with: claude-code, codex, openclaw\ntags: [api, api-contracts]\n\n---\n# Generating API Contracts\n\n## Overview\n\nGenerate OpenAPI 3.0\u002F3.1 specifications and consumer-driven contract tests from existing API implementations, design documents, or database schemas. Produce machine-readable contracts that serve as the single source of truth for code generation, documentation, testing, and gateway configuration, with Pact integration for consumer-driven contract verification.\n\n## Prerequisites\n\n- API implementation with route definitions and handler logic, or design requirements document\n- OpenAPI authoring tool: Swagger Editor, Stoplight Studio, or IDE with OpenAPI extension\n- Consumer-driven contract framework: Pact (polyglot), Spring Cloud Contract (Java), or Dredd (generic)\n- Schema validation tool: Spectral for OpenAPI linting\n- Version control for contract files with diff-based review process\n\n## Instructions\n\n1. Scan existing route handlers and controller files using Grep and Read to extract all endpoint paths, HTTP methods, request parameter names\u002Ftypes, and response body shapes.\n2. Generate OpenAPI 3.0 specification from the extracted data, including `info` (title, version, description), `servers` (environment URLs), `paths` (operations), and `components` (reusable schemas).\n3. Define request schemas with field-level constraints: `type`, `format`, `required`, `minimum\u002Fmaximum`, `pattern` (regex), `enum`, and `example` values for every property.\n4. Document all response status codes per endpoint with separate schemas: 200\u002F201 for success, 400 for validation errors (with field-level error array), 401\u002F403 for auth failures, and 404\u002F500.\n5. Add security scheme definitions (`bearerAuth`, `apiKey`, `oauth2`) and apply them to appropriate operations using the `security` field.\n6. Create Pact consumer contract tests that capture expected interactions from the API consumer perspective, defining expected request\u002Fresponse pairs per endpoint.\n7. Set up provider verification that replays Pact interactions against the actual API implementation, verifying the provider satisfies all consumer expectations.\n8. Generate contract artifacts: OpenAPI spec file, Postman collection, and consumer contract (Pact JSON), all versioned alongside the API source code.\n\nSee `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fimplementation.md` for the full implementation guide.\n\n## Output\n\n- `${CLAUDE_SKILL_DIR}\u002Fopenapi.yaml` - Complete OpenAPI 3.0\u002F3.1 specification\n- `${CLAUDE_SKILL_DIR}\u002Fcontracts\u002Fpact\u002F` - Consumer-driven contract definitions (Pact JSON)\n- `${CLAUDE_SKILL_DIR}\u002Fcontracts\u002Fpostman\u002F` - Generated Postman collection for API testing\n- `${CLAUDE_SKILL_DIR}\u002Ftests\u002Fcontract\u002Fconsumer\u002F` - Consumer contract test implementations\n- `${CLAUDE_SKILL_DIR}\u002Ftests\u002Fcontract\u002Fprovider\u002F` - Provider verification test suite\n- `${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fgenerate-contract.sh` - Contract generation automation script\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Spec-code divergence | API implementation changed without updating the OpenAPI spec | Add CI check that generates spec from code and diffs against committed spec |\n| Pact verification failure | Provider response does not match consumer expectation | Review consumer contract for correctness; update provider if contract is valid |\n| Missing operation ID | Endpoint has no `operationId`, preventing code generation | Generate deterministic operation IDs from method + path (e.g., `getUsers`, `createUser`) |\n| Circular schema reference | Components reference each other creating infinite recursion | Break cycles with `allOf` composition or introduce intermediate types |\n| Example\u002Fschema mismatch | Example values do not validate against their own schema | Auto-validate all examples during spec generation; reject mismatched examples |\n\nRefer to `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferrors.md` for comprehensive error patterns.\n\n## Examples\n\n**Code-first OpenAPI generation**: Scan Express route decorators and Zod validation schemas to auto-generate a complete OpenAPI 3.1 spec with accurate request\u002Fresponse schemas, examples, and descriptions.\n\n**Consumer-driven contract testing**: Frontend team publishes Pact contracts defining the API interactions they depend on; backend CI verifies every contract on each deployment, preventing breaking changes.\n\n**Design-first workflow**: Author OpenAPI spec in Stoplight Studio, generate server stubs and client SDKs from the spec, then implement business logic in the stubs -- spec stays as the single source of truth.\n\nSee `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fexamples.md` for additional examples.\n\n## Resources\n\n- OpenAPI Specification 3.1: https:\u002F\u002Fspec.openapis.org\u002Foas\u002Fv3.1.0\n- Pact contract testing: https:\u002F\u002Fpact.io\u002F\n- Swagger Editor: https:\u002F\u002Feditor.swagger.io\u002F\n- Dredd API contract testing: https:\u002F\u002Fdredd.org\u002F\n","# Generating API Contracts\n\n## Overview\n\nGenerate OpenAPI 3.0\u002F3.1 specifications and consumer-driven contract tests from existing API implementations, design documents, or database schemas. Produce machine-readable contracts that serve as the single source of truth for code generation, documentation, testing, and gateway configuration, with Pact integration for consumer-driven contract verification.\n\n## Prerequisites\n\n- API implementation with route definitions and handler logic, or design requirements document\n- OpenAPI authoring tool: Swagger Editor, Stoplight Studio, or IDE with OpenAPI extension\n- Consumer-driven contract framework: Pact (polyglot), Spring Cloud Contract (Java), or Dredd (generic)\n- Schema validation tool: Spectral for OpenAPI linting\n- Version control for contract files with diff-based review process\n\n## Instructions\n\n1. Scan existing route handlers and controller files using Grep and Read to extract all endpoint paths, HTTP methods, request parameter names\u002Ftypes, and response body shapes.\n2. Generate OpenAPI 3.0 specification from the extracted data, including `info` (title, version, description), `servers` (environment URLs), `paths` (operations), and `components` (reusable schemas).\n3. Define request schemas with field-level constraints: `type`, `format`, `required`, `minimum\u002Fmaximum`, `pattern` (regex), `enum`, and `example` values for every property.\n4. Document all response status codes per endpoint with separate schemas: 200\u002F201 for success, 400 for validation errors (with field-level error array), 401\u002F403 for auth failures, and 404\u002F500.\n5. Add security scheme definitions (`bearerAuth`, `apiKey`, `oauth2`) and apply them to appropriate operations using the `security` field.\n6. Create Pact consumer contract tests that capture expected interactions from the API consumer perspective, defining expected request\u002Fresponse pairs per endpoint.\n7. Set up provider verification that replays Pact interactions against the actual API implementation, verifying the provider satisfies all consumer expectations.\n8. Generate contract artifacts: OpenAPI spec file, Postman collection, and consumer contract (Pact JSON), all versioned alongside the API source code.\n\nSee `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fimplementation.md` for the full implementation guide.\n\n## Output\n\n- `${CLAUDE_SKILL_DIR}\u002Fopenapi.yaml` - Complete OpenAPI 3.0\u002F3.1 specification\n- `${CLAUDE_SKILL_DIR}\u002Fcontracts\u002Fpact\u002F` - Consumer-driven contract definitions (Pact JSON)\n- `${CLAUDE_SKILL_DIR}\u002Fcontracts\u002Fpostman\u002F` - Generated Postman collection for API testing\n- `${CLAUDE_SKILL_DIR}\u002Ftests\u002Fcontract\u002Fconsumer\u002F` - Consumer contract test implementations\n- `${CLAUDE_SKILL_DIR}\u002Ftests\u002Fcontract\u002Fprovider\u002F` - Provider verification test suite\n- `${CLAUDE_SKILL_DIR}\u002Fscripts\u002Fgenerate-contract.sh` - Contract generation automation script\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Spec-code divergence | API implementation changed without updating the OpenAPI spec | Add CI check that generates spec from code and diffs against committed spec |\n| Pact verification failure | Provider response does not match consumer expectation | Review consumer contract for correctness; update provider if contract is valid |\n| Missing operation ID | Endpoint has no `operationId`, preventing code generation | Generate deterministic operation IDs from method + path (e.g., `getUsers`, `createUser`) |\n| Circular schema reference | Components reference each other creating infinite recursion | Break cycles with `allOf` composition or introduce intermediate types |\n| Example\u002Fschema mismatch | Example values do not validate against their own schema | Auto-validate all examples during spec generation; reject mismatched examples |\n\nRefer to `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferrors.md` for comprehensive error patterns.\n\n## Examples\n\n**Code-first OpenAPI generation**: Scan Express route decorators and Zod validation schemas to auto-generate a complete OpenAPI 3.1 spec with accurate request\u002Fresponse schemas, examples, and descriptions.\n\n**Consumer-driven contract testing**: Frontend team publishes Pact contracts defining the API interactions they depend on; backend CI verifies every contract on each deployment, preventing breaking changes.\n\n**Design-first workflow**: Author OpenAPI spec in Stoplight Studio, generate server stubs and client SDKs from the spec, then implement business logic in the stubs -- spec stays as the single source of truth.\n\nSee `${CLAUDE_SKILL_DIR}\u002Freferences\u002Fexamples.md` for additional examples.\n\n## Resources\n\n- OpenAPI Specification 3.1: https:\u002F\u002Fspec.openapis.org\u002Foas\u002Fv3.1.0\n- Pact contract testing: https:\u002F\u002Fpact.io\u002F\n- Swagger Editor: https:\u002F\u002Feditor.swagger.io\u002F\n- Dredd API contract testing: https:\u002F\u002Fdredd.org\u002F\n",{"name":5,"tags":57,"author":59,"license":15,"version":60,"description":61,"allowed-tools":62,"compatible-with":63},[32,58],"api-contracts","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Generate API contracts and OpenAPI specifications from code or design documents.\nUse when documenting API contracts and specifications.\nTrigger with phrases like \"generate API contract\", \"create OpenAPI spec\", or \"document API contract\".\n","Read, Write, Edit, Grep, Glob, Bash(api:contract-*)","claude-code, codex, openclaw","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fgenerating-api-contracts",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":74,"prompt":84,"zipAvailable":85},[75,78,81],{"tool":76,"command":77},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill generating-api-contracts",{"tool":79,"command":80},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill generating-api-contracts",{"tool":82,"command":83},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill generating-api-contracts","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fjeremylongshore\u002Fclaude-code-plugins-plus-skills\u002Fgenerating-api-contracts\u002FSKILL.md",true,[],[88,100,110,119,125,132],{"skillNo":89,"name":90,"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":91,"categories":92,"keywords":96,"publishedAt":52},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[93],{"categoryNo":94,"categoryName":95,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[97,98,99],"model","model hierarchy","model hierarchy skill",{"skillNo":101,"name":102,"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":103,"categories":104,"keywords":106,"publishedAt":52},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[105],{"categoryNo":94,"categoryName":95,"taxonomyType":21,"taxonomyTypeDesc":22},[107,108,109],"MCP","zoom","zoom mcp",{"skillNo":111,"name":112,"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":113,"categories":114,"keywords":115,"publishedAt":52},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[116,117,118,108],"sdk","zoom apps sdk","apps",{"skillNo":120,"name":121,"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":122,"categories":123,"keywords":124,"publishedAt":52},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[121],{"skillNo":126,"name":127,"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":128,"categories":129,"keywords":131,"publishedAt":52},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[130],{"categoryNo":94,"categoryName":95,"taxonomyType":21,"taxonomyTypeDesc":22},[127],{"skillNo":133,"name":134,"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":135,"categories":136,"keywords":137,"publishedAt":52},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[134]]