openapi-documentation
Skill3 starsChanged 38 days agoApache-2.0View on GitHub
Use when writing or maintaining an OpenAPI/Swagger 3.0 specification for a REST API — new endpoints, request/response schemas, auth schemes, or error responses that need to be documented accurately and stay in sync with the implementation. Skip for internal-only functions/modules with no HTTP surface, and skip for GraphQL APIs — this is REST/OpenAPI specific.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- algorithm-pseudocode-designSkill
- brainstormingSkill
- pmSkill
- requirements-specificationSkill
- system-architecture-designSkill
- systematic-debuggingSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write OpenAPI 3.0 specs that are accurate enough to generate a working client from, not just descriptive prose that happens to be near the …
- Distinctive: line 21
Create OpenAPI 3.0-compliant specifications — validate against the spec, not just "looks right."
- Distinctive: line 23
Document every endpoint with both a summary and a fuller description — the summary is what shows up in a collapsed list view, so it has to …
- Distinctive: line 36
Use descriptive summaries and descriptions — "Get user" tells a reader nothing an endpoint path didn't already say.
- Very specific: line 40
Document every realistic error response (400/401/403/404/409/5xx), not just the 200 case — the error surface is as much a contract as …
- Very specific: line 42
Use $ref for reusable components (schemas, responses, parameters) — duplicated inline schemas drift out of sync with each other.
- Distinctive: line 44
Follow the OpenAPI 3.0 specification strictly, not "close enough" — strict compliance is what makes codegen and client tooling actually …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenAPI Documentation
Write OpenAPI 3.0 specs that are accurate enough to generate a working client from, not just descriptive prose that happens to be near the code.
When to use
- Creating or updating an OpenAPI/Swagger spec for a REST API.
- An endpoint's request/response shape, auth requirement, or error surface changed and the spec needs to catch up.
- Skip for non-HTTP internal APIs/functions, and skip for GraphQL (which has its own schema/introspection story, not OpenAPI's).
Key responsibilities
- Create OpenAPI 3.0-compliant specifications — validate against the spec, not just "looks right."
- Document every endpoint with both a summary and a fuller description — the summary is what shows up in a collapsed list view, so it has to stand alone.
- Define request/response schemas accurately, including every field's type and whether it's required.
- Include authentication and security schemes — an endpoint's auth requirement is part of its contract, not an implementation detail to omit.
- Provide a real example for every operation — a schema without an example makes the reader reconstruct a valid payload by hand.
Best practices
- Use descriptive summaries and descriptions — "Get user" tells a reader nothing an endpoint path didn't already say; "Get a user's profile, including their current subscription tier" does.
- Include example requests and responses, not just one or the other.
- Document every realistic error response (400/401/403/404/409/5xx), not just the 200 case — the error surface is as much a contract as success.
- Use
$reffor reusable components (schemas, responses, parameters) — duplicated inline schemas drift out of sync with each other. - Follow the OpenAPI 3.0 specification strictly, not "close enough" — strict compliance is what makes codegen and client tooling actually work.
- Group endpoints logically with tags so the generated docs UI is navigable, not one flat list.
Structure
openapi: 3.0.0
info:
title: API Title
version: 1.0.0
description: API Description
servers:
- url: https://api.example.com
paths:
/endpoint:
get:
summary: Brief description
description: Detailed description
parameters: []
responses:
'200':
description: Success response
content:
application/json:
schema:
type: object
example:
key: value
components:
schemas:
Model:
type: object
properties:
id:
type: stringDocumentation elements to include
- Clear, stable
operationIds (client generators use these as method names — renaming one is a breaking change for generated clients). - Request and response examples for every operation.
- Full error response documentation, with the actual error shape the API returns.
- Security requirements per operation (not just a global default that silently doesn't apply everywhere).
- Rate-limiting behavior, when the API has any — callers need to know the limits exist before they hit them in production.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

