backend-api

设计并实现遵循REST原则的RESTful API端点,使用适当的HTTP方法、状态代码和URL约定。在创建或修改API路由、路由处理器、API端点文件、处理HTTP请求和响应的控制器文件或定义RESTful端点的任何服务器端文件时使用此技能。在处理API版本控制、实施速率限制、设计基于资源的URL、处理用于过滤/排序/分页的查询参数或构建嵌套资源端点时使用。在编写routes.js、api.js、controllers/、handlers/、endpoints/或任何定义HTTP API路由和响应的文件中的代码时使用。

📖 中文导读:设计并实现遵循REST原则的RESTful API端点,使用适当的HTTP方法、状态代码和URL约定。在创建或修改API路由、路由处理器、API端点文件、处理HTTP请求和响应的控制器文件或定义RESTful端点的任何服务器端文件时使用此技能。在处理API版本控制、实施速率限制、设计基于资源的URL、处理用于过滤/排序/分页的查询参数或构建嵌套资源端点时使用。在编写routes.js、api.js、controllers/、handlers/、endpoints/或任何定义HTTP API路由和响应的文件中的代码时使用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: Backend API description: Design and implement RESTful API endpoints following REST principles with proper HTTP methods, status codes, and URL conventions. Use this skill when creating or modifying API routes, route handlers, API endpoint files, controller files that handle HTTP requests and responses, or any server-side files that define RESTful endpoints. Use this when working on API versioning, implementing rate limiting, designing resource-based URLs, handling query parameters for filtering/sorting/pagination, or structuring nested resource endpoints. Use this when writing code in files like routes.js, api.js, controllers/, handlers/, endpoints/, or any file that defines HTTP API routes and responses.

Backend API

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.

When to use this skill:

  • When creating or editing API route definition files (e.g., routes.js, api.ts, router.js)
  • When writing or modifying API controller files that handle HTTP requests and responses
  • When implementing RESTful endpoints with HTTP methods (GET, POST, PUT, PATCH, DELETE)
  • When designing resource-based URL structures (e.g., /users, /products, /orders)
  • When implementing API versioning strategies in your endpoints
  • When adding query parameters for filtering, sorting, pagination, or search functionality
  • When setting up rate limiting headers and response structures
  • When returning appropriate HTTP status codes (200, 201, 400, 404, 500, etc.)
  • When working on nested resource endpoints
  • When structuring consistent API response formats

Instructions

For details, refer to the information provided in this file: backend API