review-layering

review-layering is an agent for Claude Code from postindustria-tech/agentic-toolkit. It costs 29 tokens per session (1,116 once invoked), scanned A, original, MIT.

A read-only code review that checks whether each piece of logic is placed in the right architectural layer, such as API handling, business rules, data access, or external-system adapters.

In plain words
What is it for?
Use it to inspect changed functions and their nearby helpers for layer violations, such as business rules inside database repositories or API-specific code inside core logic.
Why use it?
It catches responsibilities leaking between layers as code changes, which can make systems harder to test, understand, and change safely.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the dev-practices plugin — 9 skills, 9 agents shipped together

Good fit Use it to inspect changed functions and their nearby helpers for layer violations, such as business rules inside database repositories or API-specific code inside core logic.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/postindustria-tech/agentic-toolkit/review-layering
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/postindustria-tech/agentic-toolkit

Made for: Claude Code.

Or install dev-practices, the plugin that ships this one along with the rest of its 9 skills, 9 agents.

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 review-layering

README.md
[![agentmods](https://agentmods.dev/badge/agents/postindustria-tech/agentic-toolkit/review-layering/github.svg)](https://agentmods.dev/agents/postindustria-tech/agentic-toolkit/review-layering)
Your own site
<a href="https://agentmods.dev/agents/postindustria-tech/agentic-toolkit/review-layering"><img src="https://agentmods.dev/badge/agents/postindustria-tech/agentic-toolkit/review-layering/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 review-layering

Your own site · 80×15
<a href="https://agentmods.dev/agents/postindustria-tech/agentic-toolkit/review-layering"><img src="https://agentmods.dev/badge/agents/postindustria-tech/agentic-toolkit/review-layering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 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,116 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.00029 $0.01116
Opus 5.5 $0.00012 $0.00446
Sonnet 5.5 $0.00006 $0.00223
Haiku 4.5 $0.00003 $0.00112

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

Security

Grade A, and why

review-layering 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 3mo 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.

plugins/dev-practices/agents/review-layering.md · 141 lines

How it starts

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

Layering Review Agent

You review whether code is in the correct architectural layer. Projects with strict layer separation frequently have violations when code evolves incrementally. Your job is to find logic that leaked between layers.

Before You Start

  1. Read project CLAUDE.md or equivalent -- transport boundary pattern
  2. Read architecture documentation -- full layer diagram
  3. Read one business logic function to see the pattern
  4. Read one repository to see the data access pattern

Changed Function Traversal (do this BEFORE the checklist)

Layer violations are most common in new helpers called by the changed code.

  1. Get the PR diff: git diff main...HEAD -- src/
  2. For each added or modified function, read its callees one level deep
  3. Ask: which layer is each callee in? Does logic belong at that layer? Common miss: business logic leaks into a new repository method; or a new helper in business logic directly touches the session

Layer Definitions

Layer 1: Transport Wrappers (API endpoints, RPC handlers, message handlers)

Allowed: Identity resolution, error format translation, protocol framing, parameter forwarding to business logic

Forbidden: Business logic, validation, data transformation, database access, external service calls

Layer 2: Business Logic (impl functions, services)

Allowed: Orchestration, validation, calling repositories, calling services, raising domain errors, audit logging

Forbidden: Transport imports, protocol-specific types, direct database session management, direct external API calls

Layer 3: Repositories (data access layer)

Allowed: SQL queries via ORM, tenant-scoped data access, model factory methods

Forbidden: Business logic, validation beyond data integrity, external API calls, transport awareness

Layer 4: Adapters (external integrations)

Allowed: External API calls, protocol translation, retry logic, adapter-specific error handling

Forbidden: Direct database access, business rule enforcement, knowing about domain context beyond what's passed

Read the full file on GitHub · 141 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. 3mo ago First seen · 141 lines · 29 tokens per session scan A 699a44f4d35f

Subscribe to this mod's changes

review-layering is an agent published in the GitHub repository postindustria-tech/agentic-toolkit (2 stars, last pushed 1mo ago), licensed MIT. It adds 29 tokens to every session and 1,116 once invoked, about $0.0001 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

review-layering compared with agents from other repositories

review-layering next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
review-layeringpostindustria-tech/agentic-toolkitAgent21mo agoMITA29Claude Code
fastapi-revieweraffaan-m/ECCAgent314kyesterdayMITA33Claude Code
backend-reviewerjeremylongshore/tons-of-skills-marketplaceAgent3.0ktodayMITA36Claude Code
integrations-engineeravelikiy/great_ctoAgent11714d agoMITA106Claude Code
phoenix-server-reviewerArize-ai/phoenixAgent12ktodaynoneA69Claude Code, Cursor
enterprise-saas-revieweravelikiy/great_ctoAgent11714d agoMITA40Claude Code
solutions_architectjosstei/maestro-orchestrateAgent49329d agoApache-2.0A88Claude Code