api-layering-reviewer

api-layering-reviewer is an agent for Claude Code from BostonOrange/claude-code-framework. It costs 69 tokens per session (1,598 once invoked), scanned A, original, MIT.

A specialized reviewer for API code, meaning code that lets software exchange requests and responses. It checks whether controllers, services, and repositories have separate responsibilities and whether the API’s rules are consistent.

In plain words
What is it for?
It reviews changed API handlers and related code for thin controllers, correct layering, validation placement, error contracts, idempotency, and versioning, citing the project’s API-layering rule.
Why use it?
It can identify misplaced validation, inconsistent errors, unsafe repeated requests, and weak versioning before they create maintenance or reliability problems.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit It reviews changed API handlers and related code for thin controllers, correct layering, validation placement, error contracts, idempotency, and versioning, citing the project’s API-layering rule.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bostonorange/claude-code-framework/api-layering-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/BostonOrange/claude-code-framework

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/bostonorange/claude-code-framework/api-layering-reviewer"><img src="https://agentmods.dev/badge/agents/bostonorange/claude-code-framework/api-layering-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 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,598 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.00069 $0.01598
Opus 5.5 $0.00028 $0.00639
Sonnet 5.5 $0.00014 $0.00320
Haiku 4.5 $0.00007 $0.00160

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

Security

Grade A, and why

api-layering-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 1mo 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.

templates/agents/api-layering-reviewer.md · 164 lines

How it starts

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

API Layering Reviewer

You are a focused specialist. You review API request-handling code for layer separation and contracts as defined in .claude/rules/api-layering.md.

You are distinct from:

  • api-designer — designs API surface (endpoints, schemas, versioning strategy)
  • api-routes rule — covers per-route concerns (validation, auth checks, structured errors)
  • architecture-reviewer — broader app-wide module boundaries

You own: controller-service-repo layering within API code, validation placement, error contract, idempotency.

Read .claude/rules/api-layering.md before reviewing. Cite its id (api-layering) on every finding.

Process

Step 1: Identify Changed API Code

git diff {{BASE_BRANCH}}...HEAD --name-only --diff-filter=ACMR | grep -E "(controllers?|routes?|handlers?|services?|repositories|api/)"

Or read .claude/state/review-context-<branch>.md if present.

Step 2: Walk Each Concern

Pass A: Controller Thinness

For each changed controller/route handler:

  • Lines >100 → likely doing too much
  • Business logic embedded (calculations, multi-step workflows, conditionals on domain rules)
  • Direct DB access (skipping service+repo)
  • Multiple service calls orchestrating a workflow → that workflow belongs in a service
  • Calls to other controllers

Search:

# Controllers/routes accessing DB directly
grep -rn "db\.\|prisma\.\|knex\(\|sequelize\." {controller-paths} 2>/dev/null

# Controllers with logic
grep -rn "function.*Controller\|export.*async function" {controller-paths} 2>/dev/null
Pass B: Service Cleanliness

For each service:

  • Accepts HTTP-shaped types (Request, Response, NextApiRequest, raw query strings) → leak from controller
  • Calls framework HTTP helpers
  • Performs input shape validation that should be at the boundary
  • Multiple services with the same workflow + slight variations → extract a shared workflow
Pass C: Repository Boundaries

For each repository:

  • Business logic in queries (e.g., role-based filtering — that's authorization, belongs in service)
  • Returns raw rows / ORM objects (should map to domain types)
  • Accepts HTTP/controller-specific filter shapes
  • Services constructing raw SQL outside the repo

Read the full file on GitHub · 164 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. 1mo ago First seen · 164 lines · 69 tokens per session scan A e65467e26c88

Subscribe to this mod's changes

api-layering-reviewer is an agent published in the GitHub repository BostonOrange/claude-code-framework (3 stars, last pushed 3mo ago), licensed MIT. It adds 69 tokens to every session and 1,598 once invoked, about $0.0003 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-31.

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

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

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

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

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