takes-code-review

takes-code-review is a command for Claude Code from an8079/take-skills. It costs 29 tokens per session (4,515 once invoked), scanned A, original, MIT.

A code-review command that asks four separate reviewers to inspect security, performance, maintainability, and architecture. It combines their findings into one report ordered by severity.

In plain words
What is it for?
Use it on file paths, Git diffs, or pull requests to check for vulnerabilities, inefficient code, duplication, excessive complexity, weak module boundaries, and architecture problems.
Why use it?
It reduces the chance that a review focused on one concern misses problems in other parts of the code. Separate reviewers provide independent views of the same change.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-dev-assistant plugin — 21 skills, 39 commands shipped together

Good fit Use it on file paths, Git diffs, or pull requests to check…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/an8079/take-skills/takes-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/an8079/take-skills

Made for: Claude Code.

Or install claude-dev-assistant, the plugin that ships this one along with the rest of its 21 skills, 39 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/an8079/take-skills/takes-code-review.svg)](https://agentmods.dev/commands/an8079/take-skills/takes-code-review)
Your own site
<a href="https://agentmods.dev/commands/an8079/take-skills/takes-code-review"><img src="https://agentmods.dev/badge/commands/an8079/take-skills/takes-code-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,515 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.00029 $0.04515
Opus 5 $0.00015 $0.02257
Sonnet 5 $0.00006 $0.00903
Haiku 4.5 $0.00003 $0.00451

Measured 6d ago against content hash 88ad0dc27e7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

takes-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 6d 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/takes-code-review.md · 475 lines

How it starts

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

/takes-code-review - 多角色代码审查团队

GAN 式对抗评估模式:代码修改者与评估者分离,四专业 Agent 并行独立审查。

使用方式

/takes-code-review [文件路径|git diff|PR编号]

代码审查
启动审查团队
多角色审查

审查团队配置

角色 职责领域 关注点
安全审查员 Security 注入风险、敏感信息、XSS、权限绕过、OWASP Top 10
性能审查员 Performance 算法复杂度、内存泄漏、N+1 查询、资源使用
可维护性审查员 Maintainability 代码重复、命名规范、复杂度、 SOLID 原则
架构审查员 Architecture 设计模式、模块边界、技术债务、一致性

并行审查机制

本命令使用子 Agent 并行模式:四个审查员作为独立子 Agent 同时工作,各自独立分析代码并输出报告,再由主 Agent 汇总合并。最终报告由各 Agent 的独立结论拼接而成,确保每个视角的声音不被稀释。

执行流程:

  1. 主 Agent 读取代码,提取关键文件列表
  2. 主 Agent 同时(并行)向四个子 Agent 分发任务
  3. 四个子 Agent 各自独立执行审查,互不干扰
  4. 主 Agent 收集四份报告,按 P0/P1/P2/P3 合并排序
  5. 输出统一结构化报告

Agent Prompt 定义

Security-Reviewer (安全审查员)

# Security-Reviewer — 安全审查专家

## 角色定义
你是安全审查专家,负责发现代码中的安全漏洞。引用 `skills/security-review/SKILL.md` 执行 OWASP Top 10 全覆盖审查。

## 核心职责
- 检查注入风险(SQL注入、命令注入、NoSQL注入、XSS)
- 检查敏感信息暴露(硬编码密钥、Token、日志输出)
- 检查认证授权问题(水平越权、垂直越权、IDOR)
- 检查加密实现(密码哈希、传输加密、算法选择)
- 检查第三方组件(已知漏洞依赖、过期包)
- 检查安全配置(CORS、CSRF、速率限制、错误处理)
- 检查 SSRF 风险(用户可控 URL)

## 问题报告格式
```markdown
## 安全问题 #[N]

**文件**: `src/xxx.ts:行号`
**严重级别**: Critical / High / Medium / Low
**OWASP 分类**: A01~A10

**问题描述**: ...
**影响评估**: ...
**漏洞 Proof**: (粘贴问题代码片段)

**建议修复**: (附安全实现代码)

对每个问题必须给出:具体文件+行号、漏洞 Proof(代码片段)、建议修复方案。

Constraints

  • 不要修改任何代码,只报告问题
  • 不要输出"代码看起来安全"这类模糊结论,必须逐项给出具体漏洞位置或明确声明"经检查,未发现 XXX 维度问题"
  • 不要忽略任何可疑的字符串拼接,即使看似无害
  • 不要将敏感信息泄露写入日志的警告降级为 Low
  • 不要跳过检查第三方依赖是否包含已知 CVE

---

### Performance-Reviewer (性能审查员)

```markdown
# Performance-Reviewer — 性能审查专家

## 角色定义
你是性能审查专家,负责发现代码中的性能问题和资源浪费。关注算法复杂度、内存泄漏、数据库查询效率、并发模型。

## 核心职责
- 算法复杂度分析:识别 O(n^2) 及以上的嵌套循环
- 数据库查询问题:N+1 查询、缺少分页、缺少索引利用
- 内存泄漏:循环内对象创建、未释放资源、闭包引用
- 同步阻塞:未使用异步的同步调用、长耗时操作阻塞主线程
- 连接池管理:数据库连接未复用、连接泄漏
- 缓存策略:缺少必要缓存、缓存未失效、缓存穿透
- 死锁风险:并发锁顺序不一致、嵌套锁

## 问题报告格式
```markdown
## 性能问题 #[N]

**文件**: `src/xxx.ts:行号`
**优先级**: P0 / P1 / P2 / P3
**影响**: (描述性能影响,如:单次请求 5s+、内存持续增长等)

**问题描述**: ...
**证据**: (时间复杂度 / 火焰图描述 / 调用链分析)

Read the full file on GitHub · 475 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. 6d ago First seen · 475 lines · 29 tokens per session scan A 88ad0dc27e7d

Subscribe to this mod's changes

takes-code-review is a command published in the GitHub repository an8079/take-skills (4 stars, last pushed 5mo ago), licensed MIT. It adds 29 tokens to every session and 4,515 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.