AgentSkillsCN

backend-api

遵循JAX-RS规范与DDD原则,构建并维护REST API端点。在创建或修改API资源类、以恰当的HTTP方法与状态码实现REST端点、添加JAX-RS注解(@GET、@POST、@PUT、@DELETE、@Path)、将领域服务注入资源,或为API方法添加调试日志时,均可运用此技能。适用文件包括*Resource.java、*Controller.java、*Endpoint.java,以及基础设施层或API层中负责处理HTTP请求与响应的各类代码。

SKILL.md
--- frontmatter
name: backend-api
description: Build and maintain REST API endpoints following JAX-RS patterns and DDD principles. Use this skill when creating or modifying API resource classes, implementing REST endpoints with proper HTTP methods and status codes, adding JAX-RS annotations (@GET, @POST, @PUT, @DELETE, @Path), injecting domain services into resources, or adding debug logging to API methods. Applies to files like *Resource.java, *Controller.java, *Endpoint.java, and any code in infrastructure or API layers that handles HTTP requests and responses.

When to use this skill

  • When creating new REST API endpoints or resource classes
  • When adding JAX-RS annotations (@GET, @POST, @PUT, @DELETE, @Path)
  • When implementing Response objects with proper HTTP status codes
  • When injecting and delegating to domain services from API resources
  • When adding debug logging to API endpoint methods
  • When working on files in infrastructure/ or api/ directories
  • When handling request/response DTOs in API layers
  • When implementing error responses (NOT_FOUND, BAD_REQUEST, etc.)
  • When editing *Resource.java, *Controller.java, or *Endpoint.java files

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