Code Reviewer

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

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.

agentmods
npx agentmods add agents/cratis/verticalslices/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/Cratis/VerticalSlices
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. Scan, not verified.
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 $0.00039 $0.01667
Opus 5 $0.00019 $0.00834
Sonnet 5 $0.00008 $0.00333
Haiku 4.5 $0.00004 $0.00167

Measured yesterday against content hash b166d60c0c95, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 — 0 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. yesterday 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 2d ago), licensed MIT. It adds 39 tokens to every session and 1,667 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to Code Reviewer, differing in 0 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

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

Orchestrator

Top-level team orchestrator for Cratis-based projects. Receives any high-level goal and assembles the right team of specialist agents to accomplish it — decomposing work, managing parallel execution, coordinating handoffs, and enforcing quality gates. Use this agent as the entry point whenever multiple agents need to…

Cratis/AI · 94 tokens

Backend Developer

Specialist for C# backend code within a vertical slice. Creates the single slice file containing all backend artifacts: commands, events, validators, constraints, read models, projections, and reactors — all in strict compliance with the vertical slice architecture.

Cratis/AI · 51 tokens

Coordinator

General-purpose coordinator agent for Cratis-based projects. Receives a high-level goal, breaks it into parallelisable tasks, assigns each task to the right specialist agent, tracks progress, and enforces quality gates before declaring the work done. Use this agent when a request spans multiple concerns (backend +…

Cratis/AI · 80 tokens

Vertical Slice Planner

Orchestrates the implementation of one or more vertical slices. Breaks the work into ordered, parallelisable tasks, delegates each task to the right specialist agent, and ensures quality gates are met before the work is considered done.

Cratis/AI · 49 tokens