# Generate API Docs

> Generate API documentation from code

- Skill: `emaraschio/generate-api-docs` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add emaraschio/generate-api-docs`
- Raw SKILL.md: https://api.skillmd.com/api/skills/emaraschio/generate-api-docs/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: emaraschio (https://skillmd.com/u/emaraschio)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/emaraschio/generate-api-docs

---

## Overview

Create comprehensive API documentation for the current endpoints formatted as OpenAPI/Swagger specification or following the project's documentation standards.

## Steps

1. **API Overview**
    - Service description and purpose
    - Base URL and versioning information
    - Authentication and authorization requirements
    - Rate limiting and usage policies
2. **Endpoint Documentation**
    - HTTP method and URL path
    - Request parameters (path, query, body)
    - Request/response schemas with data types
    - Example requests and responses
    - Possible error codes and messages
3. **Data Models**
    - Define all data models and schemas
    - Include field descriptions and constraints
    - Show relationships between models
    - Provide example payloads
4. **Usage Examples**
    - Common use case scenarios
    - SDK and client library examples
    - CURL command examples
    - Error handling examples

## API Documentation Checklist

- [ ] API overview complete
- [ ] Endpoints documented
- [ ] Data models defined
- [ ] Usage examples provided
- [ ] Documentation formatted per project standards

## Guardrails

- Document only endpoints that exist in code; do not invent endpoints, parameters, or responses.
- Use placeholder values in examples; never expose real secrets or credentials.
