api-conventions
API design patterns and conventions for this project. Covers RESTful URL naming, response format standards, error handling, and authentication requirements. Use when writing or reviewing API endpoints, designing new APIs, or making decisions about request/response formats.
npx skills add huangjia2019/claude-code-engineering --skill api-conventions --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# API Design Conventions These are the API design standards for our project. Apply these conventions whenever working with API endpoints. ## URL Naming - Use plural nouns for resources: `/users`, `/orders`, `/products` - Use kebab-case for multi-word resources: `/order-items`, `/user-profiles` - Nested resources for belongsTo relationships: `/users/{id}/orders` - Maximum two levels of nesting; beyond that, use query parameters - Use query parameters for filtering: `/orders?status=active&limit=20` ## Response Format All API responses must follow this structure: ```json { "data": {}, "error": null, "meta": { "page": 1, "limit": 20, "total": 100 } } ``` - `data`: 成功时返回的业务数据 - `error`: 错误时返回错误对象 `{ code, message, details }`,成功时为 `null` - `meta`: 分页和元信息,列表接口必须返回 ## HTTP Status Codes - 200: 成功返回数据 - 201: 成功创建资源 - 400: 请求参数错误 - 401: 未认证 - 403: 无权限 - 404: 资源不存在 - 422: 业务逻辑错误 - 500: 服务器内部错误 ## Authentication - All endpoints require Bearer token unless explicitly marked as public - Public endpoints must be documented with `@public` annotation - Token format: `Authorization: Bearer <jwt-token>` ## Versioning - API version in URL path: `/api/v1/users` - Breaking changes require new version
- URL Naming
- Response Format
- HTTP Status Codes
- Authentication
- Versioning
What does the api-conventions skill do?
API design patterns and conventions for this project. Covers RESTful URL naming, response format standards, error handling, and authentication requirements. Use when writing or reviewing API endpoints, designing new APIs, or making decisions about request/response formats.
How do I install it?
Run `npx skills add huangjia2019/claude-code-engineering --skill api-conventions --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From huangjia2019/claude-code-engineering, a repository with 1,040 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
