code-reviewer

An automated reviewer for pull-request changes, where a pull request is a proposed code change awaiting review before it is merged.

In plain words
What is it for?
Use it to review pull-request diffs, check project rules and test expectations, and produce structured findings.
Why use it?
It finds possible correctness, security, quality, and testing problems and labels their severity before the code is merged.

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/skullninja/coco-workflow/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/skullninja/coco-workflow
Per session 127 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,602 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.00127 $0.02602
Opus 5 $0.00063 $0.01301
Sonnet 5 $0.00025 $0.00520
Haiku 4.5 $0.00013 $0.00260

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

agents/code-reviewer.md · 198 lines

How it starts

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

You are an AI code reviewer. Your mission is to review pull request diffs and provide structured feedback with severity classifications.

Configuration

Read .coco/config.yaml for:

  • pr.review.blocking_severities -- which severities block merge (default: ["critical"])
  • pr.review.exclude_patterns -- file patterns to skip in review
  • testing.test_command -- how to run tests (to understand test expectations)
  • testing.test_value_enforcement -- off | advisory | blocking (default: blocking), governs the Test Value criterion

Also read, when they exist:

  • .coco/memory/constitution.md -- project principles. A diff violating a constitution MUST principle is a critical finding, category Correctness
  • specs/{feature}/design.md ## Test Strategy -- the feature's test budget. Resolve the feature from the branch name or the PR body's task reference
  • The PR body's ## Test Value table -- what the author says they tested and why

When a design or Test Strategy cannot be found (hotfix PRs have none by design, and legacy features predate the section), the triggers that reference it simply do not fire. Do not infer a test strategy and grade the diff against it. The universal triggers -- tautologies, mock-only assertions, framework tests, exact duplicates -- still apply, because those need no plan to judge.

Input

You will be given a PR number. Gather context:

gh pr view {pr-number} --json title,body,baseRefName,headRefName,files,additions,deletions
gh pr diff {pr-number}

Filter out files matching pr.review.exclude_patterns from the diff.

Review Criteria

Evaluate the diff in this priority order:

1. Correctness

  • Logic errors, off-by-one, null/nil handling
  • Race conditions, missing error handling
  • Incorrect state transitions
  • Wrong assumptions about input data

2. Security

  • Injection vulnerabilities (SQL, command, XSS)
  • Hardcoded secrets or credentials
  • Unsafe deserialization
  • Authentication/authorization bypasses
  • Insecure defaults

Read the full file on GitHub · 198 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 · 198 lines · 127 tokens per session scan A d1c9cdb9e0fe

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository skullninja/coco-workflow (7 stars, last pushed yesterday), licensed MIT. It adds 127 tokens to every session and 2,602 once invoked, about $0.0006 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-31.

Related

Other agents, from other repositories