api-documentation-generator

Generate comprehensive, accurate API documentation from source code. Use when creating or updating API documentation, generating OpenAPI specs, or when users mention API docs, endpoints, or documentation.

⭐727stars🔀48forks📁View on GitHub🕐Updated Jan 3, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill automates the generation of comprehensive and accurate API documentation directly from source code. It streamlines the development workflow by producing OpenAPI/Swagger specifications, detailed endpoint references, and multi-language SDK usage examples, ensuring your technical documentation remains perfectly synchronized with your codebase.

Use Cases

  • 1. Automated OpenAPI Specification: Convert source code into standardized OpenAPI/Swagger JSON or YAML files to improve tool compatibility and API discovery.
  • 2. Multi-Language SDK Examples: Generate ready-to-use code snippets in Python, JavaScript, and cURL to accelerate developer integration and onboarding.
  • 3. Documentation Maintenance: Automatically update endpoint descriptions, parameter tables, and error code references whenever the underlying source code changes.
  • 4. Integration Guide Creation: Build structured technical guides and authentication references to help third-party developers implement your API correctly.
nameapi-documentation-generator
descriptionGenerate comprehensive, accurate API documentation from source code. Use when creating or updating API documentation, generating OpenAPI specs, or when users mention API docs, endpoints, or documentation.

API Documentation Generator Skill

Generates

  • OpenAPI/Swagger specifications
  • API endpoint documentation
  • SDK usage examples
  • Integration guides
  • Error code references
  • Authentication guides

Documentation Structure

For Each Endpoint

## GET /api/v1/users/:id

### Description
Brief explanation of what this endpoint does

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string | Yes | User ID |

### Response

**200 Success**
```json
{
  "id": "usr_123",
  "name": "John Doe",
  "email": "john@example.com",
  "created_at": "2025-01-15T10:30:00Z"
}

404 Not Found

{
  "error": "USER_NOT_FOUND",
  "message": "User does not exist"
}

Examples

cURL

curl -X GET "https://api.example.com/api/v1/users/usr_123" \
  -H "Authorization: Bearer YOUR_TOKEN"

JavaScript

const user = await fetch('/api/v1/users/usr_123', {
  headers: { 'Authorization': 'Bearer token' }
}).then(r => r.json());

Python

response = requests.get(
    'https://api.example.com/api/v1/users/usr_123',
    headers={'Authorization': 'Bearer token'}
)
user = response.json()