[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F0R3PFJGQ2VDW070S7SMQR":3,"skill-same:01M7F0R3PFJGQ2VDW070S7SMQR":57},{"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":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7F0R3PFJGQ2VDW070S7SMQR","openapi-spec-generation",null,"Write, generate and lint OpenAPI 3.1 specifications, design-first or from code (FastAPI, tsoa), and generate SDKs from them. Use when creating or fixing an API contract, migrating a 3.0 spec to 3.1, or adding Spectral or Redocly linting to CI.","shotcowboystyle\u002Fag-skills","shotcowboystyle","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F62471?v=4","01M7EZTCFCZJ6K3MYW8BPM4X6R","Curtis Blanton","01M7EZTCG1S5M04J90A931X9BX",0,"MIT","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdocumentation-generation\u002Fskills\u002Fopenapi-spec-generation\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: openapi-spec-generation\ndescription: Write, generate and lint OpenAPI 3.1 specifications, design-first or from code (FastAPI, tsoa), and generate SDKs from them. Use when creating or fixing an API contract, migrating a 3.0 spec to 3.1, or adding Spectral or Redocly linting to CI.\nlast_verified: 2026-10-27\n---\n\n# OpenAPI Spec Generation\n\nWrite OpenAPI 3.1 specifications that lint clean, and keep them in step with the code.\n\n## When to Use This Skill\n\n- Writing an API contract before the code exists (design-first)\n- Generating a spec from an existing FastAPI or tsoa codebase (code-first)\n- Migrating a 3.0 spec to 3.1\n- Adding spec linting to CI, or generating client SDKs\n\n## Procedure\n\n1. **Pick the approach.** Design-first for a new API or a contract other teams consume.\n   Code-first when the code exists and is the source of truth: FastAPI emits 3.1 from\n   `app.openapi()`, tsoa from its decorators.\n2. **Start from the template** in `references\u002Fdetails.md` (Template 1). Set\n   `openapi: 3.1.0`, real `servers`, and one `securitySchemes` entry per auth method.\n3. **Define each schema once** under `components\u002Fschemas` and `$ref` it. Give every\n   operation an `operationId`, a `summary`, a `description`, and its 4xx responses.\n4. **Write 3.1 schemas, not 3.0 ones.** 3.1 schemas are JSON Schema 2020-12. See the\n   table below.\n5. **Lint.** Both must pass before the spec is committed:\n\n   ```bash\n   npx @redocly\u002Fcli@2 lint openapi.yaml\n   npx @stoplight\u002Fspectral-cli@6 lint openapi.yaml --fail-severity=warn\n   ```\n\n   Rulesets for both are in `references\u002Fcode-first-and-tooling.md` (Template 4). Redocly\n   rejects 3.0 keywords such as `nullable` in a 3.1 document.\n6. **Add the lint to CI** and fail the build on errors. For code-first, export the spec in\n   CI and diff it against the committed one so a code change can't drift silently.\n\n## 3.0 to 3.1 changes\n\n| 3.0 | 3.1 |\n| --- | --- |\n| `nullable: true` | `type: [string, \"null\"]`, or `anyOf` with `{type: \"null\"}` for a `$ref` |\n| `example:` inside a schema | `examples:` (a list) inside a schema; media-type `example`\u002F`examples` are unchanged |\n| `exclusiveMinimum: true` + `minimum: 0` | `exclusiveMinimum: 0` |\n| `type: string, format: binary` for uploads | `contentMediaType: application\u002Foctet-stream` |\n| `$ref` siblings ignored | `$ref` may have sibling keywords such as `description` |\n\n```yaml\n# Nullable scalar\navatar:\n  type: [string, \"null\"]\n  format: uri\n\n# Nullable reference\nmanager:\n  anyOf:\n    - $ref: \"#\u002Fcomponents\u002Fschemas\u002FUser\"\n    - type: \"null\"\n```\n\n## Design approaches\n\n| Approach         | Description                  | Best For            |\n| ---------------- | ---------------------------- | ------------------- |\n| **Design-First** | Write spec before code       | New APIs, contracts |\n| **Code-First**   | Generate spec from code      | Existing APIs       |\n| **Hybrid**       | Annotate code, generate spec | Evolving APIs       |\n\n## References\n\n- `references\u002Fdetails.md`: Template 1, a complete 3.1 spec that passes both linters.\n- `references\u002Fcode-first-and-tooling.md`: FastAPI and tsoa code-first templates, the\n  Spectral and Redocly rulesets, and SDK generation.\n\n## Don'ts\n\n- **Don't use 3.0 keywords in a 3.1 spec**: `nullable`, boolean `exclusiveMinimum`.\n- **Don't skip security**: every operation is covered by a security requirement or is\n  marked public with `security: []`.\n- **Don't mix naming styles**: properties and path parameters are camelCase throughout.\n- **Don't hardcode environments**: list each one under `servers`, or use server variables.\n- **Don't publish numbers you haven't measured**: rate limits and quotas come from the\n  gateway config, not from a guess.\n","# OpenAPI Spec Generation\n\nWrite OpenAPI 3.1 specifications that lint clean, and keep them in step with the code.\n\n## When to Use This Skill\n\n- Writing an API contract before the code exists (design-first)\n- Generating a spec from an existing FastAPI or tsoa codebase (code-first)\n- Migrating a 3.0 spec to 3.1\n- Adding spec linting to CI, or generating client SDKs\n\n## Procedure\n\n1. **Pick the approach.** Design-first for a new API or a contract other teams consume.\n   Code-first when the code exists and is the source of truth: FastAPI emits 3.1 from\n   `app.openapi()`, tsoa from its decorators.\n2. **Start from the template** in `references\u002Fdetails.md` (Template 1). Set\n   `openapi: 3.1.0`, real `servers`, and one `securitySchemes` entry per auth method.\n3. **Define each schema once** under `components\u002Fschemas` and `$ref` it. Give every\n   operation an `operationId`, a `summary`, a `description`, and its 4xx responses.\n4. **Write 3.1 schemas, not 3.0 ones.** 3.1 schemas are JSON Schema 2020-12. See the\n   table below.\n5. **Lint.** Both must pass before the spec is committed:\n\n   ```bash\n   npx @redocly\u002Fcli@2 lint openapi.yaml\n   npx @stoplight\u002Fspectral-cli@6 lint openapi.yaml --fail-severity=warn\n   ```\n\n   Rulesets for both are in `references\u002Fcode-first-and-tooling.md` (Template 4). Redocly\n   rejects 3.0 keywords such as `nullable` in a 3.1 document.\n6. **Add the lint to CI** and fail the build on errors. For code-first, export the spec in\n   CI and diff it against the committed one so a code change can't drift silently.\n\n## 3.0 to 3.1 changes\n\n| 3.0 | 3.1 |\n| --- | --- |\n| `nullable: true` | `type: [string, \"null\"]`, or `anyOf` with `{type: \"null\"}` for a `$ref` |\n| `example:` inside a schema | `examples:` (a list) inside a schema; media-type `example`\u002F`examples` are unchanged |\n| `exclusiveMinimum: true` + `minimum: 0` | `exclusiveMinimum: 0` |\n| `type: string, format: binary` for uploads | `contentMediaType: application\u002Foctet-stream` |\n| `$ref` siblings ignored | `$ref` may have sibling keywords such as `description` |\n\n```yaml\n# Nullable scalar\navatar:\n  type: [string, \"null\"]\n  format: uri\n\n# Nullable reference\nmanager:\n  anyOf:\n    - $ref: \"#\u002Fcomponents\u002Fschemas\u002FUser\"\n    - type: \"null\"\n```\n\n## Design approaches\n\n| Approach         | Description                  | Best For            |\n| ---------------- | ---------------------------- | ------------------- |\n| **Design-First** | Write spec before code       | New APIs, contracts |\n| **Code-First**   | Generate spec from code      | Existing APIs       |\n| **Hybrid**       | Annotate code, generate spec | Evolving APIs       |\n\n## References\n\n- `references\u002Fdetails.md`: Template 1, a complete 3.1 spec that passes both linters.\n- `references\u002Fcode-first-and-tooling.md`: FastAPI and tsoa code-first templates, the\n  Spectral and Redocly rulesets, and SDK generation.\n\n## Don'ts\n\n- **Don't use 3.0 keywords in a 3.1 spec**: `nullable`, boolean `exclusiveMinimum`.\n- **Don't skip security**: every operation is covered by a security requirement or is\n  marked public with `security: []`.\n- **Don't mix naming styles**: properties and path parameters are camelCase throughout.\n- **Don't hardcode environments**: list each one under `servers`, or use server variables.\n- **Don't publish numbers you haven't measured**: rate limits and quotas come from the\n  gateway config, not from a guess.\n",{"name":5,"description":7,"last_verified":24},1793059200000,"main","f846d9a97082ff30d613b55a085cef425d822473","plugins\u002Fdocumentation-generation\u002Fskills\u002Fopenapi-spec-generation","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle","https:\u002F\u002Fshotcowboystyle.github.io","Building smarter with AI, automation & modern tools. Exploring how far one person can go without a big team using today’s AI.","2026-11-10 04:58:27",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add shotcowboystyle\u002Fag-skills --skill openapi-spec-generation",{"tool":39,"command":40},"bunx","bunx skills add shotcowboystyle\u002Fag-skills --skill openapi-spec-generation",{"tool":42,"command":43},"pnpm","pnpm dlx skills add shotcowboystyle\u002Fag-skills --skill openapi-spec-generation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdocumentation-generation\u002Fskills\u002Fopenapi-spec-generation\u002FSKILL.md",true,[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fcode-first-and-tooling.md","REFERENCE","参考文档",11686,"https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdocumentation-generation\u002Fskills\u002Fopenapi-spec-generation\u002Freferences\u002Fcode-first-and-tooling.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fdetails.md",12236,"https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fdocumentation-generation\u002Fskills\u002Fopenapi-spec-generation\u002Freferences\u002Fdetails.md",[58,64,71,78,85,92],{"skillNo":59,"name":60,"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":61,"categories":62,"keywords":63,"publishedAt":19},"01M7F1YRY5S5QRJ1V0BJS130QX","no-description","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fno-description\u002FSKILL.md",[],[],{"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},"01M7F1Y9BV2FJNQJ3NB32JS5CM","good-skill","Fixture skill that satisfies every rule.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgood-skill\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7F1XXBQ3NQRXZSS0KAGAR9V","broken-link","Links to a reference file that does not exist.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbroken-link\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7F1XBX4R46NR9W0HXQ7XCDX","Bad_Name","Name violates the kebab-case rule and does not match the directory.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fbad-name\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7F1WNAF8WNEQ7S5HKT5VK0D","skill-authoring","Write, review, and validate portable agent skills in SKILL.md format. Use when creating a new skill, editing an existing one, or asked whether a skill follows the Agent Skills spec.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fskills\u002Fskill-authoring\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7F1W30TC0XFNSF7YBRGETK2","weigh-bags","Record scale readings for each bag — empty (tare), outbound, current, final — and reconcile them against the itemised inventory to find unaccounted weight. Use when the user gives a bag weight, says how heavy something is, weighs their luggage, or asks how close to the limit they are. Appends to bags.yaml and runs scripts\u002Freconcile.py.","https:\u002F\u002Fgithub.com\u002Fshotcowboystyle\u002Fag-skills\u002Fblob\u002Fmain\u002Fplugins\u002Ftravel-packing-assistant\u002Fskills\u002Fweigh-bags\u002FSKILL.md",[],[]]