Marketplace

documenting-apis

コードベース分析からAPI仕様ドキュメントを生成。 RESTエンドポイント、関数シグネチャ、型定義、スキーマを検出。 トリガー: API specification, endpoints, REST API, type definitions, OpenAPI, Swagger, API documentation.

allowed_tools: Read, Write, Grep, Glob, Bash, Task

$ インストール

git clone https://github.com/thkt/claude-config /tmp/claude-config && cp -r /tmp/claude-config/.ja/skills/documenting-apis ~/.claude/skills/claude-config

// tip: Run this command in your terminal to install the skill


name: documenting-apis description: > コードベース分析からAPI仕様ドキュメントを生成。 RESTエンドポイント、関数シグネチャ、型定義、スキーマを検出。 トリガー: API specification, endpoints, REST API, type definitions, OpenAPI, Swagger, API documentation. allowed-tools: Read, Write, Grep, Glob, Bash, Task

docs:api - API仕様生成

コードベース分析からAPIドキュメントを自動生成。

検出項目

カテゴリ対象
RESTエンドポイントExpress, Fastify, Hono, Next.js, Flask, FastAPI, Django REST
関数tree-sitter抽出、TypeScript型、JSDoc、docstrings
interface, type, Zod, Yup, dataclass, Pydantic
OpenAPIopenapi.yaml/json, swagger.yaml/json

フレームワーク検出パターン

フレームワークパターン
Express/Fastify/Honoapp.get(), router.post()
Next.jsapp/api/**/route.ts, pages/api/**/*.ts
Flask@app.route()
FastAPI@app.get(), @app.post()
Django REST@api_view

分析スクリプト

スクリプト目的
scripts/detect-endpoints.shHTTPメソッド、パス、ハンドラー、ファイル位置
scripts/extract-types.sh型名、フィールド、関連型

生成構造

# API仕様

## エンドポイント一覧
### GET /api/users
**リクエスト**: paramsテーブル
**レスポンス**: JSON例

## 型定義
### User
| フィールド | 型 | 説明 |

使用方法

/docs:api                    # APIドキュメント生成
"Generate API specification" # 自然言語

Markdownバリデーション

生成後、出力を検証:

~/.claude/skills/scripts/validate-markdown.sh {output-file}

ブロッキングなし(警告のみ) - スタイル問題はドキュメント作成をブロックしない。

参照

  • 関連: documenting-architecture, setting-up-docs, documenting-domains