AP

api-interface-design

A design specification for creating clean, RESTful API contracts including resources, status codes, and versioning.

Install

mkdir -p .claude/skills/api-interface-design && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2053" && unzip -o skill.zip -d .claude/skills/api-interface-design && rm skill.zip

Installs to .claude/skills/api-interface-design

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

设计 BK-CI API 契约时使用,例如 Resource 路径设计、HTTP 方法选择、请求响应对象、错误码和版本策略。当用户要定义接口而不是实现业务逻辑时优先使用。
85 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Design RESTful resource endpoints
  • Define API error code standards
  • Review API contract naming conventions
  • Plan API versioning strategies

How it works

The skill provides design guidelines for API contracts, focusing on resource paths, HTTP methods, and response formats independent of the underlying implementation.

Inputs & outputs

You give it
API design requirements
You get back
Standardized API contract and resource structure

When to use api-interface-design

  • Design a new RESTful resource endpoint
  • Define API error code standards
  • Review API contract naming conventions
  • Plan API versioning strategy

About this skill

API 接口设计

适用场景

  • 设计新的 RESTful API
  • 定义 Resource 接口、请求体和响应体
  • 设计错误码、分页格式和版本策略
  • 评审接口命名和路径结构

不适用场景

  • 实现业务逻辑或服务分层
  • 处理参数校验落地细节
  • 只改前端页面展示

快速指导

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

高信号规则

  • 接口设计的核心是稳定契约,而不是先把功能堆出来
  • 错误码、分页和返回包装会直接影响前后端协作成本
  • 调用方不同,接口前缀和暴露方式也应不同

关键陷阱

  • 路径命名反映不出资源语义
  • HTTP 方法和真实操作语义不一致
  • 只设计成功响应,不设计错误返回和版本演进

延伸阅读

  • 如果你在实现后端服务:再看 backend-microservice-development
  • 如果你在做参数校验:再看 common-technical-practices

When not to use it

  • Implementing business logic
  • Handling parameter validation details
  • Modifying frontend UI

Limitations

  • Does not cover backend service implementation

How it compares

It focuses on stable interface contract design rather than the functional implementation of business logic.

Compared to similar skills

api-interface-design side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
api-interface-design (this skill)23moNo flagsIntermediate
springboot-patterns115moNo flagsIntermediate
apollo-reference-architecture126dCautionAdvanced
moai-domain-backend13moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by TencentBlueKing

View all by TencentBlueKing

project-module-architecture

TencentBlueKing

Project 项目管理模块架构指南,涵盖项目 CRUD、成员管理、项目配置、标签管理、项目迁移。当用户开发项目管理功能、处理项目成员、配置项目属性或实现项目相关逻辑时使用。

612

artifactory-module-architecture

TencentBlueKing

Artifactory 制品库模块架构指南,涵盖制品上传下载、存储后端适配、制品元数据、清理策略、权限控制。当用户开发制品库功能、处理制品存储、配置清理策略或实现制品管理时使用。

419

microservice-infrastructure

TencentBlueKing

微服务基础设施指南,涵盖条件配置、事件驱动架构、服务间通信、国际化与日志等微服务架构的核心基础设施。当用户实现服务间调用、配置多环境、实现异步通信、处理国际化或规范日志输出时使用。

411

frontend-vue-development

TencentBlueKing

前端 Vue 开发规范,涵盖 Vue 2/3 组件开发、Vuex 状态管理、路由配置、组件通信、样式规范、国际化。当用户进行前端开发、编写 Vue 组件、处理状态管理或实现页面交互时使用。

38

unit-testing

TencentBlueKing

单元测试编写指南,涵盖 JUnit5/MockK 使用、测试命名规范、Mock 技巧、测试覆盖率要求、TDD 实践。当用户编写单元测试、Mock 依赖、提高测试覆盖率或进行测试驱动开发时使用。

319

worker-module-architecture

TencentBlueKing

Worker 构建执行器模块架构指南,涵盖插件执行引擎、任务分发、日志上报、制品上传、Worker 生命周期。当用户开发 Worker 功能、实现插件执行、处理任务分发或优化执行器性能时使用。

37

Search skills

Search the agent skills registry