MR
Mayur Rathi
@mayurrathi
⭐ 40.7k GitHub stars

Api Documentation Generator

Api Documentation Generator is an code AI skill with a core value of Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices. It helps developers solve real-world problems in the code domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Generate comprehensive, developer-friendly API documentation from code, including endpoints, parameters, examples, and best practices

Last verified on: 2026-07-08

Quick Facts

Category code
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 40.7k
Last Verified 2026-07-08
Risk Level Low
mkdir -p ./skills/api-documentation-generator && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/api-documentation-generator/SKILL.md -o ./skills/api-documentation-generator/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# API Documentation Generator


Overview


Automatically generate clear, comprehensive API documentation from your codebase. This skill helps you create professional documentation that includes endpoint descriptions, request/response examples, authentication details, error handling, and usage guidelines.


Perfect for REST APIs, GraphQL APIs, and WebSocket APIs.


When to Use This Skill


- Use when you need to document a new API

- Use when updating existing API documentation

- Use when your API lacks clear documentation

- Use when onboarding new developers to your API

- Use when preparing API documentation for external users

- Use when creating OpenAPI/Swagger specifications


How It Works


Step 1: Analyze the API Structure


First, I'll examine your API codebase to understand:

- Available endpoints and routes

- HTTP methods (GET, POST, PUT, DELETE, etc.)

- Request parameters and body structure

- Response formats and status codes

- Authentication and authorization requirements

- Error handling patterns


Step 2: Generate Endpoint Documentation


For each endpoint, I'll create documentation including:


**Endpoint Details:**

- HTTP method and URL path

- Brief description of what it does

- Authentication requirements

- Rate limiting information (if applicable)


**Request Specification:**

- Path parameters

- Query parameters

- Request headers

- Request body schema (with types and validation rules)


**Response Specification:**

- Success response (status code + body structure)

- Error responses (all possible error codes)

- Response headers


**Code Examples:**

- cURL command

- JavaScript/TypeScript (fetch/axios)

- Python (requests)

- Other languages as needed


Step 3: Add Usage Guidelines


I'll include:

- Getting started guide

- Authentication setup

- Common use cases

- Best practices

- Rate limiting details

- Pagination patterns

- Filtering and sorting options


Step 4: Document Error Handling


Clear error documentation including:

- All possible error codes

- Error message formats

- Troubleshooting guide

- Common error scenarios and solutions


Step 5: Create Interactive Examples


Where possible, I'll provide:

- Postman collection

- OpenAPI/Swagger specification

- Interactive code examples

- Sample responses


Examples


Example 1: REST API Endpoint Documentation


markdown
## Create User

Creates a new user account.

**Endpoint:** `POST /api/v1/users`

**Authentication:** Required (Bearer token)

**Request Body:**
\`\`\`json
{
  "email": "user@example.com",      // Required: Valid email address
  "password": "SecurePass123!",     // Required: Min 8 chars, 1 uppercase, 1 number
  "name": "John Doe",               // Required: 2-50 characters
  "role": "user"                    // Optional: "user" or "admin" (default: "user")
}
\`\`\`

**Success Response (201 Created):**
\`\`\`json
{
  "id": "usr_1234567890",
  "email": "user@example.com",
  "name": "John Doe",
  "role": "user",
  "createdAt": "2026-01-20T10:30:00Z",
  "emailVerified": false
}
\`\`\`

**Error Responses:**

- `400 Bad Request` - Invalid input data
  \`\`\`json
  {
    "error": "VALIDATION_ERROR",
    "message": "Invalid email format",
    "field": "email"
  }
  \`\`\`

- `409 Conflict` - Email already exists
  \`\`\`json
  {
    "error": "EMAIL_EXISTS",
    "message": "An account with this email already exists"
  }
  \`\`\`

- `401 Unauthorized` - Missing or invalid authentication token

**Example Request (cURL):**
\`\`\`bash
curl -X POST https://api.example.com/api/v1/users \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "SecurePass123!",
    "name": "John Doe"
  }'
\`\`\`

**Example Request (JavaScript):**
\`\`\`javascript
const response = await fetch('https://api.example.com/api/v1/users', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: 'user@ex

🎯 Best For

  • Technical writers
  • API documentation teams
  • Developers scaffolding new projects
  • Prototype builders
  • Claude users

💡 Use Cases

  • Generating JSDoc/TSDoc comments
  • Writing README files for new projects
  • Bootstrapping React components
  • Creating API route handlers

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Api Documentation Generator to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Does it follow my documentation style?

Most documentation skills respect existing style. Provide a style guide or example in your prompt.

Can I customize the generated output?

Yes — modify the skill's prompt instructions to match your project conventions and coding style.

Is Api Documentation Generator compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Api Documentation Generator?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Api Documentation Generator?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/api-documentation-generator/SKILL.md, ready to use.

⚠️ Common Mistakes to Avoid

Auto-generating without reviewing

AI documentation can contain inaccuracies. Always verify technical accuracy.

Using generated code without understanding

Understand what generated code does before shipping it to production.

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills