From api-docs
Generates markdown API documentation from FastAPI routes, Pydantic models, DRF viewsets, and serializers — also detects drift between code and existing docs. Use when asked to "generate api docs", "document api", "api documentation", "openapi", "swagger docs", "update api docs", "check api drift", or "document endpoints".
How this skill is triggered — by the user, by Claude, or both
Slash command
/api-docs:api_docsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generates comprehensive markdown API documentation by scanning FastAPI routes, Pydantic models, DRF viewsets, and serializers. Also detects drift between existing documentation and current code.
Generates comprehensive markdown API documentation by scanning FastAPI routes, Pydantic models, DRF viewsets, and serializers. Also detects drift between existing documentation and current code.
/api-docs generate — Generate API documentationDetect API framework:
# FastAPI detection
grep -r "APIRouter\|FastAPI()" --include="*.py" .
# Django REST Framework detection
grep -r "ViewSet\|APIView\|@api_view" --include="*.py" .
For FastAPI projects:
grep -r "class.*BaseModel" --include="*.py" -l .
For DRF projects:
grep -r "class.*Serializer" --include="*.py" -l .
Generate markdown documentation:
# API Documentation
## Authentication
{Detected auth mechanism}
## Endpoints
### {Group/Router Name}
#### `{METHOD} {path}`
{Description from docstring}
**Request Body:**
| Field | Type | Required | Description |
|-------|------|----------|-------------|
**Response:**
| Field | Type | Description |
|-------|------|-------------|
**Status Codes:**
| Code | Description |
|------|-------------|
Write to docs/api.md or user-specified location.
Offer to add a table of contents with links to each endpoint group.
/api-docs diff — Detect documentation driftdocs/api.md or user-specified location).API Documentation Drift Report
==============================
Added (not documented):
- POST /api/v1/users/bulk-invite
Removed (still documented):
- DELETE /api/v1/users/{id}/avatar
Changed:
- PUT /api/v1/users/{id}
- Added field: `phone_number` (string, optional)
- Removed field: `legacy_id`
| Problem | Cause | Solution |
|---|---|---|
| Framework not detected | No FastAPI or DRF imports found | Verify the project uses a supported framework; check for non-standard import patterns |
| Routes spread across many files | Large project with modular routing | The tool scans recursively; ensure all route files use standard decorators and patterns |
| Dynamic route generation | Routes created programmatically at runtime | Document dynamic routes manually or point the tool to the route registration code |
| Pydantic v1 vs v2 differences | Model syntax varies between versions | The tool handles both BaseModel styles; flag any issues for manual review |
| Existing docs in non-standard format | Docs don't follow expected markdown structure | Use generate to create fresh docs, then manually merge custom sections |
npx claudepluginhub shouenlee/ghcp-dev-plugin --plugin api-docsAudits FastAPI/REST API endpoints for documentation completeness and enhances docstrings, Pydantic models, response codes, and OpenAPI specs with realistic examples.
Generates OpenAPI specs and interactive API docs with Swagger/Redoc. Handles spec-first contracts and code-first auto-generation from Express, FastAPI, NestJS, Spring Boot.
Generates API documentation from codebases, including endpoints, parameters, examples, auth, errors, and OpenAPI specs for REST, GraphQL, and WebSocket APIs. Use for new APIs, updates, or onboarding.