api-design
Use when: design a clear, consistent, and evolvable API contract before implementing it.
来源信息
- 仓库
- kimtth/agent-skill-100-lines-or-less
- 最近来源活动
- 2026年6月26日 02:15
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 2
- 分支
- 0
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- api-design
- description
- Use when: design a clear, consistent, and evolvable API contract before implementing it.
Goal: an API that is predictable, hard to misuse, and safe to evolve.
Use for:
- designing a new API surface or endpoint set
- reviewing naming, consistency, and error semantics
- planning backward-compatible changes
Workflow:
1. Model the resources and operations from the consumer's view.
2. Use consistent naming, casing, and pluralization.
3. Define clear request/response shapes and error formats.
4. Choose explicit status codes and meaningful error bodies.
5. Plan versioning and backward compatibility up front.
6. Document the contract and validate it against real usage.
Principles:
- make the common case simple and the right thing easy
- consistent conventions beat per-endpoint cleverness
- return structured, actionable errors
- design for additive, non-breaking evolution
Rules:
- never break a published contract silently; version it
- validate inputs and reject ambiguity explicitly
- keep responses predictable in shape and naming
- document before consumers depend on undocumented behavior
在 GitHub 查看