- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add JackyST0/awesome-agent-skills --skill api-doc-generator -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add JackyST0/awesome-agent-skills --skill api-doc-generator -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add JackyST0/awesome-agent-skills --skill api-doc-generator -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add JackyST0/awesome-agent-skills --skill api-doc-generator -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/JackyST0/awesome-agent-skills/tree/HEAD/examples/api-doc-generator來自發布者
根据代码生成 API 文档,支持 REST API、GraphQL 及多种文档格式。
Generate API documentation from source code, supporting REST APIs, GraphQL, and various documentation formats.
当用户请求以下操作时使用此 skill:
每个 API 端点应包含:
支持以下文档格式:
templates/api-doc.md 模板Use templates/api-doc.md for Markdown output format.
## API 文档 / API Documentation
### 端点概览 / Endpoint Overview
| 方法 | 路径 | 描述 |
|------|------|------|
| GET | /api/resource | 获取资源列表 |
### 详细说明 / Details
#### [方法] /path
**描述**: ...
**请求参数**:
| 参数 | 类型 | 必需 | 描述 |
|------|------|------|------|
**请求示例**:
```json
{}
```
**响应示例**:
```json
{}
```
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
描述: 根据用户 ID 获取用户信息
路径参数:
响应 200 - 成功:
{
"id": 1,
"name": "John",
"email": "[email protected]"
}
响应 404 - 未找到:
{
"detail": "User not found"
}
描述: 创建新用户
请求体:
请求示例:
{
"id": 1,
"name": "John",
"email": "[email protected]"
}
响应 200 - 成功:
{
"id": 1,
"name": "John",
"email": "[email protected]"
}
Generate API documentation from source code, supporting REST APIs, GraphQL, and various documentation formats.
---name: api-doc-generatordescription: Generate API documentation from source code, supporting REST APIs, GraphQL, and various documentation formats.---# examples/api-doc-generator/SKILL.md常見問題
從發布者下載 examples/api-doc-generator/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/JackyST0/awesome-agent-skills。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。