Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Writes precise, complete reference documentation for HTTP/REST APIs and authors valid OpenAPI 3.1 specifications, including endpoint pages, request/response schemas, parameter tables, authentication, pagination, code samples, and error tables. Use this skill when the user asks to "document an API", "write API reference docs", "create an OpenAPI/Swagger spec", "document these endpoints", "write a REST API reference", "add request/response examples", "document error codes", "describe API parameter
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 24% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 36% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 84% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 89% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 13% | 0% |
This skill produces production-quality API reference documentation and OpenAPI 3.1 specifications. It covers endpoint reference pages, parameter/field tables, authentication, pagination, rate limits, request/response examples in multiple languages, and complete error tables.
Keywords: API documentation, REST reference, OpenAPI, Swagger, endpoint docs, request schema, response schema, error codes, curl example, parameter table, authentication docs.
Use it for two distinct deliverables:
Prefer generating the OpenAPI spec first, then deriving Markdown from it, when both are requested.
Follow these steps in order.
{path_params}), summary, auth requirement, query/path/header params, request body schema, success responses (per status code), error responses, and idempotency. Use references/extraction-checklist.md to avoid omissions.references/openapi-3.1-reference.md and templates/openapi-skeleton.yaml). If they want a reference page, use templates/endpoint-reference.md.curl example and one realistic JSON request/response pair per endpoint. Use real-looking values, never foo/bar. Show the exact status code. See references/style-guide.md for example conventions.code, when it occurs, and how to fix. Reuse a consistent error envelope.scripts/validate_openapi.py path/to/spec.yaml to catch structural errors before delivering. Fix every reported issue.references/extraction-checklist.md and the Common Pitfalls list below.Each endpoint page should contain, in order:
METHOD /pathRequires: Bearer token)Always use this column order:
| Name | In | Type | Required | Default | Constraints | Description | |------|----|----- |----------|---------|-------------|-------------| | limit | query | integer | No | 20 | 1–100 | Max items per page. |
Use a single consistent shape unless the API dictates otherwise:
json{ "error": { "code": "resource_not_found", "message": "No user exists with id 'usr_123'.", "details": [], "request_id": "req_8f2c1a" } }
Document the envelope once, then reference it from each error table.
code strings; HTTP status alone is not enough.Bearer sk_test_....$ref / components.schemas in OpenAPI; never copy a schema twice.required vs optional, or omitting defaults.foo/bar/string placeholders instead of realistic values.200 and 201 without saying which operation returns which.requestBody.required, or referencing undefined $refs.application/json vs multipart/form-data).references/openapi-3.1-reference.md — OpenAPI 3.1 structure, field semantics, schema patterns, security schemes, and reusable components.references/style-guide.md — voice, examples, naming, and formatting conventions.references/extraction-checklist.md — what to capture per endpoint; use as a final review gate.templates/endpoint-reference.md — fill-in Markdown template for one endpoint.templates/openapi-skeleton.yaml — minimal valid OpenAPI 3.1 starting point.scripts/validate_openapi.py — stdlib validator for common OpenAPI mistakes.examples/users-api.md — a complete worked example (input routes -> reference page + spec excerpt).Other measured skills in the registry, with their headline benchmark lift.