VerticalSlices: Agent for Claude Code

.ai/agents/performance-reviewer.md

Performance Reviewer is an agent for Claude Code from Cratis/VerticalSlices. It costs 39 tokens per session (1,026 once invoked), scanned A, original, MIT.

A review agent that looks for performance problems in changed Cratis, .NET, MongoDB, and React code before a merge.

In plain words
What is it for?
Checking projections, event handlers, MongoDB filters and paging, event sizes, replay safety, and React rendering overhead.
Why use it?
It helps catch slow queries, unnecessary event-log work, excessive data loading, and avoidable browser rendering before they reach users.

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/performance-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 Performance Reviewer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/cratis/verticalslices/performance-reviewer"><img src="https://agentmods.dev/badge/agents/cratis/verticalslices/performance-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,026 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.00039 $0.01026
Opus 5.5 $0.00016 $0.00410
Sonnet 5.5 $0.00008 $0.00205
Haiku 4.5 $0.00004 $0.00103

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

Security

Grade A, and why

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

.ai/agents/performance-reviewer.md · 102 lines

How it starts

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

Performance Reviewer

You are the Performance Reviewer for Cratis-based projects. Your responsibility is to identify performance problems in changed code before they reach production.


What to check

Chronicle / Event Sourcing

  • Projections use .AutoMap() — avoids manual field mapping cost
  • Projections do NOT perform joins on the read model (Chronicle re-hydrates from events; joining on the model forces a full re-read)
  • Reactors do NOT re-query the event log inside their On() handler — use event data directly
  • No eager loading of entire event logs or event sequences without paging/filtering
  • Projections that are frequently queried have an appropriate ProjectionId stable GUID (changing it forces a full rebuild)
  • Event types are small — no large blobs or base64-encoded content embedded in events
  • Replay scenarios are considered: new projections must be able to replay all historical events without crashing

MongoDB / Read Models

  • Queries filter on indexed fields — no full-collection scans
  • Paged queries use .Skip() + .Take() (or useWithPaging()) — never load all rows
  • Read-model record types do not embed large nested collections that are never fully iterated
  • No N+1 pattern: single query returns all needed data rather than one query per row

ASP.NET Core / Arc Commands & Queries

  • Query endpoints do not hydrate the full collection when only a count is needed (and vice versa)
  • Command handlers do not perform I/O in validation — keep validators synchronous and in-memory
  • No await Task.Run(() => syncWork) wrapping CPU-bound work that should instead be async natively
  • Response payloads include only fields the client uses — no over-fetching

React / TypeScript

  • Components that receive large collections as props are wrapped in React.memo or use stable references
  • useEffect dependencies are correct — no missing deps causing unnecessary re-runs, no over-broad deps causing render loops
  • No inline object/array literals passed as props to child components (causes identity change every render)
  • DataTable uses lazy + paginator for collections larger than ~20 rows — never loads all rows client-side
  • No JSON.parse(JSON.stringify(x)) for deep cloning — use structured clone or immer
  • Images/icons are not re-rendered on every parent render — stable references

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

Subscribe to this mod's changes

Performance 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,026 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-31.

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

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

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

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

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