api-contract-guard

仓库创建 2026年7月4日最近提交 21 天前SkillHot 收录 20 天前
▸ 精选理由

避免破坏依赖方,可用于服务/库发布流程

这个 Skill 做什么

阻止在原地破坏对外契约的变更,检测重命名/移除/类型变更。

在修改对外契约(REST/RPC/GraphQL、事件负载或库的导出签名)前拦截会破坏兼容性的改动,比如重命名/删除字段、类型变化或新增必需参数。适合在接口已有消费者时,避免直接在原地改动造成下游损坏。强调应通过 expand-contract(并行新增、迁移、弃用窗口)或版本号提升来做变更。

▸ 展开 SKILL.md 英文原文

Blocks a breaking change to a published contract — a REST/RPC/GraphQL endpoint or its request/response fields, an event/webhook payload schema, or a public library signature — made IN PLACE (renamed/removed/retyped field, newly required param, changed status code/error shape, tightened validation) instead of via expand-contract (add the new shape alongside the old, migrate consumers, deprecate with a window, remove later) and/or a version bump. Best used reactively before changing any endpoint, event schema, or exported function signature with existing consumers. Use when the user says "rename this field", "change the response shape", "make this param required", "update the API", "change the payload", "return a different status code", or after an agent edits a contract other code already calls. DO NOT USE for doc sync (docs-drift-guard), diff scope (clean-diff-guard), or the done-claim (evidence-before-done); this guard is specifically about not breaking existing consumers of a publish

Skill 开发管理API兼容性契约保护回归防护通用
1
Stars
0
Forks
8
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/deferred/api-contract-guard/skill/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/deferred/api-contract-guard/skill/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# api-contract-guard

Once a contract has a consumer, editing it in place is editing someone
else's code. A REST response field, an event payload key, or an exported
function's parameter list is a promise other code already relies on — the
frontend that reads `fullName`, the internal service that calls
`retry(fn)` with two args, the webhook subscriber that treats a 200 with
an empty body as "not found yet." The failure mode this guard targets is
an agent treating "the contract" as if it were private implementation
detail: renaming a field, adding a required parameter, or flipping a
status code because the *new* requester wants the *new* shape, without
noticing that the *old* shape still has 
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有