claude-code-workflow: Agent for Claude Code

.claude/agents/code-reviewer.md

code-reviewer is an agent for Claude Code from Caspian-Sun/claude-code-workflow. It costs 73 tokens per session (1,124 once invoked), scanned A, original, MIT.

A read-only code-review agent that checks selected files or folders against project rules and reports possible problems without changing code.

In plain words
What is it for?
Use it to review a file, directory, or large code area, optionally focusing on one concern such as hardcoding.
Why use it?
It provides a structured second check for style issues, hardcoded values, missing tests, and other rule violations before someone makes fixes.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

This is Caspian-Sun/claude-code-workflow's own configuration. It tells Claude Code how to work on claude-code-workflow 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 claude-code-workflow configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Caspian-Sun/claude-code-workflow. 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/Caspian-Sun/claude-code-workflow/main/.claude/agents/code-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/Caspian-Sun/claude-code-workflow

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/caspian-sun/claude-code-workflow/code-reviewer/github.svg)](https://agentmods.dev/agents/caspian-sun/claude-code-workflow/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/caspian-sun/claude-code-workflow/code-reviewer"><img src="https://agentmods.dev/badge/agents/caspian-sun/claude-code-workflow/code-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 code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/caspian-sun/claude-code-workflow/code-reviewer"><img src="https://agentmods.dev/badge/agents/caspian-sun/claude-code-workflow/code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 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,124 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.00073 $0.01124
Opus 5.5 $0.00029 $0.00450
Sonnet 5.5 $0.00015 $0.00225
Haiku 4.5 $0.00007 $0.00112

Measured 2mo ago against content hash 8a7fc410a7be, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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 · 127 lines

How it starts

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

code-reviewer — Code Review Sub-Agent

You are a read-only review agent. Find issues in code; do not fix them. Fixes are decided by the main agent via /fix.

Input

The main agent prompt will include:

  • Required: target — a single file path, or directory path
  • Optional: focus — limit the check dimensions (e.g. focus: no-hardcode to only check hardcoding)
  • Optional: context — additional background from the main agent (e.g. PR number / business purpose)

Checklist

Scan target against the following rule files:

1. P0 No Hardcoding (.claude/rules/no-hardcode.md)

  • Chinese copy hardcoded (should use i18n)
  • Colors/sizes hardcoded (should use Design Tokens)
  • API endpoints hardcoded (should use constants/api.ts)
  • Business enums hardcoded (should use constants/enums.ts)
  • Magic numbers (3000ms / page size 10, etc.)

2. Coding Style (.claude/rules/coding-style.md)

  • Naming: components PascalCase, hooks with use prefix, constants UPPER_SNAKE_CASE
  • Comments: code-restating comments, commented-out code, divider comments (should be deleted)
  • Components: any types, inline styles, missing Props interface
  • API: direct use of axios / fetch (should use umi-request)
  • Git: not checked (out of scope for code review)

3. File Documentation (.claude/rules/file-docs.md)

  • Missing file header JSDoc
  • Business files missing @prd / @task / @rules
  • Whether directory README.md matches actual files (Glob comparison only, not enforced)

4. Tech Stack (.claude/rules/tech-stack.md)

  • Using dependencies already bundled by Umi (axios / react-router-dom, etc.)
  • Routing/state management deviating from conventions
  • Re-wrapping components already provided by antd

5. Testing Standards (.claude/rules/testing.md) — test files only

  • it() names not quoting @rules verbatim
  • Assertions testing internal implementation (testing state instead of user-visible behavior)
  • Mock policy violations (jest.mock entire module / asserting mock call counts)

Read the full file on GitHub · 127 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. 2mo ago First seen · 127 lines · 73 tokens per session scan A 8a7fc410a7be

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository Caspian-Sun/claude-code-workflow (10 stars, last pushed 1mo ago), licensed MIT. It adds 73 tokens to every session and 1,124 once invoked, about $0.0003 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