api-diff
Compare two OpenAPI spec files and produce a structured diff report. Use when you need to know what changed between two versions of an API spec, detect breaking changes before releasing a new API version, or check a PR's API spec changes in CI. Triggers include "diff API specs", "compare OpenAPI", "what changed in the API", "check API changes", "API spec diff", "compare swagger files", or any task involving comparing two versions of an OpenAPI or REST API specification.
Best use case
api-diff is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Compare two OpenAPI spec files and produce a structured diff report. Use when you need to know what changed between two versions of an API spec, detect breaking changes before releasing a new API version, or check a PR's API spec changes in CI. Triggers include "diff API specs", "compare OpenAPI", "what changed in the API", "check API changes", "API spec diff", "compare swagger files", or any task involving comparing two versions of an OpenAPI or REST API specification.
Teams using api-diff should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/api-diff/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How api-diff Compares
| Feature / Agent | api-diff | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Compare two OpenAPI spec files and produce a structured diff report. Use when you need to know what changed between two versions of an API spec, detect breaking changes before releasing a new API version, or check a PR's API spec changes in CI. Triggers include "diff API specs", "compare OpenAPI", "what changed in the API", "check API changes", "API spec diff", "compare swagger files", or any task involving comparing two versions of an OpenAPI or REST API specification.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# api-diff
Compare two OpenAPI specs and get a structured list of changes with breaking change classification.
## When to use
- Before releasing a new API version, check if any breaking changes were introduced
- In CI to block merges that contain breaking changes
- When reviewing a PR that modifies the OpenAPI spec
- When onboarding to a new API - understand what changed between versions
## Diff two files via CLI
```bash
# Basic diff - exits 1 if breaking changes found
adc diff api-v1.yaml api-v2.yaml
# Only show breaking changes
adc diff api-v1.yaml api-v2.yaml --only-breaking
# JSON output for scripting
adc diff api-v1.yaml api-v2.yaml --format json
# Diff using stored spec IDs
adc diff --base my-api@1.0.0 --head my-api@1.1.0
```
## Diff via API
```bash
# Upload two files
curl -s -X POST http://localhost:3100/api/diff \
-F "base=@api-v1.yaml" \
-F "head=@api-v2.yaml" \
-F "base_label=v1.0.0" \
-F "head_label=v1.1.0"
# Using stored spec IDs
curl -s -X POST http://localhost:3100/api/diff \
-H "Content-Type: application/json" \
-d '{ "base_spec_id": "my-api@1.0.0", "head_spec_id": "my-api@1.1.0" }'
```
## Diff result shape
```json
{
"summary": { "breaking": 2, "nonBreaking": 3, "informational": 0 },
"changes": [
{
"path": "/paths/~1users~1{id}/get/parameters",
"type": "parameter-required-added",
"severity": "breaking",
"description": "required parameter 'locale' added",
"before": null,
"after": { "name": "locale", "in": "query", "required": true }
}
]
}
```
## CI pipeline usage
```yaml
- name: Check for breaking API changes
run: adc diff openapi-main.yaml openapi-pr.yaml
# exits 1 and fails the step if breaking changes found
```
## Store a spec for repeated diffs
```bash
adc specs push openapi.yaml --id my-api --version 1.2.0
```
## Supported formats
- OpenAPI 3.x (YAML or JSON)
- `$ref` references are automatically resolved before diffing
- Swagger 2.x is not supported (returns an error with a migration hint)Related Skills
migration-diff skill
## When to use
json-differ
Compare two JSON blobs and view structural and value differences. Use when you need to compare API responses, config files, database records, or any two JSON objects. Triggers include "compare JSON", "JSON diff", "what changed", "JSON differences", "diff two objects", or any task involving comparing JSON data.
deep-diff
Compute structural differences between two JSON-compatible JavaScript values. Use this skill when you need to programmatically diff objects, check if two data structures are equivalent, or find what paths changed. Triggers include "diff two objects in code", "find changed keys", "compute JSON diff", "deep equality check with diff output".
file-tree-diff
Compare two directory trees and show added, removed, and changed files with color output. Use when you need to compare two versions of a directory, find what changed between releases, audit differences between staging and production file sets, or verify a deployment. Triggers include "compare directories", "directory diff", "what changed in", "file differences between", "ftd", "tree diff".
diff-ignore
Configure ignore patterns for file-tree-diff using .ftdignore files or CLI flags. Use when setting up ignore rules for directory comparisons, excluding build artifacts, or creating project-specific ignore configurations. Triggers include "ignore node_modules in diff", ".ftdignore", "exclude files from diff", "diff ignore patterns".
Skill: Uptime Monitoring
## Overview
Skill: Status Page
## Overview
Skill: unit-conversion
## Overview
Skill: recipe-scaler
## Overview
reading-list
Operate the reading-list API to save, manage, tag, search, and export articles.
email-digest
Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.
websocket-realtime
Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".