indrasvat/claude-code-skills · Archived

api-compat

Detect breaking changes in APIs — protobuf, OpenAPI/Swagger, GraphQL schemas, or Go exported interfaces. Use when the user says "API compat", "breaking changes", "check API compatibility", "proto breaking", "schema breaking", "is this breaking", "backward compatible", "API diff", "contract check", or when API definition files have been modified.

First seen Jun 15, 2026

Installation

$ npx skills add indrasvat/claude-code-skills --skill api-compat

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from indrasvat/claude-code-skills · top by installs.

npx skills add indrasvat/claude-code-skills

Browse all from indrasvat/claude-code-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 3
License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash, Read, Grep, Glob
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,018 B
  • docs SUMMARY.md 367 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 3 installs

SKILL.md

API Compatibility Check

Detect breaking changes in API definitions. Read-only analysis, safe to re-run.

1. Prerequisites

Check for specialized tools via command -v: buf (protobuf), oasdiff (OpenAPI). Report availability. If missing, fall back to manual git-diff analysis and note which tool would improve accuracy.

2. Scope

If $ARGUMENTS names specific files, analyze only those. Otherwise, find API files changed since base branch using git diff --name-only $(git merge-base HEAD main). Detect by pattern:

Pattern Type
*.proto Protobuf
openapi.yaml, swagger.json, .openapi., .swagger. OpenAPI
.graphql, .gql GraphQL
*.go with exported types changed Go exported API

Stop with a clear message if no API files are found in scope.

3. Baseline

Compute and print the merge-base: git merge-base HEAD main. For each file in scope, diff working tree against that baseline using git diff <merge-base> -- <file>.

4. Analysis by Type

Protobuf

If buf is available, run buf breaking --against .git#ref=<merge-base>. Otherwise, manually inspect diffs for:

  • BREAKING: field number reuse, field removal, type change, adding required fields
  • SAFE: new optional field, new enum value with no renumbering

OpenAPI

If oasdiff is available, run oasdiff breaking <base-file> <current-file>. Otherwise, manually inspect diffs for:

  • BREAKING: removed endpoint, changed HTTP method, removed parameter, new required parameter, response schema narrowing
  • SAFE: new optional parameter, new endpoint, added response fields

GraphQL

Manually inspect diffs for:

  • BREAKING: removed type/field, changed return type, new required argument, removed enum value
  • SAFE: new optional field/argument, new type, new enum value

Go Exported API

Manually inspect diffs for:

  • BREAKING: removed exported symbol, changed function signature, changed interface method set, changed struct field types
  • SAFE: new exported symbol, new method on concrete type

5. Output

Print a summary line first: total changes found, how many breaking. Then print a compatibility report table:

| Change | File:Line | Type | Severity |

Severity values: BREAKING, WARN, SAFE. Use WARN when a change is technically non-breaking but likely to cause client issues (e.g., deprecating a widely-used field, adding an enum value to a closed enum).

6. Idempotency

Read-only. No files created, modified, or deleted. Safe to re-run at any time.

$ARGUMENTS