# API contract review

> API contract review is an open-source agent skill for developer tools. Reviews routes, plugin contracts and exports for breaking changes and weak validation. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/tonyghiani/ai-essentials/tree/main/skills/api-contract-review
- **Repository:** https://github.com/tonyghiani/ai-essentials
- **GitHub stars:** 7
- **License:** MIT
- **Skill name:** api-contract-review
- **Collection:** https://github.com/tonyghiani/ai-essentials
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill guides a read-only review agent through checking an HTTP route, plugin setup/start contract, saved object schema or package public export before it ships. It walks each change and classifies it as safe or breaking, then searches the codebase for consumers of any breaking change and reports the call sites it finds, noting when the full set cannot be established.

The checklist covers input validation with explicit bounds on strings, arrays and objects, the stability and error consistency of response shapes, evolvability of exported surfaces, persistence and migration safety under rolling deploys, and authorisation and rate limits. Findings are reported in a fixed markdown format with file and line citations and a verdict of safe, ship with a migration, or breaking.

When no target is passed, it audits the files changed on the current branch against the default base. It is written for a Claude Code agent setup and expects the repository to be available for reading and searching.

## When your agent uses it

> Review an HTTP route, plugin contract, or exported package API for compatibility, validation, and evolvability before it ships. Invoke when adding or changing a route, a plugin setup/start contract, a saved object schema, or a package public export, and when the user asks whether a change is breaking.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/tonyghiani/ai-essentials/tree/HEAD/skills/api-contract-review)
- [License: MIT](https://github.com/tonyghiani/ai-essentials/tree/HEAD/skills/api-contract-review)

## Features

- **Breaking change analysis:** Classifies each change as safe or breaking and locates the consumers affected.
- **Input validation checks:** Flags unbounded strings, arrays, objects and missing schemas at request boundaries.
- **Response shape review:** Checks that success and error responses are stable, typed and free of leaked internals.
- **Evolvability guidance:** Looks at whether fields can be added later and whether exports are kept minimal.
- **Persistence and migration safety:** Examines stored data readability, partial migration failure and rolling deploy compatibility.
- **Auth and limits review:** Checks authorisation consistency, rate limiting and resource-existence disclosure in errors.

## Good for

- Check whether a route change will break existing API clients
- Review a plugin setup or start contract before merging
- Audit a saved object schema change for migration risks
- Find unbounded inputs in a new endpoint
- Verify which consumers depend on an exported package symbol

## Install

### Claude Code

This skill ships in the `ai-essentials` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add tonyghiani/ai-essentials
/plugin install ai-essentials@ai-essentials
```

Or copy only this skill to `~/.claude/skills/api-contract-review`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/api-contract-review &&
cp -R "$tmp/skills/api-contract-review" ~/.claude/skills/api-contract-review &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/api-contract-review` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/api-contract-review` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/api-contract-review &&
cp -R "$tmp/skills/api-contract-review" ~/.agents/skills/api-contract-review &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/api-contract-review` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/api-contract-review` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/api-contract-review &&
cp -R "$tmp/skills/api-contract-review" ~/.cursor/skills/api-contract-review &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/api-contract-review` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/tonyghiani/ai-essentials.git --path skills/api-contract-review
```

Or copy the folder to `~/.gemini/skills/api-contract-review` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/api-contract-review`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/api-contract-review &&
cp -R "$tmp/skills/api-contract-review" ~/.copilot/skills/api-contract-review &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/api-contract-review` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git
```

Then copy `ai-essentials/skills/api-contract-review` into your agent's skills folder as `api-contract-review`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What triggers API contract review?

It is invoked when adding or changing a route, a plugin setup/start contract, a saved object schema or a package public export, and when the user asks whether a change is breaking.

### Does API contract review edit code?

No. It runs as a read-only agent and reports findings without editing files.

### What does API contract review audit if no target is given?

It audits the files listed by git diff against the merge base with origin/HEAD, or against a base the caller names.

### What is its output format?

A markdown report with sections for breaking changes, validation gaps and evolvability, each citing file and line, ending with a verdict.

### How do I install API contract review in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/api-contract-review to use it in all your projects, or to .claude/skills/api-contract-review in one project. Or install the ai-essentials plugin, which includes it: /plugin marketplace add tonyghiani/ai-essentials, then /plugin install ai-essentials@ai-essentials.

### Does API contract review run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use API contract review?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to API contract review?

The closest alternatives to API contract review are Adversarial code review pass schema, API breaking change detector, Code review expert, Code review and quality and Backend review.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Adversarial code review pass schema](https://ai-powered.com/skills/adversarial-code-review-pass-schema): Adversarial code review pass schema is an open-source agent skill for developer tools.
- [API breaking change detector](https://ai-powered.com/skills/api-breaking-change-detector): API breaking change detector is an open-source agent skill for developer tools.
- [Code review expert](https://ai-powered.com/skills/code-review-expert): Code review expert is an open-source agent skill for developer tools.
- [Code review and quality](https://ai-powered.com/skills/code-review-and-quality): Code review and quality is an open-source agent skill for developer tools.
- [Backend review](https://ai-powered.com/skills/backend-review): Backend review is an open-source agent skill for developer tools.
- [Review](https://ai-powered.com/skills/review-metabase): Review is an open-source agent skill for developer tools.
- [Pre ship review](https://ai-powered.com/skills/pre-ship-review): Pre ship review is an open-source agent skill for developer tools.
- [Code review](https://ai-powered.com/skills/code-review-getsentry): Code review is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/api-contract-review
