Stats
Actions
Tags
How this skill is triggered — by the user, by Claude, or both
Slash command
/cc-plugins:yapi-fetchExploreThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. **凭证检查(优先级最高)**:
凭证检查(优先级最高): 在执行任何 yapi 网络请求之前,必须检查当前对话上下文中是否包含【yapi_token】。
"请提供您的 YApi Token 以继续获取接口文档(如果服务地址不是默认的 http://10.10.48.2:30001/,也请一并提供)。"
输入参数:
host: YApi 服务地址。如果用户未指定,默认使用 http://10.10.48.2:30001/。token: 必填项。禁止使用文档例子中的 Token。interface_path: 用户想要查询的接口路径(例如 /api/user/info)。${host}/api/interface/list?token=${token}&page=1&limit=1000。data 数组中,查找 path 字段等于 ${interface_path} 的对象,并提取其 _id。${host}/api/interface/get?token=${token}&id=${_id}。Path: /api/interface/get
Method: GET
接口描述:
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
| 参数名称 | 是否必须 | 示例 | 备注 |
|---|---|---|---|
| id | 是 | 接口id | |
| token | 是 |
| 名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
|---|---|---|---|---|---|
| errcode | number | 非必须 | |||
| errmsg | string | 非必须 | |||
| data | object | 非必须 | |||
| ├─ _id | number | 非必须 | 接口id | ||
| ├─ project_id | number | 非必须 | 项目id | ||
| ├─ catid | number | 非必须 | 品类id | ||
| ├─ title | string | 非必须 | |||
| ├─ path | string | 非必须 | 请求路径 | ||
| ├─ method | string | 非必须 | 请求method | ||
| ├─ req_body_type | string | 非必须 | 请求数据类型 | 枚举: raw,form,json | |
| ├─ res_body | string | 非必须 | 返回数据 | ||
| ├─ res_body_type | string | 非必须 | 返回数据类型 | 枚举: json,raw | |
| ├─ uid | number | 非必须 | 用户uid | ||
| ├─ add_time | number | 非必须 | |||
| ├─ up_time | number | 非必须 | |||
| ├─ req_body_form | object [] | 非必须 | 请求 form 参数 | item 类型: object | |
| ├─ name | string | 必须 | |||
| ├─ type | string | 必须 | |||
| ├─ example | string | 必须 | |||
| ├─ desc | string | 必须 | |||
| ├─ required | string | 必须 | 1 | 枚举: 1,0 | |
| ├─ req_params | object [] | 非必须 | item 类型: object | ||
| ├─ name | string | 必须 | |||
| ├─ example | string | 必须 | |||
| ├─ desc | string | 必须 | |||
| ├─ req_headers | object [] | 非必须 | item 类型: object | ||
| ├─ name | string | 必须 | |||
| ├─ type | string | 必须 | |||
| ├─ example | string | 必须 | |||
| ├─ desc | string | 必须 | |||
| ├─ required | string | 必须 | 1 | 枚举: 1,0 | |
| ├─ req_query | object [] | 非必须 | item 类型: object | ||
| ├─ name | string | 必须 | |||
| ├─ type | string | 必须 | |||
| ├─ example | string | 必须 | |||
| ├─ desc | string | 必须 | |||
| ├─ required | string | 必须 | 1 | 枚举: 1,0 | |
| ├─ status | string | 非必须 | 接口状态 | ||
| ├─ edit_uid | number | 非必须 | 修改的用户uid | ||
| ├─ res_body_is_json_schema | boolean | 必须 | false | 返回数据是否为 json-schema |
Path: /api/interface/list
Method: GET
接口描述:
| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 |
|---|---|---|---|---|
| Content-Type | application/json | 是 |
| 参数名称 | 是否必须 | 示例 | 备注 |
|---|---|---|---|
| token | 是 | ||
| page | 是 | 1 | 当前页数 |
| limit | 是 | 10 | 每页数量,默认为10,如果不想要分页数据,可将 limit 设置为比较大的数字,比如 1000 |
{
"errcode": 0,
"errmsg": "成功!",
"data": [
{
"_id": 4444,
"project_id": 299,
"catid": 1376,
"title": "/api/group/del",
"path": "/api/group/del",
"method": "POST",
"uid": 11,
"add_time": 1511431246,
"up_time": 1511751531,
"status": "undone",
"edit_uid": 0
}
]
}
yapi 服务调用例子
http://10.10.48.2:30001/api/interface/list?token=59cfde22eb042cd19c5a55f93bacc23e6fb78ac5264097546dbf9f830ef89a1d&page=1&limit=1000
http://10.10.48.2:30001/api/interface/get?token=59cfde22eb042cd19c5a55f93bacc23e6fb78ac5264097546dbf9f830ef89a1d&id=30998
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub liubei90/claude-plugins --plugin cc-plugins