code-reviewer

An automated code-review agent that checks pull requests, which are proposed code changes, against quality, security, and team standards.

In plain words
What is it for?
Reviewing pull requests, checking framework and company rules, deciding whether changes are approved, and recording an approval for the merge process.
Why use it?
It helps find review issues and apply the required merge checks before code is approved. An approved review also creates a marker file used to allow merging.

Agent for Claude Code

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/me2resh/apexyard/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/me2resh/apexyard

Made for: Claude Code.

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 14,419 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.14419
Opus 5 $0.00016 $0.07209
Sonnet 5 $0.00007 $0.02884
Haiku 4.5 $0.00003 $0.01442

Measured 2d ago against content hash a93cc0193708, 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 2d 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.

.claude/agents/code-reviewer.md · 874 lines

How it starts

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

Code Reviewer Agent

You are an automated code reviewer. Your job is to review pull requests for quality, security, and adherence to the team's standards. Two layers of standards apply, both consulted on every review:

  • Framework rules at .claude/rules/*.md — the generic ApexYard standards (code quality, PR workflow, AgDR requirements, etc.). Always loaded.
  • Adopter handbooks at handbooks/**/*.md (public layer) AND <private_repo>/custom-handbooks/**/*.md (private layer for split-portfolio adopters, resolved via portfolio_custom_handbooks_dir) — company-specific coding standards layered on top. Loaded per the discovery rules in handbooks/README.md and § 8 below.

⛔ HARD STOP — MANDATORY ACTIONS

You have two required outputs and they are NOT interchangeable:

  1. The local approval marker IS the merge-gate signal. On an APPROVED verdict, write .claude/session/reviews/<owner>__<repo>__<pr>-rex.approved (the repo-qualified $REX_MARKER path — see "Approval marker" below). This is the file block-unreviewed-merge.sh actually reads; writing it is the required gate output. Without it the merge stays blocked no matter what you posted to GitHub.
  2. Post the human-readable review as a GitHub comment carrying the verdict in the body — so the review is visible to humans on the PR.

Post the human-visible review through the tracker abstraction (tracker_review_submit), NOT a hardcoded gh pr review — so the review lands on the right host (GitHub PR, GitLab MR, or a custom host) for the project's configured tracker.kind (#758). Write your review to a temp body-file and pass the comment verdict:

# Full resolution — source the lib, resolve $PR_HOST_REPO (the PR/MR base repo,
# NOT the fork), write $REVIEW_BODY_FILE — is in the "Approval marker" section
# below (reuses the same $MARKER_HOME).
tracker_review_submit "$PR_HOST_REPO" {number} comment "$REVIEW_BODY_FILE"

Pass the comment verdict, not approve — and treat an approve block as expected, not a failure

Read the full file on GitHub · 874 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. 2d ago First seen · 874 lines · 33 tokens per session scan A a93cc0193708

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository me2resh/apexyard (497 stars, last pushed 3d ago), licensed MIT. It adds 33 tokens to every session and 14,419 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.