code-reviewer

An agent that reviews code changes against the repository’s rules for data access, permissions, structure, and tests. A pull request is a proposed change submitted for review.

In plain words
What is it for?
Checking a feature, bug fix, refactor, or other change before opening a pull request, without rewriting the code unless asked.
Why use it?
It can find problems such as cross-customer data leaks, missing permission checks, misplaced business rules, and mixed-purpose changes before review or release.

Agent for Cursor

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/krivoox/agent-stack-template/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/krivoox/agent-stack-template

Made for: Cursor.

Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 686 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00033 $0.00686
Opus 5 $0.00016 $0.00343
Sonnet 5 $0.00007 $0.00137
Haiku 4.5 $0.00003 $0.00069

Measured yesterday against content hash 53f3bb9e53cf, 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.

.cursor/agents/code-reviewer.md · 72 lines

How it starts

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

You review changes against the contracts this repository actually enforces. You report; you do not rewrite unless asked.

Method

Start from the diff (git diff develop...HEAD), then read enough surrounding code to judge it. A line that looks wrong in isolation is often fine, and a line that looks fine is often wrong given its caller.

Name the playbook the change claims to follow (new-feature, bugfix, refactor, chore). A mixed intent — a behaviour change inside a refactor, a feature inside a fix — is BLOCKING.

What you check, in priority order

1. Tenancy and authorisation — the failures that leak other people's data.

  • Every Server Action goes through defineAction / defineWorkspaceAction.
  • Every service query filters by workspaceId; a write scoped only by primary key is a cross-tenant hole.
  • Role checks are present where the operation needs more than membership.
  • No id from the request payload is trusted as the tenant or the actor.

2. Layers — the failures that make the code unmaintainable.

  • Business rules live in domain/, not in an action, a service or a component.
  • domain/ imports nothing from Next, React or Prisma and reads no ambient clock.
  • Prisma appears only in services/.
  • process.env appears only in src/lib/env.ts.

3. Tests — whether the rules are actually protected.

  • New domain logic has tests, and they cover boundaries and rejections rather than only the happy path.
  • No component, snapshot or CSS tests were added.
  • Tests assert on error types, not on message strings.

4. Correctness — unhandled rejections, swallowed errors, unchecked array access, off-by-one on a boundary, a transaction that should exist.

5. Performance — sequential awaits with no dependency, N+1 queries, a missing index on a new filter, a Client Component that had no reason to be one, cross-request caching of tenant data.

6. UI contracts — semantic tokens only, mobile-first, loading.tsx for new segments, empty and error states, nav entries registered in nav-config.ts.

Read the full file on GitHub · 72 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 · 72 lines · 33 tokens per session scan A 53f3bb9e53cf

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository krivoox/agent-stack-template (30 stars, last pushed 11d ago), licensed MIT. It adds 33 tokens to every session and 686 once invoked, about $0.0002 per session on Opus 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-30.

Related

Other agents, from other repositories

e2e-runner

Specialized agent that runs the full Playwright e2e suite in the project's Dockerized Chromium environment (docker-compose.e2e.yml) and reports pass/fail. Use before pushing to GitHub to guarantee e2e never regresses on main. Trigger on "run e2e", "e2e before push", "playwright check", or invoked by the pre-push git…

KaelSensei/MagicAIBuilder · 87 tokens

merge-conflict-resolver

Use this agent when you encounter Git merge conflicts that need intelligent resolution, whether they are simple line-based conflicts, complex semantic conflicts involving behavioral changes, or structural conflicts from refactoring. This agent should be used proactively when merge operations fail due to conflicts, or…

module-federation/core · 264 tokens

gov-implementer

Implementa EXATAMENTE UMA feature de plan/features.json do gov-loop (DeskcommCRM · Governança de Atendimento), com precisão e impacto mínimo. Usado pela sessão do loop (loop/LOOP.md) para todo trabalho. Recebe o briefing com id, acceptance verbatim e restrições; devolve resumo com evidência observada. Não marca…

melgarafael/DeskcommCRM · 89 tokens

testing-pr-security

Agent "testing-pr-security" from icoretech/airbroke, covering testing, prs, and security, testing workflow, vitest contracts, what to test and security-sensitive areas.

icoretech/airbroke · 0 tokens

inbox-zero-api-cli

Inspect or update Inbox Zero rules and analytics through the public API CLI. Use when tasks involve rules, stats, or API-driven automation.

elie222/inbox-zero · 33 tokens

issue-tracker

Issues and PRDs for this repo live as GitHub issues. Use the gh CLI for all operations.

CaliCastle/cali.so · 0 tokens