Agent skill

API Documenter

by alirezarezvani in alirezarezvani/claude-code-tresor

Auto-generate API documentation from code and comments. An agent skill from alirezarezvani/claude-code-tresor.

MITAuto-check passedBackend & APIs

Install API Documenter

skills CLI
$ npx skills add alirezarezvani/claude-code-tresor --skill api-documenter -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alirezarezvani/claude-code-tresor api-documenter --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alirezarezvani/claude-code-tresor.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/documentation/api-documenter .claude/skills/api-documenter && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-documenter
GitHub stars
777
Token cost
~1.5k tokens
SKILL.md length
255 words
Files
2
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Auto-generate API documentation from code and comments. An agent skill from alirezarezvani/claude-code-tresor.

  • Works in 3 steps: I generate OpenAPI spec → You need user guide → Invoke… → Sub-agent creates complete documentation…
  • API endpoints change
  • SKILL.md covers When I Activate, What I Generate, Examples and Detection Logic, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

API Documenter is an agent skill from alirezarezvani/claude-code-tresor. Auto-generate API documentation from code and comments. Use when API endpoints change, or user mentions API docs. Creates OpenAPI/Swagger specs from code. Triggers on API file changes, documentation requests, endpoint additions.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `README.md`).

It sits in Backend & APIs, covering OpenAPI specifications, Technical documentation and REST APIs. It works with OpenAPI and Python. The repository describes itself as: A world-class collection of Claude Code utilities: autonomous skills, expert agents, slash commands, and prompts that supercharge your development workflow. The licence is MIT.

When your agent uses it

  • API endpoints change
  • User mentions API docs
  • API file changes
  • Documentation requests

Example prompts

  • “/api-documenter”

Requirements

  • Python 3
  • Node.js
  • Pre-approved tools (allowed-tools): Read, Write, Grep

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. I generate OpenAPI spec
  2. You need user guide → Invoke @docs-writer sub-agent
  3. Sub-agent creates complete documentation site

What it can do on your machine

Read from SKILL.md and the folder at commit 4b68050. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript, bash, python, yaml and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

API Documenter loads about 1.5k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 255 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alirezarezvani/claude-code-tresor at commit 4b68050, republished under its MIT licence (© alirezarezvani). 255 words, ~1,464 tokens.

Download SKILL.mdSave it as .claude/skills/api-documenter/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
api-documenter
description
Auto-generate API documentation from code and comments. Use when API endpoints change, or user mentions API docs. Creates OpenAPI/Swagger specs from code. Triggers on API file changes, documentation requests, endpoint additions.
allowed-tools
Read, Write, Grep

API Documenter Skill

Auto-generate API documentation from code.

When I Activate

  • ✅ API endpoints added/modified
  • ✅ User mentions API docs, OpenAPI, or Swagger
  • ✅ Route files changed
  • ✅ Controller files modified
  • ✅ Documentation needed

What I Generate

OpenAPI 3.0 Specifications
  • Endpoint descriptions
  • Request/response schemas
  • Authentication requirements
  • Example payloads
  • Error responses
Formats Supported
  • OpenAPI 3.0 (JSON/YAML)
  • Swagger 2.0
  • API Blueprint
  • RAML

Examples

Express.js Endpoint
javascript
// You write:
/**
 * Get user by ID
 * @param {string} id - User ID
 * @returns {User} User object
 */
app.get('/api/users/:id', async (req, res) => {
  const user = await User.findById(req.params.id);
  res.json(user);
});

// I auto-generate OpenAPI spec:
paths:
  /api/users/{id}:
    get:
      summary: Get user by ID
      parameters:
        - name: id
          in: path
          required: true
          description: User ID
          schema:
            type: string
      responses:
        '200':
          description: User found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
              example:
                id: "123"
                name: "John Doe"
                email: "john@example.com"
        '404':
          description: User not found
FastAPI Endpoint
python
# You write:
@app.get("/users/{user_id}")
def get_user(user_id: int) -> User:
    """Get user by ID"""
    return db.query(User).filter(User.id == user_id).first()

// I auto-generate:
paths:
  /users/{user_id}:
    get:
      summary: Get user by ID
      parameters:
        - name: user_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
Complete OpenAPI Document
yaml
openapi: 3.0.0
info:
  title: User API
  version: 1.0.0
  description: API for user management

servers:
  - url: https://api.example.com/v1

paths:
  /api/users:
    get:
      summary: List all users
      responses:
        '200':
          description: Users array
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/User'

components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email

Detection Logic

Framework Detection

I recognize these frameworks automatically:

  • Express.js (Node.js)
  • FastAPI (Python)
  • Django REST (Python)
  • Spring Boot (Java)
  • Gin (Go)
  • Rails (Ruby)
Comment Parsing

I extract documentation from:

  • JSDoc comments (/** */)
  • Python docstrings
  • JavaDoc
  • Inline comments with decorators

Documentation Enhancement

Missing Information
javascript
// Your code:
app.post('/api/users', (req, res) => {
  User.create(req.body);
});

// I suggest additions:
/**
 * Create new user
 * @param {Object} req.body - User data
 * @param {string} req.body.name - User name (required)
 * @param {string} req.body.email - User email (required)
 * @returns {User} Created user
 * @throws {400} Invalid input
 * @throws {409} Email already exists
 */
Example Generation

I generate realistic examples:

json
{
  "id": "usr_1234567890",
  "name": "John Doe",
  "email": "john.doe@example.com",
  "createdAt": "2025-10-24T10:30:00Z",
  "verified": true
}

Relationship with @docs-writer

Me (Skill): Auto-generate API specs from code @docs-writer (Sub-Agent): Comprehensive user guides and tutorials

Workflow
  1. I generate OpenAPI spec
  2. You need user guide → Invoke @docs-writer sub-agent
  3. Sub-agent creates complete documentation site

Integration

With Swagger UI
javascript
// app.js
const swaggerUi = require('swagger-ui-express');
const spec = require('./openapi.json'); // Generated by skill

app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(spec));
With Postman

Export generated OpenAPI spec:

bash
# Import into Postman for API testing
File → Import → openapi.json
With Documentation Sites
  • Docusaurus: API docs plugin
  • MkDocs: OpenAPI plugin
  • Redoc: OpenAPI renderer
  • Stoplight: API design platform

Customization

Add company-specific documentation standards:

bash
cp -r ~/.claude/skills/documentation/api-documenter \
      ~/.claude/skills/documentation/company-api-documenter

# Edit to add:
# - Company API standards
# - Custom response formats
# - Internal schemas

Sandboxing Compatibility

Works without sandboxing: ✅ Yes Works with sandboxing: ✅ Yes

  • Filesystem: Writes OpenAPI files
  • Network: None required
  • Configuration: None required

Best Practices

  1. Keep comments updated - Documentation follows code
  2. Use type hints - TypeScript, Python types help
  3. Include examples - Real-world request/response
  4. Document errors - All possible error responses
  5. Version your API - Include version in endpoints
  • @docs-writer sub-agent: User guides and tutorials
  • readme-updater skill: Keep README current
  • /docs-gen command: Full documentation generation

© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/documentation/api-documenter of alirezarezvani/claude-code-tresor.

  • SKILL.md
  • README.md

Open the folder on GitHubat commit 4b68050

Compare with similar skills

API Documenter next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

API Documenter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
API Documenter this skillalirezarezvani/claude-code-tresor777—~1.5kAutomated safety check: PassMIT
OpenAPI Spec Generationwshobson/agents40k10 repos~511Automated safety check: PassMIT
Ns APINethServer/nethsecurity191—~2.8kAutomated safety check: PassCustom licence
FastAPI ExpertJeffallan/claude-skills12k—~1.8kAutomated safety check: PassMIT
Route To Openapizebbern/claude-code-guide4.7k—~1.1kAutomated safety check: PassMIT
Code Documenterzebbern/claude-code-guide4.7k—~1kAutomated safety check: PassMIT

Similar skills

  • Create, validate and maintain OpenAPI 3.1 specs for REST APIs, whether designed first or generated from existing code, and use them for docs and client SDKs.

    40k GitHub starsUsed in 10 repos~511 tokens
    Backend & APIsAuto-check passed
  • Ns API

    NethServer/nethsecurity

    Write or modify a NethSecurity Python RPCD API script or hook.

    191 GitHub stars~2.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • FastAPI Expert

    Jeffallan/claude-skills

    Builds async Python APIs with FastAPI and Pydantic V2, covering endpoints, JWT authentication, async SQLAlchemy, WebSockets and pytest checks against the OpenAPI docs.

    12k GitHub stars~1.8k tokensUpdated 4 days ago
    Backend & APIsAuto-check passed
  • Route To Openapi

    zebbern/claude-code-guide

    Generates RESTful API documentation (OpenAPI 3.0 / Swagger spec) by scanning route definitions in code for Flask, FastAPI, Express, Gin, and other frameworks.

    4.7k GitHub stars~1.1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Code Documenter

    zebbern/claude-code-guide

    A skill your agent uses when adding docstrings, creating API documentation, or building documentation sites.

    4.7k GitHub stars~1k tokensUpdated today
    Backend & APIsAuto-check passed
  • Python Fastapi Patterns

    aiskillstore/marketplace

    FastAPI web framework patterns. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 1 repo~1.3k tokens
    Backend & APIsAuto-check: notes

More from alirezarezvani/claude-code-tresor

  • Code Reviewer

    alirezarezvani/claude-code-tresor

    Automatic code quality and best practices analysis. An agent skill from alirezarezvani/claude-code-tresor.

    777 GitHub stars~1.8k tokensUpdated 3 mo ago
    Auto-check passed
  • Dependency Auditor

    alirezarezvani/claude-code-tresor

    Check dependencies for known vulnerabilities using npm audit, pip-audit, etc.

    777 GitHub stars~1.2k tokensUpdated 3 mo ago
    Auto-check: notes
  • Git Commit Helper

    alirezarezvani/claude-code-tresor

    Generate conventional commit messages automatically. An agent skill from alirezarezvani/claude-code-tresor.

    777 GitHub stars~1.9k tokensUpdated 3 mo ago
    Auto-check: notes
  • Readme Updater

    alirezarezvani/claude-code-tresor

    Keep README files current with project changes. An agent skill from alirezarezvani/claude-code-tresor.

    777 GitHub stars~1.5k tokensUpdated 3 mo ago
    Auto-check passed
  • Test Generator

    alirezarezvani/claude-code-tresor

    Automatically suggest tests for new functions and components.

    777 GitHub stars~1.6k tokensUpdated 3 mo ago
    Auto-check passed
  • Secret Scanner

    alirezarezvani/claude-code-tresor

    Detect exposed secrets, API keys, credentials, and tokens in code.

    777 GitHub stars~1.4k tokensUpdated 3 mo ago
    Auto-check: warnings

Works with

Categories

Questions about API Documenter

What does API Documenter do?

Auto-generate API documentation from code and comments. An agent skill from alirezarezvani/claude-code-tresor. API Documenter is an agent skill from alirezarezvani/claude-code-tresor. Auto-generate API documentation from code and comments.

When should I use API Documenter?

API Documenter fits situations like: API endpoints change; user mentions API docs; API file changes; documentation requests.

How do I install API Documenter in Claude Code?

Run `npx skills add alirezarezvani/claude-code-tresor --skill api-documenter -a claude-code`. Or copy the skill folder (skills/documentation/api-documenter in alirezarezvani/claude-code-tresor) into .claude/skills/api-documenter in your project. Claude Code loads it when a task matches its description.

How do I install API Documenter in Codex?

Run `npx skills add alirezarezvani/claude-code-tresor --skill api-documenter -a codex`. Or copy the skill folder (skills/documentation/api-documenter in alirezarezvani/claude-code-tresor) into .agents/skills/api-documenter in your project. Codex loads it when a task matches its description.

Can I use API Documenter in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-code-tresor --skill api-documenter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-documenter, .gemini/skills/api-documenter, .github/skills/api-documenter and .opencode/skills/api-documenter in your project.

What does API Documenter need to run?

SKILL.md names no scripts, command-line tools or credentials: API Documenter is instructions for the agent only. Our summary lists: Python 3; Node.js. Its frontmatter pre-approves these tools: Read, Write, Grep.

Does API Documenter access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is API Documenter safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does API Documenter use?

API Documenter is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does API Documenter use?

About 1.5k tokens (SKILL.md is roughly 5.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to API Documenter?

Skills that share tags, products or a category with API Documenter: OpenAPI Spec Generation (wshobson/agents, 40k stars), Ns API (NethServer/nethsecurity, 191 stars), FastAPI Expert (Jeffallan/claude-skills, 12k stars) and Route To Openapi (zebbern/claude-code-guide, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains API Documenter?

alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-code-tresor, which has 777 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on July 3, 2026.

Source: alirezarezvani/claude-code-tresor on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.