Generating API Docs Skill for OpenAPI Examples
Use Claude Code to document request parameters, successful responses, and error cases, then compare the examples against a local API.
中文Install in Claude Code
Use a local API, an OpenAPI 3 definition, and Swagger UI or a similar preview. The example uses synthetic product IDs.
- Get the complete `plugins/api-development/api-documentation-generator/skills/generating-api-docs` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/generating-api-docs/SKILL.md`, start Claude Code at the project root, and call `/generating-api-docs`.
Example task
Document GET /products/{id} with an integer id and both 200 and 404 responses. Make the local service return Demo Mug for 7 and PRODUCT_NOT_FOUND for 999, then check both examples in the preview.What to check
A reader can reproduce the two requests, match the responses to the specification, and understand the stable error code.
Original SKILL.md on GitHub · Updated
Frequently asked question
Should I add error responses to OpenAPI?
Describe the response shape, example, and handling guidance for statuses clients can receive, especially stable error codes.