一键导入
diff-specs
Compare two OpenAPI spec versions, highlight breaking changes, and suggest migration steps
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Compare two OpenAPI spec versions, highlight breaking changes, and suggest migration steps
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Prepare a release (phases 1-6). Usage: /prepare-release [version]. If version omitted, infers from conventional commits. Coordinates agents for review, runs prepare-release.sh, then enhances release notes with rich formatting.
Run corpus regression tests against real-world OpenAPI specs. Usage: /corpus-test [short]
Generate test scaffolding for a Go file following oastools conventions. Usage: /gen-test <file.go> [function names...]
Review unpushed commits before pushing for code quality, bugs, security issues, and error handling. Use when preparing to push commits, want pre-push code review, or need to validate changes before pushing. Runs comprehensive analysis using specialized review agents.
Publish a prepared release (phase 7). Usage: /publish-release <version>. Requires version argument. Wraps publish-release.sh for deterministic execution.
Run full validation suite (make check + gopls diagnostics) and report structured pass/fail. Usage: /quality-gate [package...]
| name | diff-specs |
| description | Compare two OpenAPI spec versions, highlight breaking changes, and suggest migration steps |
⚠️ Note: The
difftool is designed for comparing versions of the same API (e.g., v1.2 vs v1.3). Diffing unrelated APIs (e.g., Stripe vs GitHub) will produce thousands of changes that aren't meaningful. If the user wants to compare different APIs, suggest exploring each one separately with theexplore-apiworkflow.
Call the diff tool with both spec versions:
{
"base": {"file": "<old-version-path>"},
"revision": {"file": "<new-version-path>"}
}
To focus only on breaking changes:
{
"base": {"file": "<old-version-path>"},
"revision": {"file": "<new-version-path>"},
"breaking_only": true
}
Results are paginated (default limit: 100). When returned < total_changes, there are more changes:
{
"base": {"file": "<old-version-path>"},
"revision": {"file": "<new-version-path>"},
"offset": 100, "limit": 100
}
⚠️ Strategy for large diffs: Start with breaking_only: true to see all breaking changes first — these are usually the most important and fewest. Then page through the full diff only if the user needs the complete picture. The total_changes, breaking_count, warning_count, and info_count fields always reflect the full result, even when paginated.
Present the diff results organized by severity:
Breaking (critical/error) -- Changes that will break existing API consumers
Warnings -- Changes that may affect consumers
Informational -- Non-breaking changes
For each breaking change:
DELETE /users/{id} will get 404")For each breaking change, provide a concrete migration step:
| Change type | Migration guidance |
|---|---|
| Removed endpoint | Update client to use the replacement endpoint (if one exists) |
| Removed parameter | Remove the parameter from requests; check if behavior changed |
| Type change | Update request/response handling for the new type |
| Auth change | Update authentication configuration |
| Renamed field | Update all references to use the new name |
Provide a migration checklist: