AGENT SKILL
api-generator
Scaffolds a versioned REST route, its zod schema, and the matching test file.
- License 许可
- MIT
- 最近更新
- 2026-11-06
- Stars
- ★ 28
- Forks
- 7
01 前言 Front Matter
- name
- api-generator
- description
- Scaffolds a versioned REST route, its zod schema, and the matching test file.
02 资源文件 2
- 参考文档references/route-checklist.md454 B
- 脚本scripts/scaffold.ts951 B
03 SKILL.md 正文
API generator
Use this when a task asks for a new endpoint under /v1.
Steps
- Read references/route-checklist.md and confirm every box applies.
- Run
scripts/scaffold.tswith the resource name in kebab-case. - Register the router in src/server/routes.ts.
- Write the failing test first, then implement the handler.
Conventions
- Request and response bodies are validated by zod on both ends.
- Errors return
{ error: { code, message } }; never leak a stack trace. - Pagination is cursor based (
?cursor=,?limit=), never offset based.
04 同仓库更多 Skills
research
Research docs and summarize decisions
★ 28
debugging
Systematic debugging workflow for production failures and test regressions.
★ 28
api-generator
Generate REST API endpoints with validation and tests
★ 28
debugging
Systematic debugging workflow for production failures and test regressions.
★ 28
typescript-pro
Apply advanced TypeScript patterns including conditional types, template literal types, and mapped types
★ 28
debugging
Systematic debugging workflow for Replit projects
★ 28