api-doc-generator

api-doc-generator is a skill for Claude Code, Codex from JackyST0/awesome-agent-skills. It costs 23 tokens per session (975 once invoked), scanned A, original, CC0-1.0.

A tool that creates documentation for web APIs—interfaces that let programs communicate—from source code. It supports REST APIs, GraphQL, and formats such as Markdown and OpenAPI YAML.

In plain words
What is it for?
It helps document API paths and methods, explain inputs and outputs, show success and error examples, and generate OpenAPI or API Blueprint specifications.
Why use it?
It saves developers from manually listing endpoints, parameters, authentication requirements, request data, and responses.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps document API paths and methods, explain inputs and outputs, show success and error examples, and generate OpenAPI or API Blueprint specifications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jackyst0/awesome-agent-skills/api-doc-generator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add JackyST0/awesome-agent-skills --skill api-doc-generator
Clone the repo
git clone --depth 1 https://github.com/JackyST0/awesome-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-doc-generator

README.md
[![agentmods](https://agentmods.dev/badge/skills/jackyst0/awesome-agent-skills/api-doc-generator.svg)](https://agentmods.dev/skills/jackyst0/awesome-agent-skills/api-doc-generator)
Your own site
<a href="https://agentmods.dev/skills/jackyst0/awesome-agent-skills/api-doc-generator"><img src="https://agentmods.dev/badge/skills/jackyst0/awesome-agent-skills/api-doc-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 975 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00975
Opus 5 $0.00012 $0.00487
Sonnet 5 $0.00005 $0.00195
Haiku 4.5 $0.00002 $0.00097

Measured 9d ago against content hash 54c91f760715, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

api-doc-generator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/api-doc-generator/SKILL.md · 177 lines

How it starts

The opening of the file, as written. The whole thing — 177 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Doc Generator

根据代码生成 API 文档,支持 REST API、GraphQL 及多种文档格式。

Generate API documentation from source code, supporting REST APIs, GraphQL, and various documentation formats.

When to Use

当用户请求以下操作时使用此 skill:

  • 生成 API 文档 / Generate API documentation
  • 创建接口文档 / Create interface documentation
  • 编写 API 说明 / Write API descriptions
  • 生成 OpenAPI/Swagger 规范 / Generate OpenAPI/Swagger specs

Instructions

分析步骤 / Analysis Steps

  1. 识别 API 类型 - REST、GraphQL、RPC 等
  2. 提取端点信息 - URL、方法、参数
  3. 分析数据结构 - 请求/响应格式
  4. 识别认证方式 - API Key、OAuth、JWT 等
  5. 生成文档 - 按照标准格式输出

文档内容 / Documentation Content

每个 API 端点应包含:

  • 端点路径 - URL 和 HTTP 方法
  • 描述 - 功能说明
  • 参数 - 路径参数、查询参数、请求体
  • 响应 - 成功和错误响应示例
  • 认证 - 认证要求

输出格式 / Output Formats

支持以下文档格式:

  • Markdown(默认)- 使用 templates/api-doc.md 模板
  • OpenAPI 3.0 YAML
  • API Blueprint

Use templates/api-doc.md for Markdown output format.

标准模板 / Standard Template

## API 文档 / API Documentation

### 端点概览 / Endpoint Overview

| 方法 | 路径 | 描述 |
|------|------|------|
| GET | /api/resource | 获取资源列表 |

### 详细说明 / Details

#### [方法] /path

**描述**: ...

**请求参数**:
| 参数 | 类型 | 必需 | 描述 |
|------|------|------|------|

**请求示例**:
```json
{}

响应示例:

{}

## Examples

### 输入 / Input

```python
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel

app = FastAPI()

class User(BaseModel):
    id: int
    name: str
    email: str

@app.get("/users/{user_id}")
async def get_user(user_id: int) -> User:
    """Get a user by ID."""
    if user_id <= 0:
        raise HTTPException(status_code=404, detail="User not found")
    return User(id=user_id, name="John", email="[email protected]")

@app.post("/users")
async def create_user(user: User) -> User:
    """Create a new user."""
    return user

输出 / Output

API 文档

端点概览

方法 路径 描述
GET /users/{user_id} 根据 ID 获取用户信息
POST /users 创建新用户

GET /users/{user_id}

Read the full file on GitHub · 177 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 177 lines · 23 tokens per session scan A 54c91f760715

Subscribe to this mod's changes

api-doc-generator is a skill published in the GitHub repository JackyST0/awesome-agent-skills (632 stars, last pushed today), licensed CC0-1.0. It adds 23 tokens to every session and 975 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.