Api interface design

From TencentBlueKing/bk-ci · View interactive version

Api interface design is an AI agent skill from the GitHub repository TencentBlueKing/bk-ci. 设计 BK-CI API 契约时使用,例如 Resource 路径设计、HTTP 方法选择、请求响应对象、错误码和版本策略。当用户要定义接口而不是实现业务逻辑时优先使用。

How to use this skill

Skill file

API 接口设计

适用场景

不适用场景

快速指导

  1. 这个 skill 关注的是“接口契约怎么设计”,不是“接口代码怎么实现”。
  2. 设计前先判断调用方是谁,再决定 /user/、/service/、/build/、/open/ 等路径前缀。
  3. 路径、方法、返回结构、错误码和版本策略要作为一套契约一起设计。
  4. 能用资源语义表达的,就不要退化成动作式杂糅接口。
  5. 如果问题已经进入服务分层或实现细节,切到 backend-microservice-development。

高信号规则

关键陷阱

延伸阅读

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.