返回 Skill 列表
extension
分类: 开发与工程无需 API Key

backend-api

根据路由、版本控制和HTTP标准的最佳实践设计并实现RESTful API端点。在创建或修改routes/api.php文件中的API路由、app/Http/Controllers/Api/目录下的API控制器文件、app/Http/Controllers/目录下的控制器文件、API资源类,或者实现REST API功能时使用此技能。当处理URL结构、HTTP方法处理(GET、POST、PUT、PATCH、DELETE)、API版本策略、用于过滤/排序/分页的查询参数处理、HTTP状态码响应、速率限制配置或任何API端点设计决策时使用。

person作者: jakexiaohubgithub

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 definitions in routes/api.php or similar routing files
  • When building or modifying controllers in app/Http/Controllers/ or controller directories
  • When building or modifying API controllers in app/Http/Controllers/Api/ or API-specific controller directories
  • When implementing RESTful endpoints with proper HTTP methods (GET, POST, PUT, PATCH, DELETE)
  • When designing URL structures and resource-based API paths
  • When implementing API versioning (URL path versioning like /api/v1/ or header-based versioning)
  • When configuring query parameters for filtering, sorting, pagination, or search functionality
  • When determining appropriate HTTP status codes for API responses (200, 201, 400, 404, 500, etc.)
  • When implementing rate limiting headers or API throttling
  • When creating nested resource routes or working with resource relationships in APIs
  • When writing API resource transformation classes or response formatting logic

Instructions

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