VerticalSlices: Agent for Claude Code

.ai/agents/code-reviewer.md

Code Reviewer is an agent for Claude Code from Cratis/VerticalSlices. It costs 39 tokens per session (1,667 once invoked), scanned A, a copy of Code Reviewer, MIT.

A code-review workflow for projects organized into vertical slices, where each feature area keeps its related code together.

In plain words
What is it for?
Use it to review C# and TypeScript code, report issues with file locations and corrections, and verify slice structure, tests, naming, and references.
Why use it?
It checks changed files against the project's architecture and coding rules before a merge, making violations and missing pieces easier to fix.

Agent for Claude Code

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

This is Cratis/VerticalSlices's own configuration. It tells Claude Code how to work on VerticalSlices 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 VerticalSlices configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Cratis/VerticalSlices. 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/Cratis/VerticalSlices/main/.ai/agents/code-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/Cratis/VerticalSlices

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 Code Reviewer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/cratis/verticalslices/code-reviewer"><img src="https://agentmods.dev/badge/agents/cratis/verticalslices/code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 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,667 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 100% copy Near-identical to another mod 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.00039 $0.01667
Opus 5.5 $0.00016 $0.00667
Sonnet 5.5 $0.00008 $0.00333
Haiku 4.5 $0.00004 $0.00167

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

Security

Grade A, and why

Code 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.

Origin

This is a copy

100% identical to Code Reviewer — 46 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.ai/agents/code-reviewer.md · 158 lines

How it starts

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

Code Reviewer

You are the Code Reviewer for Cratis-based projects. Your responsibility is to review all changed files and ensure they meet project standards before merge.

Always check against the canonical rules in .ai/rules/ (and general.md): vertical-slices.md, csharp.md, code-quality.md (+ .csharp/.typescript), specs.md (+ .csharp/.typescript), frontend-testing.md, typescript.md, react.md, components.md, dialogs.md, frontend-quality.md, concepts.md, efcore.md/efcore.specs.md.


Review approach

Review every changed file. For each issue found:

  • State the file and line number
  • Quote the problematic code
  • Explain why it violates the standard
  • Provide the corrected code

When checking for unused code, missing references, or naming consistency, prefer the usages tool over grep — it uses LSP for precise, language-aware results. Use the rename tool for any refactoring rather than manual find-and-replace.


C# Architecture checklist

  • Each slice lives in its own folder <Feature>/<Slice>/<Slice>.cs (optional <Module>/ above) — no top-level Features/ wrapper
  • Each artifact type has a single responsibility (commands return events, reactors react, projections project)
  • Business rejection returns a ValidationResult / Result<TEvent, ValidationResult> — never thrown from Provide()/Handle()
  • Fetched/computed handler data is in Provide(), not inline in Handle()
  • No shared state between commands
  • No service locator (IServiceProvider not injected); IInstancesOf<T> (not IEnumerable<T>) for discovering implementations
  • No explicit singleton registration when [Singleton] attribute suffices
  • Logging is in a separate *Logging.cs partial file with [LoggerMessage]

C# Commands checklist

  • record type, not class
  • No properties with setters (immutable)
  • Handle() method is the single entry point
  • Handle() returns the event(s) — never injects IEventLog to append the primary event
  • Custom query paths use [Path("...")], not [Route]
  • Namespace mirrors folder path under the source root: <RootNamespace>.<Module>.<Feature>.<Slice> (no Features segment)

Read the full file on GitHub · 158 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 · 158 lines · 39 tokens per session scan A b166d60c0c95

Subscribe to this mod's changes

Code Reviewer is an agent published in the GitHub repository Cratis/VerticalSlices (2 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 1,667 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to Code Reviewer, differing in 46 lines, and is treated as a copy.

Related

Other agents, from other repositories

Code Reviewer

Quality gate agent for Cratis-based projects. Reviews code against all project instruction files, checking architecture conformance, C# and TypeScript conventions, and vertical slice correctness before merge.

Cratis/AI · 39 tokens

Performance Reviewer

Performance-focused review agent for Cratis-based projects. Analyzes changed files for projection efficiency, query patterns, unnecessary allocations, React render overhead, and Chronicle anti-patterns before merge.

Cratis/AI · 40 tokens

Security Reviewer

Security gate agent for Cratis-based projects. Performs a structured security review of all changed files before merge, covering input validation, auth/authz, data exposure, secrets, event sourcing specifics, and frontend attack surface.

Cratis/AI · 46 tokens

Screenplay Reviewer

Read-only independent reviewer for Cratis Screenplay (.play) models, extracted candidates and change requests. Critic mode checks lineage, structure, anti-patterns, scenario coverage, event-sourcing correctness and mode compliance; explain mode asks the business questions in plain language. Returns defects separately…

Cratis/AI · 68 tokens

Repository Investigation Reviewer

Independent, read-only reviewer for typed Cratis repository investigations. Reviews evidence and repository-mode reasoning without applying application conventions to framework or client-library repositories.

Cratis/AI · 33 tokens

Frontend Developer

Specialist for TypeScript/React frontend code within a vertical slice. Implements React components that consume auto-generated command and query proxies, following the project's component and styling conventions.

Cratis/AI · 37 tokens