api-contract-review

api-contract-review is a skill for Claude Code, Codex from tonyghiani/ai-essentials. It costs 65 tokens per session (909 once invoked), scanned A, original, MIT.

A review guide for public interfaces such as HTTP routes, plugin setup functions, package exports, and saved data formats. An API contract is the agreed shape and behaviour that other code depends on.

In plain words
What is it for?
Use it before changing a route, plugin contract, exported package API, saved-object schema, persisted configuration, or any shared type.
Why use it?
It helps find breaking changes, missing input limits, and compatibility problems before other users or systems rely on the change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it before changing a route, plugin contract, exported package API, saved-object schema, persisted configuration, or any shared type.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tonyghiani/ai-essentials/api-contract-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tonyghiani/ai-essentials --skill api-contract-review
Clone the repo
git clone --depth 1 https://github.com/tonyghiani/ai-essentials

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-contract-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/tonyghiani/ai-essentials/api-contract-review.svg)](https://agentmods.dev/skills/tonyghiani/ai-essentials/api-contract-review)
Your own site
<a href="https://agentmods.dev/skills/tonyghiani/ai-essentials/api-contract-review"><img src="https://agentmods.dev/badge/skills/tonyghiani/ai-essentials/api-contract-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.00909
Opus 5 $0.00032 $0.00454
Sonnet 5 $0.00013 $0.00182
Haiku 4.5 $0.00006 $0.00091

Measured 8d ago against content hash e5a6a71fcd1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

api-contract-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/api-contract-review/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API contract review

A contract is the part you can't take back. Review it before it merges, not after someone depends on it.

What counts as a contract

HTTP routes, plugin setup/start return values, exported package symbols, saved object schemas and their migrations, persisted config, URL and locator state, and any type another team imports.

Checklist

Breaking change analysis

Walk each change and classify it:

  • Safe: adding an optional field, adding a new route, widening an accepted input, narrowing a returned union to fewer cases only if no consumer switches on the removed case.
  • Breaking: removing or renaming a field, making an optional field required, narrowing accepted input, widening a returned union, changing a status code, changing a default that alters behaviour.

For each breaking change, find the consumers. Grep for the symbol, the route path, the saved object type. Report the call sites you found and say plainly if you could not establish the full set.

Input validation

Every request input needs a schema, and every string, array, and object needs a bound. Unbounded input is a denial-of-service vector.

schema.string({ maxLength: 1_000 })
schema.arrayOf(itemSchema, { maxSize: 100 })
z.string().max(1_000)
z.array(item).max(100)

Flag: unbounded schema.string() / z.string(), unbounded arrays, schema.any(), recursive schemas without a depth limit, and numbers without a range where a range is meaningful.

Also check: is validation at the boundary, or does raw input reach a query builder? Are ids validated before interpolation?

Response shape

  • Is the success shape stable, or does it leak internal structure that will change?
  • Are errors typed and consistent? A route that returns a bare string on one path and a Boom object on another has no contract.
  • Does it expose data the caller shouldn't see? Internal ids, stack traces, other tenants' fields.
  • Partial success: if the operation can half-fail, does the response say which parts failed? Prefer a partialFailures array over throwing on the first error.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 86 lines · 65 tokens per session scan A e5a6a71fcd1e

Subscribe to this mod's changes

api-contract-review is a skill published in the GitHub repository tonyghiani/ai-essentials (6 stars, last pushed 1mo ago), licensed MIT. It adds 65 tokens to every session and 909 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

platform-apex-generate

Primary Apex authoring skill for class generation, refactoring, and review. ALWAYS ACTIVATE when the user mentions Apex, .cls, triggers, or asks to create/refactor a class (service, selector, domain, batch, queueable, schedulable, invocable, DTO, utility, interface, abstract, exception, REST resource). Use this skill…

forcedotcom/sf-skills · 122 tokens

flow-next-impl-review

Carmack-level implementation review of changes via the configured backend. Use when asked to review code or a diff in a flow-next repo.

gmickel/flow-next · 34 tokens

flow-next-resolve-pr

Resolve PR review feedback. Fetches unresolved threads, triages, fixes, replies and resolves via GraphQL. Use when asked to address review comments.

gmickel/flow-next · 36 tokens

api-contract-review

Use when auditing CloudBase cloud API wrappers, MCP tools, generated action metadata, or related docs for outdated or incorrect action names, parameters, casing, request shapes, or missing contract tests, especially during periodic quality review or before preparing corrective PRs.

TencentCloudBase/CloudBase-AI-Toolkit · 54 tokens

principle-model-the-domain

Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files. Encode the domain in a structure instead of scattered conditionals.

cursor/plugins · 39 tokens

code-review-nodejs

Applies Node.js-specific code review patterns for async I/O, streams, security, process management, and dependency hygiene. Use when reviewing Node.js server code, route handlers, middleware, or any JavaScript file alongside package.json without TypeScript. Triggers on sync I/O in request paths, missing stream…

Jamie-BitFlight/claude_skills · 100 tokens