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

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 skills/alanniew/code-review-mcp/skill
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.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.svg" alt="Measured on agentmods" 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. 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.00022 $0.00796
Opus 5 $0.00011 $0.00398
Sonnet 5 $0.00004 $0.00159
Haiku 4.5 $0.00002 $0.00080

Measured 3d ago against content hash eb83a6ce0b76, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 2mo ago), licensed MIT. It adds 22 tokens to every session and 796 once invoked, about $0.0001 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 skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens