AgentSkillsCN

Backend API

遵循行业最佳实践,设计并实现RESTful API端点。当创建API路由、控制器或端点处理器时,可使用此技能。适用于routes.ts、api/*.ts、controllers/*.ts等文件,或任何服务器端端点定义的开发工作。对于实现CRUD操作、处理HTTP方法(GET、POST、PUT、PATCH、DELETE)、设计URL结构、实施版本控制、设置用于过滤/排序/分页的查询参数,以及返回正确的HTTP状态码而言,此项技能至关重要。

SKILL.md
--- frontmatter
name: Backend API
description: Design and implement RESTful API endpoints following industry best practices. Use this skill when creating API routes, controllers, or endpoint handlers. Apply when working on files like routes.ts, api/*.ts, controllers/*.ts, or any server-side endpoint definitions. Essential for implementing CRUD operations, handling HTTP methods (GET, POST, PUT, PATCH, DELETE), designing URL structures, implementing versioning, setting up query parameters for filtering/sorting/pagination, and returning proper HTTP status codes.

When to use this skill:

  • When creating new API endpoints or routes
  • When editing files in /api/, /routes/, or /controllers/ directories
  • When implementing CRUD operations for resources
  • When designing URL structures and resource naming
  • When adding query parameters for filtering, sorting, or pagination
  • When setting HTTP status codes for responses
  • When implementing API versioning strategies
  • When adding rate limiting headers to responses
  • When working with nested resource endpoints

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