Agent skill
generate-apis
基于 yapi mcp 返回的数据生成对应的 API 文件
Install this agent skill to your Project
npx add-skill https://github.com/zwmmm/k12-skills/tree/main/skills/api-specification
SKILL.md
这项技能专注于生成 APIs 文件,包含 request 函数、对应的出入参类型,不同的文件需要放在指定的文件夹下,并且生成的类型文件需要继承或者复用公共的基础类型
用户提供对应的 yapi 文档地址
使用指南
- 接口数据使用
yapi-auto-mcp获取,如果遇到没有权限则通知用户配置 - API 请求放在
packages/services/src目录下,使用@repo/services包能拿到对应的函数,需要按照项目放到对应的文件内 - 类型文件放在
packages/types/src目录下,使用@repo/types包能拿到对应的函数,需要按照项目放到对应的文件内 - API 格式参考
examples/fn.ts文件 - type 格式参考
examples/types.ts文件
公共文件
- 公共 type 文件地址
packages/types/src/common.ts
关键词
yapi,YAPI,API,接口
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
obsidian-vault
Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.
handoff
Compact the current conversation into a handoff document for another agent to pick up.
migrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
scaffold-exercises
Create exercise directory structures with sections, problems, solutions, and explainers that pass linting. Use when user wants to scaffold exercises, create exercise stubs, or set up a new course section.
git-guardrails-claude-code
Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.
Didn't find tool you were looking for?