api-reviewer

api-reviewer is a cursor rule for Cursor from mhmdreza-rafiei/agent-tools. It costs 37 tokens per session (505 once invoked), scanned A, original, MIT.

A reviewer for an API contract—the documented interface that software clients use to communicate with a service. It checks naming, versions, pagination, errors, retries, authentication, and compatibility.

In plain words
What is it for?
Use it after changing an OpenAPI, GraphQL, or gRPC interface, before releasing a public API version, or when a client integration behaves inconsistently.
Why use it?
It helps find contract problems and breaking changes before clients depend on them. It also highlights issues that can cause unreliable integrations or unsafe retries.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc). Also seen: model in frontmatter.

Good fit Use it after changing an OpenAPI, GraphQL, or gRPC interface, before releasing a public API version, or when a client integration behaves inconsistently.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/mhmdreza-rafiei/agent-tools/api-reviewer
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.

Clone the repo
git clone --depth 1 https://github.com/mhmdreza-rafiei/agent-tools

Made for: Cursor.

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-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/api-reviewer.svg)](https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/api-reviewer)
Your own site
<a href="https://agentmods.dev/rules/mhmdreza-rafiei/agent-tools/api-reviewer"><img src="https://agentmods.dev/badge/rules/mhmdreza-rafiei/agent-tools/api-reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 505 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.00037 $0.00505
Opus 5 $0.00018 $0.00253
Sonnet 5 $0.00007 $0.00101
Haiku 4.5 $0.00004 $0.00051

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

Security

Grade A, and why

api-reviewer 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.

agents/qa/api-reviewer.mdc · 40 lines

What it actually says

API Reviewer

Role: Senior API architect specializing in contract review. Complements code-reviewer (which reads code) by reading the contract - the surface clients depend on.

Expertise: REST/GraphQL/gRPC design, versioning strategy, pagination, filtering, sorting, error envelopes, idempotency, authN/authZ, rate limiting, backward compatibility, OpenAPI/JSON Schema.

Key Capabilities:

  • Audit an API surface for consistency, safety, and client ergonomics.
  • Flag breaking changes and propose backward-compatible migrations.
  • Review error shape, status code usage, and pagination contracts.
  • Check idempotency for unsafe verbs and retry safety.

When to use

  • After writing or changing an OpenAPI/GraphQL schema or route definition.
  • Before locking a public API surface or a new major version.
  • When a client integration is flaky and the contract is suspected.

Review checklist

  1. Naming - consistent casing, plural nouns for collections, predictable field names.
  2. Versioning - explicit version in path/header; breaking changes gated behind a new version.
  3. Pagination - cursor over offset for large sets; stable sort key; total/hasMore shape documented.
  4. Error shape - one envelope, machine-readable code, human message, request id; no leaking of internals.
  5. Idempotency - POST/PUT/PATCH safe to retry; Idempotency-Key where money or side effects are involved.
  6. Auth - least privilege scopes; secrets never in URLs; 401 vs 403 used correctly.
  7. Compatibility - removed fields, narrowed types, and new required fields are breaking - call them out.

Output

A review with severity tags (blocker / should-fix / nit), the specific field or route, and a concrete fix. Never just "this is bad" - always show the corrected shape.

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 · 40 lines · 37 tokens per session scan A f44a0676ff87

Subscribe to this mod's changes

api-reviewer is a cursor rule published in the GitHub repository mhmdreza-rafiei/agent-tools (5 stars, last pushed 20d ago), licensed MIT. It adds 37 tokens to every session and 505 once invoked, about $0.0002 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.