code-review

code-review is a skill for Claude Code, Codex from AlanNiew/code-review-mcp. It costs 22 tokens per session (796 once invoked), scanned A, original, MIT.

A code-review workflow used with a local code-review server. It examines files, uncommitted changes, or an entire project for common quality and security problems.

In plain words
What is it for?
Reviewing Git changes, analyzing individual files, scanning project-wide code quality, and organizing findings by severity.
Why use it?
It gives reviews a consistent process for finding issues such as hard-coded secrets, leftover debugging code, overly complex functions, and unfinished notes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Reviewing Git changes, analyzing individual files, scanning project-wide code quality, and organizing findings by severity.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alanniew/code-review-mcp/skill
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.

Any agent
npx skills add AlanNiew/code-review-mcp --skill skill
Clone the repo
git clone --depth 1 https://github.com/AlanNiew/code-review-mcp

Made for: Claude Code, Codex.

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/skills/alanniew/code-review-mcp/skill/github.svg)](https://agentmods.dev/skills/alanniew/code-review-mcp/skill)
Your own site
<a href="https://agentmods.dev/skills/alanniew/code-review-mcp/skill"><img src="https://agentmods.dev/badge/skills/alanniew/code-review-mcp/skill/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/skills/alanniew/code-review-mcp/skill"><img src="https://agentmods.dev/badge/skills/alanniew/code-review-mcp/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 796 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.00022 $0.00796
Opus 5.5 $0.00009 $0.00318
Sonnet 5.5 $0.00004 $0.00159
Haiku 4.5 $0.00002 $0.00080

Measured 1mo ago against content hash eb83a6ce0b76, 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.

skill/SKILL.md · 89 lines

What it actually says

代码审查工作流

你是一个专业的代码审查助手。请按照以下标准流程进行代码审查。

工具说明

本技能需要配合 code-review-mcp MCP 服务器使用,它提供以下工具:

  • analyze_file — 分析单个文件的代码质量、复杂度、行数统计
  • review_diff — 审查当前 git 未提交的变更,检测调试代码和潜在密钥泄露
  • check_project — 扫描整个项目的代码质量概况

审查流程

场景一:审查未提交的变更

  1. 首先调用 review_diff 获取所有未提交的变更分析
  2. 检查是否存在以下高风险问题:
    • 硬编码密钥/密码(severity: error)— 必须立即修复
    • 遗留调试代码(print/console.log)— 建议移除
    • 新增 TODO/FIXME(severity: info)— 确认是否需要跟踪
  3. 对 diff 中涉及的文件,如果有重大改动,调用 analyze_file 深入分析
  4. 按严重程度汇总问题,给出修复建议

场景二:审查特定文件

  1. 调用 analyze_file 分析目标文件
  2. 检查以下维度:
    • 质量评分(quality.grade)— A/B/C/D 等级
    • 函数复杂度 — 函数过长、分支过多、参数过多
    • 行数统计 — 注释比例是否合理(建议 10%-20%)
    • 代码风格 — 行过长、末尾空白
    • TODO/FIXME — 是否有遗留标记
  3. 针对每个问题提供具体的修复建议和代码示例

场景三:项目整体扫描

  1. 调用 check_project 扫描项目概况
  2. 关注以下信息:
    • 项目语言分布 — 了解技术栈组成
    • 问题最多的文件(top_issues_files)— 优先审查
    • 整体质量评分 — 评估项目健康度
  3. 对问题最多的前 3-5 个文件,调用 analyze_file 深入分析

输出格式

请按以下格式输出审查报告:

## 代码审查报告

### 概况
- 文件数:X
- 总行数:X
- 质量评分:X(等级:X)

### 问题列表

#### 🔴 必须修复(Error)
1. [文件:行号] 问题描述
   - 修复建议:...

#### 🟡 建议修复(Warning)
1. [文件:行号] 问题描述
   - 修复建议:...

#### 🔵 可选优化(Info)
1. [文件:行号] 问题描述
   - 修复建议:...

### 总结
总体评价和改进方向建议。

注意事项

  • 如果文件不存在或读取失败,请向用户说明原因
  • 对于超过 5MB 的文件,跳过并提示用户
  • 审查时不要修改代码,只提供建议
  • 如果用户要求修复,再进行代码变更
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 · 89 lines · 22 tokens per session scan A eb83a6ce0b76

Subscribe to this mod's changes

code-review is a skill published in the GitHub repository AlanNiew/code-review-mcp (3 stars, last pushed 4mo ago), licensed MIT. It adds 22 tokens to every session and 796 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.

Related

Other skills, from other repositories

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

openclaw/clawhub · 17 tokens

omh-code-review

This is an OMH code-review workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 48 tokens

revdiff-plan

Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…

umputun/revdiff · 84 tokens

asplos-writing-style

Use when drafting or revising ASPLOS prose — engineering the first two pages that rapid review actually reads, stating the cross-layer insight as one quotable sentence, structuring per-layer mechanism sections, writing bounded claims, and fitting everything into 11 self-contained pages that include figures and…

brycewang-stanford/Awesome-Journal-Skills · 65 tokens

explore-unknowns

Guide the user through a quadrant walk that maps the unknowns of a task — open by listing the known knowns, then work through known unknowns, unknown knowns, and unknown unknowns one stage at a time, ending with a complete four-quadrant map in the user's hands. Use when a request is ambiguous or underspecified, the…

dzhng/skills · 162 tokens

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens