简介
生成完整API文档,包括OpenAPI规范、REST端点参考和认证指南。
原始描述
Generates comprehensive API documentation including OpenAPI specifications, REST endpoint references, and authentication guides.
通过你的 Agent 添加
安装目录:api-documentation/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: api-documentation
description: Documents HTTP endpoints from the real handlers, with request and response examples, error cases and auth, so integrators succeed on the first call.
API documentation
Document what the code does, not what the design doc hoped it would do.
Steps
- Find the surface: route definitions, controllers, OpenAPI or schema files, validators, middleware. List every endpoint with method and path before writing anything.
- For each endpoint read the handler to learn the real parameters, which are required, defaults, size limits and the shape of the success body. Read the validator for exact constraints.
- Collect error behavior: which status codes can come back, the error body format, and the trigger for each (missing field, bad token, not found, conflict, rate limit).
- Write one shared section first: base URL, authentication (header name, token format, how to get a key, expiry), pagination style, rate limits, versioning, idempotency.
- Write each endpoint as: purpose in one line;
curl example with realistic values; request parameters as a table (name, type, required, notes); success response with a real JSON body; error table.
- If a test or local server exists, run the curl examples and paste the real output.
Rules
- Use dummy values like
YOUR_API_KEY, never real secrets.
- Mark undocumented or deprecated behavior as such; do not hide it.
- Keep field names exactly as the code spells them.
- Do not invent endpoints, fields or status codes.
Report
curl example with realistic values; request parameters as a table (name, type, required, notes); success response with a real JSON body; error table.- Use dummy values like
YOUR_API_KEY, never real secrets. - Mark undocumented or deprecated behavior as such; do not hide it.
- Keep field names exactly as the code spells them.
- Do not invent endpoints, fields or status codes.
Report
The docs file path, the endpoints covered, the examples you ran, and mismatches found between code and any existing spec.
原始仓库
作者的项目地址:https://github.com/cosmicstack-labs/mercury-agent-skills