AgentSkillsCN

Backend API

设计和实现 RESTful API 端点,遵循 URL 结构、HTTP 方法、状态码、版本控制和速率限制的最佳实践。在创建或修改 API 路由、控制器、端点处理器,或路由文件时使用此技能。在 routes.ts、api/*.ts、controllers/*.ts、endpoints/*.py、views.py,或任何服务器端请求处理器的文件中工作时使用。在设计资源 URL、实现 CRUD 操作、添加查询参数进行过滤/排序/分页,或设置 API 版本控制时使用。在审查或重构现有 API 代码以符合 REST 时使用。

SKILL.md
--- frontmatter
name: Backend API
description: Design and implement RESTful API endpoints following best practices for URL structure, HTTP methods, status codes, versioning, and rate limiting. Use this skill when creating or modifying API routes, controllers, endpoint handlers, or route files. When working on files like routes.ts, api/*.ts, controllers/*.ts, endpoints/*.py, views.py, or any server-side request handlers. When designing resource URLs, implementing CRUD operations, adding query parameters for filtering/sorting/pagination, or setting up API versioning. When reviewing or refactoring existing API code for REST compliance.

When to use this skill:

  • When creating new API endpoints or routes
  • When modifying existing endpoint handlers or controllers
  • When working on files in api/, routes/, controllers/, or endpoints/ directories
  • When implementing CRUD operations (Create, Read, Update, Delete)
  • When adding filtering, sorting, or pagination to endpoints
  • When setting up API versioning (URL path or header-based)
  • When choosing HTTP methods (GET, POST, PUT, PATCH, DELETE)
  • When determining appropriate HTTP status codes for responses
  • When designing resource-based URL structures
  • When implementing rate limiting headers
  • When reviewing API code for RESTful best practices

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.

Instructions

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