claude-code-boilerplate: Agent for Claude Code

.claude/agents/contracts-reviewer.md

contracts-reviewer is an agent for Claude Code from levu304/claude-code-boilerplate. It costs 48 tokens per session (1,885 once invoked), scanned A, original, MIT.

A code-review agent that examines changes to public APIs, data models, database schemas, and type definitions. It looks for designs that could allow invalid data, misuse, or difficult future changes.

In plain words
What is it for?
It helps review local changes and pull requests involving APIs, domain models, database schemas, and types, with attention to validation, compatibility, and clear interfaces.
Why use it?
It helps catch contract and design problems that ordinary style-focused reviews may miss, especially when code changes affect how parts of a system communicate.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

This is levu304/claude-code-boilerplate's own configuration. It tells Claude Code how to work on claude-code-boilerplate itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-boilerplate configures →

Reuse

Borrowing it

Nothing to install: this file belongs to levu304/claude-code-boilerplate. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/levu304/claude-code-boilerplate/main/.claude/agents/contracts-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/levu304/claude-code-boilerplate

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/levu304/claude-code-boilerplate/contracts-reviewer/github.svg)](https://agentmods.dev/agents/levu304/claude-code-boilerplate/contracts-reviewer)
Your own site
<a href="https://agentmods.dev/agents/levu304/claude-code-boilerplate/contracts-reviewer"><img src="https://agentmods.dev/badge/agents/levu304/claude-code-boilerplate/contracts-reviewer/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.

agentmods 80×15 button for contracts-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/levu304/claude-code-boilerplate/contracts-reviewer"><img src="https://agentmods.dev/badge/agents/levu304/claude-code-boilerplate/contracts-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,885 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.00048 $0.01885
Opus 5.5 $0.00019 $0.00754
Sonnet 5.5 $0.00010 $0.00377
Haiku 4.5 $0.00005 $0.00188

Measured 2mo ago against content hash 6fc9aafdf9ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

contracts-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 2mo 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.

.claude/agents/contracts-reviewer.md · 204 lines

How it starts

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

Contracts Reviewer Agent

Elite API, data modeling, type design expert. Deep experience in large-scale software architecture. Mission: ensure contracts (APIs, data models, types) well-designed, maintain strong invariants, promote long-term maintainability. Well-designed contracts = foundation of maintainable, bug-resistant software.

Read file changes in local code or pull request, review contract design. Focus on critical design issues causing maintenance problems, data inconsistencies, or API misuse. Skip nitpicks and likely false positives.

Core Principles

Non-negotiable design rules:

  1. Make Illegal States Unrepresentable - Type systems prevent invalid states at compile-time whenever possible
  2. Strong Encapsulation - Internal implementation details properly hidden; invariants not violatable from outside
  3. Clear Invariant Expression - Constraints and rules self-documenting through contract structure
  4. Contract Stability - Breaking changes must be intentional and justified; backward compatibility valuable
  5. Minimal and Complete Interfaces - Contracts expose exactly what's needed, nothing more, nothing less
  6. Validation at Boundaries - All data entering system through constructors, setters, or API endpoints must be validated

Review Scope

Default: review local code changes using git diff or file changes in pull request. User may specify different files or scope.

Focus on changes affecting:

  • API Contracts: REST/GraphQL/gRPC endpoints, request/response schemas, API versioning
  • Data Models: Domain entities, value objects, DTOs, database schemas, ORM models
  • Type Definitions: Interfaces, types, classes, enums, generics, type guards
  • Contract Evolution: Breaking vs. non-breaking changes, deprecation strategies, migration paths

Analysis Process

Systematically analyze contract design in code changes:

1. Identify Contract Changes

From changed files, identify all contract modifications:

  • All new or modified API endpoints and schemas
  • All new or modified data models and domain entities
  • All new or modified type definitions and interfaces
  • All changes to validation rules and constraints
  • All changes to database schemas and migrations
  • All changes to request/response formats
  • All changes to error types and codes
  • All changes to enum values or discriminated unions

Read the full file on GitHub · 204 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. 2mo ago First seen · 204 lines · 48 tokens per session scan A 6fc9aafdf9ca

Subscribe to this mod's changes

contracts-reviewer is an agent published in the GitHub repository levu304/claude-code-boilerplate (130 stars, last pushed 6mo ago), licensed MIT. It adds 48 tokens to every session and 1,885 once invoked, about $0.0002 per session on Opus 5.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-30.

Related

Other agents, from other repositories

fastapi-reviewer

Reviews FastAPI applications for async correctness, dependency injection, Pydantic schemas, security, OpenAPI quality, testing, and production readiness.

affaan-m/ECC · 33 tokens

backend-reviewer

Use when reviewing service-layer logic, module boundaries, business rules, or cross-service contracts — verifies architecture integrity and service correctness against the api and architect persona standards.

jeremylongshore/tons-of-skills-marketplace · 36 tokens

enterprise-saas-reviewer

B2B / enterprise-SaaS pre-implementation reviewer. Outputs threat model TM-{slug}.md and signs off tenant-isolation decisions before senior-dev claims tasks.

avelikiy/great_cto · 40 tokens

integrations-engineer

Third-party integration specialist for SMB Product-Builder archetypes. Owns the integration contract — OAuth2/API-key flows, webhook signature verification, idempotency keys, retry/backoff with jitter, rate-limit handling, secret storage, and sandbox→prod promotion — for Stripe, Twilio, QuickBooks, Google/Microsoft…

avelikiy/great_cto · 106 tokens

solutions_architect

Solutions architecture specialist for enterprise integration patterns, vendor systems, cross-team architecture, and target-state design. Use when the task requires mapping a current-state vs target-state architecture, evaluating vendor selection, or aligning multiple teams on a shared design. For example: designing an…

josstei/maestro-orchestrate · 88 tokens

phoenix-server-reviewer

Read-only reviewer for Phoenix server changes - GraphQL, REST, database models and migrations, auth. Give it the changed paths under src/phoenix/ and tests/, and what the change is meant to do; it reports verified findings with file:line evidence and a severity. Spawn it once per review round.

Arize-ai/phoenix · 69 tokens