vue3/skills/yapi-specialist/SKILL.md
处理 YApi 接口文档相关任务。支持打开接口文档、独立生成类型定义,以及在解析接口实现代码时同步生成类型和注释。
npx skillsauth add linzb93/ai-coding-docs yapi-specialistInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
这是一个专注于处理 YApi 接口文档相关任务的 Skill。
type.ts)。指令: 用户请求打开文档 (e.g., "打开 /api/demo... 的文档")。
操作:
node .claude/skills/yapi-specialist/scripts/open-yapi.js <api_path>
docs/api/index.json,匹配路径,构建 URL 并调用系统浏览器打开。指令: 用户请求生成类型 (e.g., "生成这个接口的类型", "只生成 type.ts")。
操作步骤:
解析文档:
node .claude/skills/yapi-specialist/scripts/create/index.js {url}
project_id 和 doc_id。docs/api/content/{project_id}-{doc_id} 目录下找到 origin.json。生成文件:
type.ts 文件。types/index.ts,优先遵循现有规范,否则创建 type.ts。result 字段。
result: 提取 result 字段内部的结构作为主要类型定义。origin.json 数据导出 Interface 定义。指令: 用户提供 YApi 接口文档地址 (e.g., "解析这个接口 http://...", "根据这个文档修改代码")。
操作步骤:
解析生成说明文件:
node .claude/skills/yapi-specialist/scripts/create/index.js {url}
api.md 用于参考。生成接口类型 (type.ts):
type.ts 存在且是最新的。生成/修改业务代码:
cycle -> days),包括script和template里面,禁止使用映射/Adapter。@file 注释,链接格式: http://192.168.0.107:3000/project/{projectId}/interface/api/{id} (通过查找 docs/api/index.json 获取)。api-docs.md 文件进行修改,确保与文档保持一致。mock.json 文件。shared/api.js 文件中修改接口地址。types/index.ts 文件中修改接口出入参类型。/**
* @file http://192.168.0.107:3000/project/1386/interface/api/97271
* @type {import('./types').IMConfig}
*/
await post('/api/demo', {
data: 1,
});
/**
* IM配置接口
* @file http://192.168.0.107:3000/project/1386/interface/api/97271
*/
export interface IMConfig {
data: number;
}
testing
专注 Vue3 页面还原与样式实现,仅负责 UI,不写任何逻辑代码。上传设计稿时调用。
testing
识别原型图需求并实现业务逻辑。上传原型图要求分析需求,编写交互逻辑时调用。
tools
将 Vue 3 script setup 代码按逻辑块进行组织,并使用中文注释分隔。当用户要求整理 Vue 代码或清理 script setup 时调用。
testing
根据 Git 分支和原型图自动生成标准化测试验收清单(Auto/Manual)