backend-api
设计并实现遵循REST原则的RESTful API端点,具有明确的基于资源的URL和适当的HTTP方法。在创建API路由、定义API端点、实现HTTP请求处理程序、处理路由文件(routes.ts, route.ts, api/*, controllers/*, handlers/*)、构建REST API、设计API版本控制策略、设置用于过滤和分页的查询参数、实现速率限制或返回适当的HTTP状态码时使用此技能。在构建后端API架构、创建新API端点、重构现有端点或审查API设计以保持一致性和最佳实践时应用此技能。
📖 中文导读:设计并实现遵循REST原则的RESTful API端点,具有明确的基于资源的URL和适当的HTTP方法。在创建API路由、定义API端点、实现HTTP请求处理程序、处理路由文件(routes.ts, route.ts, api/*, controllers/*, handlers/*)、构建REST API、设计API版本控制策略、设置用于过滤和分页的查询参数、实现速率限制或返回适当的HTTP状态码时使用此技能。在构建后端API架构、创建新API端点、重构现有端点或审查API设计以保持一致性和最佳实践时应用此技能。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Backend API description: Design and implement RESTful API endpoints following REST principles with clear resource-based URLs and appropriate HTTP methods. Use this skill when creating API routes, defining API endpoints, implementing HTTP request handlers, working on route files (routes.ts, route.ts, api/, controllers/, handlers/*), building REST APIs, designing API versioning strategies, setting up query parameters for filtering and pagination, implementing rate limiting, or returning appropriate HTTP status codes. Apply this skill when structuring backend API architecture, creating new API endpoints, refactoring existing endpoints, or reviewing API design for consistency and best practices.
Backend API
When to use this skill
- When creating or modifying API route files (e.g.,
app/api/*/route.ts,pages/api/*.ts,routes/*.ts,controllers/*.ts) - When designing new API endpoints or refactoring existing endpoint structures
- When implementing HTTP request handlers (GET, POST, PUT, PATCH, DELETE)
- When setting up RESTful resource-based URL patterns
- When adding versioning to your API (URL path or header-based)
- When implementing query parameters for filtering, sorting, pagination, or search
- When defining HTTP status codes for API responses
- When adding rate limiting headers or functionality to API endpoints
- When reviewing API architecture for consistency with REST principles
- When working with nested resource endpoints
- When structuring API error responses and success responses
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend API.
Instructions
For details, refer to the information provided in this file: backend API