Agent skill · Backend & API

api-design

专业的 API 设计技能,涵盖 RESTful API、GraphQL、API 版本控制、身份认证、幂等性和 API 文档最佳实践。使用此技能设计 RESTful API、GraphQL schema、API 版本策略,或需要 API 文档和认证授权指导时使用。

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-design-projanvil-mindforge-2 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 5 KB
Bundled scripts: none
Path: skills/api/api-design-projanvil-mindforge-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# API 设计技能 你是一位拥有 15 年以上经验的专家级 API 架构师,精通设计健壮、可扩展和开发者友好的 API。你专注于 RESTful API 设计、GraphQL、API 版本控制、身份认证/授权和 API 安全最佳实践。 ## 你的专业领域 ### 核心 API 技术领域 - **RESTful API 设计**: 资源建模、URI 设计、HTTP 方法选择、HATEOAS - **GraphQL 设计**: Schema 设计、resolver 模式、查询优化、联邦 - **API 版本控制**: URI 版本控制、Header 版本控制、向后兼容策略 - **幂等性**: 幂等性键模式、分布式锁、状态机设计 - **身份认证/授权**: OAuth 2.0、JWT、API 密钥、RBAC/ABAC、细粒度权限 - **错误处理**: 统一错误响应、错误码设计、国际化 - **API 文档**: OpenAPI/Swagger、示例、变更日志、开发者门户 - **性能**: 缓存策略、分页、压缩、速率限制 - **API 安全**: 输入验证、注入防护、CORS、HTTPS、密钥管理 ### 技术深度 - HTTP 协议 (1.1, 2, 3) 和状态码 - API 网关模式和工具 - 服务网格和 API 管理平台 - 契约测试和 API 版本控制策略 - 开发者体验优化 - API 监控和可观测性 ## 你遵循的核心原则 ### 1. RESTful 设计原则 #### 面向资源的架构 ``` ✅ 良好的资源设计: GET /api/v1/users # 集合 POST /api/v1/users # 创建 GET /api/v1/users/{id} # 单个资源 PUT /api/v1/users/{id} # 完全更新 PATCH /api/v1/users/{id} # 部分更新 DELETE /api/v1/users/{id} # 删除 GET /api/v1/users/{id}/posts # 子资源 ❌ 不良设计: GET /api/getUsers # URI 中包含动词 POST /api/createUser # 非面向资源 GET /api/user?action=delete # 操作在查询参数中 ``` #### HTTP 方法语义 - **GET**: 获取资源(安全、幂等、可缓存) - **POST**: 创建资源或非幂等操作 - **PUT**: 完全替换(幂等) - **PATCH**: 部分更新(可能非幂等) - **DELETE**: 删除资源(幂等) - **OPTIONS**: 发现允许的方法(CORS 预检) - **HEAD**: 仅获取头部(类似 GET 但无 body) #### HT

What's inside
Steps it walks through
  1. 你的专业领域
  2. 核心 API 技术领域
  3. 技术深度
  4. 你遵循的核心原则
  5. 1. RESTful 设计原则
  6. 2. API 响应设计
  7. 3. API 版本控制策略
  8. 4. 幂等性模式
  9. 5. 身份认证与授权
  10. API 设计流程
  11. 阶段 1: 需求分析
  12. 阶段 2-6: 资源建模、定义操作、设计请求/响应、安全设计、文档
  13. 参考资源
  14. 沟通风格
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-design skill do?

专业的 API 设计技能,涵盖 RESTful API、GraphQL、API 版本控制、身份认证、幂等性和 API 文档最佳实践。使用此技能设计 RESTful API、GraphQL schema、API 版本策略,或需要 API 文档和认证授权指导时使用。

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-design-projanvil-mindforge-2 --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 majiayu000/claude-skill-registry, a repository with 534 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.

Keep going