This skill should be used when the user asks to "generate API docs", "create API documentation", "generate curl examples", "create developer docs", or mentions generating documentation, curl examples, or developer guides from OpenAPI/OAS specifications.
Generates markdown documentation from your OpenAPI Specification, creating multiple pages with curl command examples for each endpoint.
Use this skill when:
pip install pyyaml
python3 skills/api-doc-generator/scripts/generate_docs.py path/to/spec.yaml [output-dir]
Default output directory is if not specified.
./docsThe tool creates:
README.md (Overview page):
Individual endpoint pages (one per operation):
# Generate docs to default ./docs directory
python3 skills/api-doc-generator/scripts/generate_docs.py api-spec.yaml
# Generate docs to custom directory
python3 skills/api-doc-generator/scripts/generate_docs.py api-spec.yaml ./documentation
Output:
Generating API documentation from api-spec.yaml...
Generating overview page: README.md
Generating endpoint page: createUser.md
Generating endpoint page: getUserById.md
Generating endpoint page: listOrders.md
✓ Generated documentation for 3 endpoints
✓ Output directory: ./docs
View the documentation:
- Overview: ./docs/README.md
The tool automatically generates curl commands with:
Example generated curl command:
curl -X POST "https://api.example.com/users" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "[email protected]",
"age": 28,
"role": "developer"
}'
The generated documentation can be:
docs/ folderEach endpoint gets its own file, making it easy to:
Ask Claude to generate documentation:
"Generate markdown documentation from my API spec at path/to/spec.yaml"
"Create API docs with curl examples from specs/my-api.yaml"
"Generate developer documentation for my OpenAPI spec"