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.zipInstalls 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 方法选择、请求响应对象、错误码和版本策略。当用户要定义接口而不是实现业务逻辑时优先使用。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
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 接口、请求体和响应体
- 设计错误码、分页格式和版本策略
- 评审接口命名和路径结构
不适用场景
- 实现业务逻辑或服务分层
- 处理参数校验落地细节
- 只改前端页面展示
快速指导
- 这个 skill 关注的是“接口契约怎么设计”,不是“接口代码怎么实现”。
- 设计前先判断调用方是谁,再决定
/user/、/service/、/build/、/open/等路径前缀。 - 路径、方法、返回结构、错误码和版本策略要作为一套契约一起设计。
- 能用资源语义表达的,就不要退化成动作式杂糅接口。
- 如果问题已经进入服务分层或实现细节,切到
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| api-interface-design (this skill) | 2 | 3mo | No flags | Intermediate |
| springboot-patterns | 11 | 5mo | No flags | Intermediate |
| apollo-reference-architecture | 1 | 26d | Caution | Advanced |
| moai-domain-backend | 1 | 3mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by TencentBlueKing
View all by TencentBlueKing →You might also like
springboot-patterns
affaan-m
Spring Boot 架构模式、REST API 设计、分层服务、数据访问、缓存、异步处理和日志记录。适用于 Java Spring Boot 后端工作。
apollo-reference-architecture
jeremylongshore
Implement Apollo.io reference architecture. Use when designing Apollo integrations, establishing patterns, or building production-grade sales intelligence systems. Trigger with phrases like "apollo architecture", "apollo system design", "apollo integration patterns", "apollo best practices architecture".
moai-domain-backend
modu-ai
Backend development specialist covering API design, database integration, microservices architecture, and modern backend patterns.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
fastapi-pro
sickn33
Build high-performance async APIs with FastAPI, SQLAlchemy 2.0, and Pydantic V2. Master microservices, WebSockets, and modern Python async patterns. Use PROACTIVELY for FastAPI development, async optimization, or API architecture.
postgresql-table-design
wshobson
Design a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features