Token导航 LogoToken导航

Agent Skill · 研究检索

api-documentation-generator(API 文档生成器)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

api-documentation-generator 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 6,497。

总安装 21,979周安装 690GitHub Stars 公开资料未说明下载 6,246核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:api-documentation-generator(API 文档生成器)
来源仓库:https://github.com/sethdford/claude-plugins
仓库路径:skills/api-documentation-generator
安装命令:
npx skills add sethdford/claude-plugins --skill "api-documentation-generator"
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

AgentSkills.tonpx skills
npx skills add sethdford/claude-plugins --skill "api-documentation-generator"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

自动生成 API 文档,支持 OpenAPI 格式输出与字段校验。适合前后端协作中快速生成标准化接口说明。通过 github 安装,兼容主流 AI 代理宿主。应基于真实接口样例或 schema 生成,避免虚构字段信息。

api-documentation-generator 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/api-documentation-generator

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add sethdford/claude-plugins --skill "api-documentation-generator";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

api-documentation-generator 怎么安装?

在终端执行 npx skills add sethdford/claude-plugins --skill "api-documentation-generator"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

api-documentation-generator 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

api-documentation-generator 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

api-documentation-generator 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

api-documentation-generator 用的人多吗?

公开数据是累计安装 21,979 次,近一周安装 690 次,下载 6,246 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

api-documentation-generator 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
api-documentation-generator

API 文档生成器 · 本页

21,979—接触敏感数据MIT未收录

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

API Documentation Generator

Expert assistance for creating comprehensive API documentation in Confluence.

When to Use This Skill

  • Documenting new API endpoints
  • Creating API reference pages
  • Converting OpenAPI/Swagger specs to Confluence
  • User mentions: API, endpoints, REST, GraphQL, documentation
  • After implementing new API features

API Documentation Structure

Complete API Page Template

# [API Name] API

## Overview
Brief description of what this API does and its purpose.

## Base URL

https://api.example.com/v1

## Authentication
How to authenticate with this API.

## Endpoints

### GET /resource
Brief description of what this endpoint does.

#### Parameters
[Parameter table]

#### Request Example
[Code block with example]

#### Response
[Success response example]

#### Error Codes
[Error table]

## Rate Limiting
API rate limit information.

## Changelog
Version history and changes.

Endpoint Documentation

Standard Sections

1. Endpoint Header
### POST /api/users
Create a new user account
2. Description
Creates a new user account with the provided information.
Sends a verification email to the user's address.

**Permissions**: Requires `admin` role
**Rate Limit**: 10 requests per minute
3. Parameters Table
Path Parameters
ParameterTypeRequiredDescription
idstringYesUser ID (UUID format)
versionintegerNoAPI version (default: 1)
Query Parameters
ParameterTypeRequiredDescriptionDefault
pageintegerNoPage number1
limitintegerNoItems per page20
sortstringNoSort fieldcreated_at
orderstringNoSort order (asc/desc)desc
Request Body
FieldTypeRequiredDescriptionConstraints
emailstringYesUser email addressValid email format
usernamestringYesUsername3-20 alphanumeric chars
passwordstringYesPasswordMin 8 chars, 1 uppercase, 1 number
full_namestringNoFull nameMax 100 chars
rolestringNoUser roleOne of: user, admin, moderator
4. Request Example

cURL:

curl -X POST https://api.example.com/v1/users \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "email": "user@example.com",
    "username": "johndoe",
    "password": "SecurePass123",
    "full_name": "John Doe",
    "role": "user"
  }'

JavaScript (fetch):

const response = await fetch('https://api.example.com/v1/users', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    email: 'user@example.com',
    username: 'johndoe',
    password: 'SecurePass123',
    full_name: 'John Doe',
    role: 'user'
  })
});

const data = await response.json();
console.log(data);

Python (requests):

import requests

url = "https://api.example.com/v1/users"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY"
}
data = {
    "email": "user@example.com",
    "username": "johndoe",
    "password": "SecurePass123",
    "full_name": "John Doe",
    "role": "user"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
5. Response Examples

Success Response (201 Created):

{
  "status": "success",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "user@example.com",
    "username": "johndoe",
    "full_name": "John Doe",
    "role": "user",
    "email_verified": false,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}

Response Fields:

FieldTypeDescription
idstringUnique user identifier (UUID)
emailstringUser's email address
usernamestringUsername
full_namestringUser's full name
rolestringUser's role
email_verifiedbooleanEmail verification status
created_atstringAccount creation timestamp (ISO 8601)
updated_atstringLast update timestamp (ISO 8601)
6. Error Responses
Status CodeError CodeDescriptionResolution
400INVALID_EMAILEmail format is invalidProvide valid email address
400WEAK_PASSWORDPassword doesn't meet requirementsUse min 8 chars, 1 uppercase, 1 number
400USERNAME_TAKENUsername already existsChoose different username
401UNAUTHORIZEDMissing or invalid API keyInclude valid Authorization header
403FORBIDDENInsufficient permissionsRequires admin role
429RATE_LIMIT_EXCEEDEDToo many requestsWait before retrying
500INTERNAL_ERRORServer errorContact support if persists

Error Response Format:

{
  "status": "error",
  "error": {
    "code": "USERNAME_TAKEN",
    "message": "The username 'johndoe' is already in use",
    "details": {
      "field": "username",
      "value": "johndoe"
    }
  }
}

Authentication Documentation

API Key Authentication

## Authentication

All API requests require authentication using an API key.

### Obtaining an API Key
1. Log in to your account
2. Navigate to Settings > API Keys
3. Click "Generate New Key"
4. Store the key securely (shown only once)

### Using the API Key

Include the API key in the `Authorization` header:

Authorization: Bearer YOUR_API_KEY

**Example**:

curl -H "Authorization: Bearer sk_test_abc123..." \ https://api.example.com/v1/users


### Security Best Practices

- Never commit API keys to version control
- Rotate keys regularly (every 90 days)
- Use environment variables for key storage
- Different keys for development/production

OAuth 2.0 Documentation

## Authentication

This API uses OAuth 2.0 for authentication.

### Authorization Flow

1. **Redirect user to authorization URL**:

https://api.example.com/oauth/authorize? client_id=YOUR_CLIENT_ID& redirect_uri=YOUR_REDIRECT_URI& response_type=code& scope=read write

2. **User authorizes your app**

3. **Receive authorization code**:

https://your-redirect-uri?code=AUTH_CODE

4. **Exchange code for access token**:

curl -X POST https://api.example.com/oauth/token \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_CLIENT_SECRET" \ -d "code=AUTH_CODE" \ -d "grant_type=authorization_code"


1. **Use access token in requests**:

Authorization: Bearer ACCESS_TOKEN


### Scopes

| Scope | Description |
| --- | --- |
| `read` | Read access to resources |
| `write` | Create and update resources |
| `delete` | Delete resources |
| `admin` | Full administrative access |

Rate Limiting Documentation

## Rate Limiting

API requests are rate limited to ensure fair usage.

### Limits

| Tier | Requests per minute | Requests per day |
|------|-------------------|------------------|
| Free | 60 | 10,000 |
| Pro | 600 | 100,000 |
| Enterprise | Unlimited | Unlimited |

### Rate Limit Headers

Each response includes rate limit information:

X-RateLimit-Limit: 60 X-RateLimit-Remaining: 45 X-RateLimit-Reset: 1642247400

| Header | Description |
|--------|-------------|
| `X-RateLimit-Limit` | Total requests allowed in window |
| `X-RateLimit-Remaining` | Requests remaining in window |
| `X-RateLimit-Reset` | Unix timestamp when limit resets |

### Handling Rate Limits

When rate limited, you'll receive a `429 Too Many Requests` response:

{ "status": "error", "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "API rate limit exceeded", "retry_after": 42 } }


**Best practices**:

- Monitor `X-RateLimit-Remaining` header
- Implement exponential backoff
- Cache responses when possible
- Use webhooks instead of polling

Pagination Documentation

## Pagination

List endpoints return paginated results.

### Request Parameters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `page` | integer | 1 | Page number (1-indexed) |
| `limit` | integer | 20 | Items per page (max 100) |

### Example Request

GET /api/users?page=2&limit=50


### Response Format

{ "data": [ {...}, {...} ], "pagination": { "page": 2, "limit": 50, "total_pages": 10, "total_items": 487, "has_next": true, "has_prev": true }, "links": { "first": "/api/users?page=1&limit=50", "prev": "/api/users?page=1&limit=50", "next": "/api/users?page=3&limit=50", "last": "/api/users?page=10&limit=50" } }

From OpenAPI/Swagger Spec

Converting OpenAPI to Confluence

When given an OpenAPI specification:

  1. Extract metadata:

- API title and version - Base URL - Contact information

  1. Parse endpoints:

- HTTP method and path - Summary and description - Parameters (path, query, body) - Response schemas - Status codes

  1. Generate examples:

- Request examples in multiple languages - Response examples with real data - Error examples

  1. Add documentation:

- Authentication requirements - Rate limiting - Versioning strategy

Example: OpenAPI → Confluence

OpenAPI Spec:

paths:
  /users/{id}:
    get:
      summary: Get user by ID
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '404':
          description: User not found

Generated Confluence Page:

### GET /users/{id}
Retrieve user information by user ID.

#### Parameters

| Parameter | Type | Location | Required | Description |
|-----------|------|----------|----------|-------------|
| `id` | string | path | Yes | User ID |

#### Response (200 OK)

{ "id": "123", "username": "johndoe", "email": "john@example.com" }


#### Errors

- **404 Not Found**: User with specified ID does not exist

Code from Implementation

Extracting API Docs from Code

When documenting from actual code:

  1. Identify endpoints:

- Search for route definitions - Extract HTTP methods and paths

  1. Parse parameters:

- Look for request validation - Find query/body parameter definitions

  1. Extract responses:

- Identify return statements - Find response status codes

  1. Add context:

- Code comments - Function documentation - Type definitions

Example: Express.js → Confluence

Code:

/**
 * Create a new user
 * @route POST /api/users
 * @param {string} email - User email
 * @param {string} username - Username
 * @returns {object} Created user object
 */
app.post('/api/users', async (req, res) => {
  const { email, username } = req.body;

  if (!email || !username) {
    return res.status(400).json({
      error: 'Email and username are required'
    });
  }

  const user = await db.users.create({ email, username });

  res.status(201).json({ data: user });
});

Generated Documentation:

### POST /api/users
Create a new user account.

#### Request Body

{ "email": "user@example.com", "username": "johndoe" }


#### Response (201 Created)

{ "data": { "id": "123", "email": "user@example.com", "username": "johndoe" } }


#### Errors

- **400 Bad Request**: Email and username are required

Best Practices

1. Clear Naming

  • Use descriptive endpoint names
  • Follow REST conventions (GET, POST, PUT, DELETE)
  • Consistent resource naming

2. Complete Examples

  • Show real, working examples
  • Include authentication
  • Cover common use cases
  • Multiple languages (cURL, JavaScript, Python)

3. Error Documentation

  • Document all possible errors
  • Include error codes
  • Explain how to resolve errors
  • Show error response format

4. Versioning

  • Document version in URL (/v1/users)
  • Note deprecated endpoints
  • Maintain changelog
  • Migration guides between versions

5. Security

  • Authentication requirements clear
  • Note permissions needed
  • Security best practices
  • Data sensitivity warnings

Confluence Organization

API Documentation Structure


API Documentation Space ├── Overview │ ├── Getting Started │ ├── Authentication │ ├── Rate Limiting │ └── Versioning ├── Endpoints │ ├── Users API │ │ ├── GET /users │ │ ├── POST /users │ │ ├── GET /users/{id} │ │ ├── PUT /users/{id} │ │ └── DELETE /users/{id} │ ├── Posts API │ └── Comments API ├── Reference │ ├── Error Codes │ ├── Status Codes │ └── Data Models └── Guides ├── Quick Start ├── Common Patterns └── Best Practices

How I'll Help

When creating API documentation, I will:

  1. Analyze the API:

- Read code or OpenAPI spec - Identify endpoints and methods - Extract parameters and responses

  1. Structure documentation:

- Create logical sections - Organize by resource or functionality - Add navigation and links

  1. Generate examples:

- Multiple programming languages - Real, working code - Common use cases

  1. Add details:

- Authentication requirements - Error handling - Rate limiting - Best practices

  1. Create in Confluence:

- Convert to ADF format - Use proper formatting - Add code highlighting - Create tables

  1. Maintain:

- Update when API changes - Add deprecation notices - Version documentation

Example Interaction

You: "Document the new payment API I just implemented"

Me: "I'll create comprehensive API documentation for the payment API.

[Analyzes code and finds endpoints]

Found endpoints:

  • POST /api/payments - Create payment
  • GET /api/payments/{id} - Get payment status
  • POST /api/payments/{id}/refund - Refund payment

Creating Confluence documentation with:

  • Overview and authentication
  • Detailed endpoint documentation
  • Request/response examples in cURL, JavaScript, Python
  • Error codes and handling
  • Payment flow diagrams

Which Confluence space should I use?"

You: "Space 789012"

Me: [Creates comprehensive API documentation] "Created 'Payment API Documentation' in space 789012!

Includes:

  • 3 endpoint pages with full details
  • Authentication guide
  • Error reference
  • Code examples in 3 languages

Link: https://your-domain.atlassian.net/wiki/spaces/789012/pages/..."

平台分布

Claude Code

29.25%
按下载量换算1,827

windsurf

23.44%
按下载量换算1,464

trae

15.96%
按下载量换算997

OpenCode

11.51%
按下载量换算719

Codex

6.69%
按下载量换算418

Antigravity

3.12%
按下载量换算195

安全审计

暂无安全审计结果可展示。

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills