Borrowing it
Nothing to install: this file belongs to sourjya/kiro-rails. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/sourjya/kiro-rails/main/.claude/commands/review-api-contracts.mdgit clone --depth 1 https://github.com/sourjya/kiro-railsWrote 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.
[](https://agentmods.dev/commands/sourjya/kiro-rails/review-api-contracts)<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-api-contracts"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-api-contracts/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/sourjya/kiro-rails/review-api-contracts"><img src="https://agentmods.dev/badge/commands/sourjya/kiro-rails/review-api-contracts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00027 | $0.02906 |
| Opus 5 | $0.00014 | $0.01453 |
| Sonnet 5 | $0.00005 | $0.00581 |
| Haiku 4.5 | $0.00003 | $0.00291 |
Grade A, and why
review-api-contracts 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 179 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Before scanning, read docs/decisions/ ADRs and any API design docs if they exist. Use documented contract decisions (intentional envelope exceptions, versioning strategy) to distinguish intentional design from accidental inconsistency.
Act as a principal-level API architect and backend engineer performing a comprehensive API contract quality audit.
Your mission is not to verify that endpoints return data. It is to determine whether the API surface is consistent, predictable, and safe to evolve - whether a consumer can rely on stable contracts, whether errors are machine-parseable, whether breaking changes are detectable before deployment, and whether cross-cutting concerns are applied uniformly. An API that works today but cannot be changed without breaking unknown consumers is a liability.
Activation Triggers
Run this review when:
- New API endpoints or routes are added
- API versioning changes or a new API version is introduced
- A feature adds or modifies request/response schemas
- GraphQL schema changes (new types, resolvers, or queries)
- Before publishing an API to external consumers
- At feature-complete or sprint-end review checkpoints
Review Objectives
Identify:
-
Response envelope consistency. Every endpoint must return responses through a uniform envelope structure. Flag endpoints that return raw arrays, bare scalars, or inconsistent top-level keys. Check whether success responses use the same wrapper shape (
data,meta,links, or equivalent) across all resources. Flag where pagination metadata, request IDs, or timestamps appear in some responses but not others. A consumer should never need to guess the response shape based on which endpoint they called. -
Error schema uniformity (RFC 7807). All error responses must follow a single, machine-parseable schema - preferably RFC 7807 Problem Details (
type,title,status,detail,instance). Flag endpoints that return ad hoc error shapes, plain strings, HTML error pages, or framework default error bodies. Check whether validation errors include aerrorsorviolationsarray with per-field detail. Flag where the same HTTP status code produces different error body shapes depending on the endpoint or error path.
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.
- 9d ago First seen · 179 lines · 27 tokens per session scan A e1bc2d357b6d
review-api-contracts is a command published in the GitHub repository sourjya/kiro-rails (9 stars, last pushed 1mo ago), licensed MIT. It adds 27 tokens to every session and 2,906 once invoked, about $0.0001 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.
Other commands, from other repositories
evaluate-connector
Evaluate a Fivetran connector for correctness, SDK compliance, security, and reliability.
connector-review
Review DataHub connector code for standards compliance and quality.
review-rust
Focused Rust/Tauri backend review with rust-backend-architect (Primary Owner).
api-style-review
Review SAP API style compliance for REST, OData, OpenAPI, SDK naming, documentation, and lifecycle readiness.
fec-doc-sync
Sync README, docs, environment variables, scripts, API/routing/component descriptions and deployment instructions from code and project sources of truth.
document
On-demand documentation generation — API docs, architecture updates, user guides.