Token导航 LogoToken导航TokenDH.com
效率敏感数据clawhub未标认证来源可访问clear审计通过

api-documentation-generatorAPI 文档生成器

Agent Skill

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

总安装

906

周安装

37

GitHub Stars

公开资料未说明

下载量

293
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install api-documentation-generator

简介

从代码生成全面的 API 文档 — 从 Express、FastAPI、Django、Rails 等中提取端点、参数、响应模式和示例

SKILL.md

name
api-documentation-generator
description
Generate comprehensive API documentation from code — extract endpoints, parameters, response schemas, and examples from Express, FastAPI, Django, Rails, and more.
metadata
tags
["api", "documentation", "openapi", "swagger", "developer-experience"]

API Documentation Generator

Generate comprehensive API documentation by analyzing source code. Extracts endpoints, parameters, request/response schemas, authentication requirements, and generates examples. Works with Express, FastAPI, Django REST Framework, Rails, Spring Boot, and other frameworks.

Usage

"Generate API docs from my Express app"
"Create API reference documentation"
"Document all endpoints in this project"
"Generate OpenAPI spec from my code"

How It Works

1. Framework Detection

# Detect framework from dependencies
cat package.json 2>/dev/null | python3 -c "
import json,sys
d=json.load(sys.stdin).get('dependencies',{})
for fw in ['express','fastify','koa','hapi','nestjs','next']:
    if fw in str(d): print(f'Node: {fw}')
" 2>/dev/null

cat requirements.txt setup.py pyproject.toml 2>/dev/null | grep -i "fastapi\|django\|flask\|starlette"

2. Endpoint Extraction

Scan source code for route definitions:

Express/Node:

grep -rn "router\.\(get\|post\|put\|patch\|delete\|all\)\|app\.\(get\|post\|put\|patch\|delete\)" src/ routes/

FastAPI/Python:

grep -rn "@app\.\(get\|post\|put\|patch\|delete\)\|@router\.\(get\|post\|put\|patch\|delete\)" src/ app/

Django REST Framework:

grep -rn "class.*ViewSet\|class.*APIView\|path(" */views.py */urls.py

For each endpoint, extract:

  • HTTP method and path
  • URL parameters and query parameters
  • Request body schema (from TypeScript types, Pydantic models, serializers)
  • Response format and status codes
  • Authentication requirements
  • Middleware chain
  • Rate limiting rules

3. Schema Extraction

Analyze types/models for request/response schemas:

  • TypeScript interfaces and types
  • Pydantic models with field validators
  • Django serializers with field definitions
  • Joi/Zod validation schemas
  • JSON Schema definitions

4. Example Generation

Generate realistic request/response examples:

  • Valid request with all required fields
  • Response with realistic data
  • Error response examples (400, 401, 403, 404, 500)
  • Curl command for quick testing
  • SDK examples in popular languages

5. Documentation Output

Generate in multiple formats:

Markdown API Reference:

## POST /api/users

Create a new user account.

**Authentication:** Bearer token required
**Rate limit:** 10 requests/minute

### Request Body
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| email | string | yes | Valid email address |
| name | string | yes | Full name (2-100 chars) |
| role | enum | no | "user" or "admin" (default: "user") |

### Response (201 Created)

{ "id": "usr_abc123", "email": "user@example.com", "name": "Jane Smith", "role": "user", "createdAt": "2026-04-30T10:00:00Z" }


### Errors
- `400` — Invalid email format or missing required field
- `409` — Email already registered
- `429` — Rate limit exceeded

OpenAPI 3.1 spec — machine-readable for Swagger UI, Redoc, Postman

6. Completeness Check

Verify documentation quality:

  • All endpoints documented
  • All parameters described
  • Response schemas match actual responses
  • Authentication documented
  • Error codes listed
  • Examples present and valid

Output

## API Documentation Generated

**Framework:** Express.js + TypeScript
**Endpoints found:** 23
**Documentation completeness:** 87%

### Generated Files
- docs/api-reference.md (full markdown reference)
- docs/openapi.yaml (OpenAPI 3.1 spec)
- docs/examples/ (curl examples per endpoint)

### Coverage
| Category | Endpoints | Documented | Missing |
|----------|-----------|------------|---------|
| Auth | 4 | 4 (100%) | — |
| Users | 6 | 5 (83%) | PATCH /users/:id |
| Orders | 8 | 7 (88%) | webhook handler |
| Admin | 5 | 5 (100%) | — |

### Undocumented
- PATCH /api/users/:id — has route but no type annotations
- POST /api/webhooks/stripe — raw req.body, no schema

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

81.46%
按下载量换算239

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

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

安装前确认

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

来源信息

继续浏览同类 Skills