一键导入
api-generating
// Generate API endpoint documentation from Express route files. Use when the user asks to generate, update, or review API docs for Express.js routes.
// Generate API endpoint documentation from Express route files. Use when the user asks to generate, update, or review API docs for Express.js routes.
| name | api-generating |
| description | Generate API endpoint documentation from Express route files. Use when the user asks to generate, update, or review API docs for Express.js routes. |
| allowed-tools | ["Read","Grep","Glob","Write","Bash(python *)"] |
IMPORTANT: You MUST follow these steps in order. DO NOT skip or substitute any step.
You MUST use the Python script for route detection:
python3 skills/scripts/detect-routes.py src/
DO NOT manually search for routes using Grep — the script handles edge cases (dynamic routes, middleware-mounted sub-routers, re-exported routes) that Grep patterns will miss.
For each route discovered by the script:
requireAuth, isAdmin)validate(schema))Use the template at templates/api-doc.md to generate documentation.
Output rules:
docs/api/users.md)scripts/detect-routes.pytemplates/api-doc.mdBefore finishing, verify:
React 组件设计模式、Hooks 使用指南、性能优化技巧
Review code for quality, security, and best practices. Use when the user asks for code review, wants feedback on their code, mentions reviewing changes, or asks about code quality.
Review code for quality, security, and best practices. Use when the user asks for code review, wants feedback on their code, mentions reviewing changes, or asks about code quality.
Generate an interactive tree visualization of your codebase. Use when exploring a new repo or understanding project structure.
Generate an interactive tree visualization of your codebase. Use when exploring a new repo or understanding project structure.
Generate API endpoint code and documentation from specifications. Use when the user wants to create new API endpoints, generate route handlers, scaffold REST APIs, or produce OpenAPI/Swagger specs from code.