
This generates complete OpenAPI 3.1 specs from scratch or existing code, handling the tedious parts like parameter definitions, response schemas, and component references. You'd use it when documenting APIs, setting up contract-first development, or generating client SDKs. It covers the full spec structure including authentication schemes, error responses, and validation rules. The templates are comprehensive enough that you can copy-paste and modify rather than writing boilerplate YAML from memory. It's solid for both greenfield API design and retrofitting documentation onto existing endpoints.
$ npx -y skills add wshobson/agents --skill openapi-spec-generation --agent claude-codeInstalls into .claude/skills of the current project.
Comprehensive patterns for creating, maintaining, and validating OpenAPI 3.1 specifications for RESTful APIs.
openapi: 3.1.0
info:
title: API Title
version: 1.0.0
servers:
- url: https://api.example.com/v1
paths:
/resources:
get: ...
components:
schemas: ...
securitySchemes: ...
| Approach | Description | Best For |
|---|---|---|
| Design-First | Write spec before code | New APIs, contracts |
| Code-First | Generate spec from code | Existing APIs |
| Hybrid | Annotate code, generate spec | Evolving APIs |
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
Sponsors