AgentSkillsCN

Backend API

按照REST原则设计和实现RESTful API端点,遵循一致的命名规范、正确的HTTP方法、版本策略和适当的状态码。在创建新API端点、设计API路由结构、实现API控制器或路由、定义API版本策略、设置API限流或处理查询参数进行过滤、排序和分页时使用此技能。在处理routes/api.php文件、API控制器文件、API资源转换器或任何向客户端暴露HTTP API端点的后端代码时适用。

SKILL.md
--- frontmatter
name: Backend API
description: Design and implement RESTful API endpoints following REST principles with consistent naming conventions, proper HTTP methods, versioning strategies, and appropriate status codes. Use this skill when creating new API endpoints, designing API route structures, implementing API controllers or routes, defining API versioning strategies, setting up API rate limiting, or working with query parameters for filtering, sorting, and pagination. This skill applies when working on routes/api.php files, API controller files, API resource transformers, or any backend code that exposes HTTP API endpoints to clients.

Backend API

When to use this skill

  • When creating new RESTful API endpoints for your application
  • When designing API route structures and URL patterns
  • When implementing API controllers (e.g., app/Http/Controllers/Api/)
  • When defining API versioning strategies (URL-based or header-based)
  • When setting up API rate limiting and throttling
  • When working with query parameters for filtering, sorting, and pagination
  • When defining HTTP status codes for API responses
  • When working on routes/api.php or similar API route definition files
  • When creating API resource transformers or response formatters
  • When implementing nested resource endpoints
  • When designing consistent API naming conventions

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