Individual skill
api-contract
统一接口协议、请求响应、错误码、兼容性与上下游协作约束。 当架构师、前后端开发或 QA 需要锁定 API 合同时使用。
plugins/Colin4k1024/tsp/skills/api-contract/SKILL.md
Source commit d780783eba4ecc7c8b9429f95c9362df95f07c61
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 4, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 1,530
- Repository last updated
- Nov 6, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-coding Repository topic
- awesome Repository topic
- awesome-list Repository topic
- codex Repository topic
- codex-plugins Repository topic
- openai Repository topic
- codex-skill Repository topic
- codex-skills Repository topic
- marketplace Repository topic
- codex-marketplace Repository topic
- legal Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 1,064 bytesagents/openai.yamlasset · 213 bytes
Read excerpt
# API Contract
## 用途
- 定义或审阅接口契约,避免“实现先行、契约滞后”。
- 对齐请求响应、鉴权、兼容性与错误处理。
## 默认做法
1. 使用 [api-contract.md](../../templates/api-contract.md) 固定接口定义。
2. 记录调用方、鉴权要求、错误码和兼容策略。
3. 若契约以 OpenAPI 形式维护,先结合 [api-lint-gates](../../docs/runbooks/api-lint-gates.md) 校验规范与结构,再用 [api-breaking-change-gates](../../docs/runbooks/api-breaking-change-gates.md) 做兼容性比对。
4. 若接口存在明确的 consumer/provider 边界,且需要把行为约定做成可执行验证,再结合 [contract-testing-playbook](../../docs/runbooks/contract-testing-playbook.md) 规划 pact 或 provider verification。
5. 指明需要同步给前端、后端、QA 的关键信息。