code-review

code-review is a command for Claude Code from alphaaiservice/cortex. It costs 32 tokens per session (1,052 once invoked), scanned A, original, MIT.

An automated review of changed code, such as staged files or the difference between a branch and the main branch. It checks code quality, security, performance, and other common review concerns.

In plain words
What is it for?
Use it to review staged changes or a feature branch before opening or merging a pull request.
Why use it?
It helps find problems before code is merged, including unsafe input handling, exposed secrets, inefficient database use, and missing error handling.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md; mentions subagents.

Part of the cortex plugin — 43 commands, 1 MCP server shipped together

Good fit Use it to review staged changes or a feature branch before opening or merging a pull request.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alphaaiservice/cortex/code-review
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.

Clone the repo
git clone --depth 1 https://github.com/alphaaiservice/cortex

Made for: Claude Code.

Or install cortex, the plugin that ships this one along with the rest of its 43 commands, 1 MCP server.

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 code-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/alphaaiservice/cortex/code-review/github.svg)](https://agentmods.dev/commands/alphaaiservice/cortex/code-review)
Your own site
<a href="https://agentmods.dev/commands/alphaaiservice/cortex/code-review"><img src="https://agentmods.dev/badge/commands/alphaaiservice/cortex/code-review/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 code-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/alphaaiservice/cortex/code-review"><img src="https://agentmods.dev/badge/commands/alphaaiservice/cortex/code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 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,052 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.00032 $0.01052
Opus 5.5 $0.00013 $0.00421
Sonnet 5.5 $0.00006 $0.00210
Haiku 4.5 $0.00003 $0.00105

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

Security

Grade A, and why

code-review 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.

commands/code-review.md · 131 lines

How it starts

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

Automated Code Review

You are a senior code reviewer performing a thorough review. Analyze: $ARGUMENTS

Step 1: Identify Changes

# If --staged or no args, review staged changes
git diff --cached --name-only 2>/dev/null || git diff --name-only HEAD~1

# If branch name provided, compare against main
git diff main...$ARGUMENTS --name-only 2>/dev/null

Read every changed file completely.

Step 2: Multi-Dimensional Review

Use Agent tool (mode = "bypassPermissions") to run 5 parallel review agents:

Agent 1: Code Quality

  • Clean code principles (SRP, DRY, KISS)
  • Function/method length and complexity
  • Naming conventions consistency
  • Magic numbers and hardcoded values
  • Dead code or unused imports
  • Proper error handling
  • Resource cleanup (connections, file handles)

Agent 2: Security Analysis

  • SQL injection vectors
  • XSS vulnerabilities
  • Authentication/authorization gaps
  • Sensitive data exposure (API keys, passwords)
  • Input validation completeness
  • CORS configuration
  • Dependency vulnerabilities (check package versions)

Agent 3: Performance Review

  • N+1 query patterns
  • Missing database indexes (if schema changes)
  • Unnecessary re-renders (React)
  • Memory leaks (event listeners, subscriptions)
  • Unbounded data fetching
  • Missing pagination
  • Caching opportunities

Agent 4: Testing Assessment

  • Test coverage for new code
  • Edge case coverage
  • Mock appropriateness
  • Test isolation
  • Missing negative test cases
  • Integration test gaps

Agent 5: Architecture & Standards

  • Consistent with existing patterns
  • CLAUDE.md / STANDARDS.md compliance
  • API contract changes (breaking changes?)
  • Proper abstraction layers
  • Dependency direction (no circular deps)
  • Documentation updates needed

Agent Teams Review Mode (When Enabled)

When CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set, upgrade to Agent Teams review mode where the 5 reviewers become real teammates who debate and challenge each other's findings.

Team Creation:

Read the full file on GitHub · 131 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 · 131 lines · 32 tokens per session scan A 3c36d01efe60

Subscribe to this mod's changes

code-review is a command published in the GitHub repository alphaaiservice/cortex (1 stars, last pushed 2mo ago), licensed MIT. It adds 32 tokens to every session and 1,052 once invoked, about $0.0001 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.