code-review-subagent

code-review-subagent is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 118 tokens per session (2,398 once invoked), scanned A, original, MIT.

An automated code-review sub-agent that analyses source code or a unified diff and returns structured findings, severity levels, suggested fixes, and a quality score. It supports several common programming languages.

In plain words
What is it for?
Use it to review Python, JavaScript, TypeScript, Java, Go, Rust, C#, or a code diff, with checks such as linting and static analysis.
Why use it?
It gives a repeatable review process for finding issues that may be missed during manual inspection.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to review Python, JavaScript, TypeScript, Java, Go, Rust, C#, or a code diff, with checks such as linting and static analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/code-review-subagent
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 khalilbenaz/claude-skills-collection --skill code-review-subagent
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

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-subagent

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/code-review-subagent"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/code-review-subagent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 118 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,398 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 59
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium MCP Rug Pull · line 46
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00118 $0.02398
Opus 5 $0.00059 $0.01199
Sonnet 5 $0.00024 $0.00480
Haiku 4.5 $0.00012 $0.00240

Measured 10d ago against content hash 3dd7ef9d3702, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

code-review-subagent scanned grade A with 1 finding 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 10d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Injections** : SQL (`f"SELECT … {user_input}"`), command (`subprocess.call(input, shell=True)`)
agent-skills/code-review-subagent/SKILL.md · 239 lines

How it starts

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

Code Review Sub-Agent

Rôle et périmètre

Sous-agent invocable depuis un agent parent ou un pipeline CI. Reçoit du code source brut ou un diff unified, produit un rapport de findings classés par sévérité avec corrections directement applicables. Supporte Python, JavaScript, TypeScript, Java, Go, Rust, C#.


Workflow en 10 étapes

Étape 1 — Validation des inputs

Vérifier avant toute analyse :

  • code non vide, longueur raisonnable (< 10 000 lignes → OK ; > 10 000 lignes → tronquer et signaler)
  • language supporté ; si absent, détecter via heuristique (tokens + shebang + extension dans le contexte)
  • severity_threshold valide parmi critical | high | medium | low | info

Si validation KO → retourner immédiatement {"findings": [], "score": null, "summary": "<raison>"} sans lancer l'analyse.

Étape 2 — Analyse statique

Lancer l'outil adapté au langage :

Langage Outil principal Fallback
Python ruff check --output-format json flake8 --format json
JS/TS eslint --format json -
Java checkstyle -f json pmd -f json
Go staticcheck -f json go vet
Rust cargo clippy --message-format json -
C# dotnet-format --report json Roslyn analyzers

Seuil de complexité cyclomatique : > 10 → finding medium ; > 20 → finding high.

# Python — mesurer la complexité avec radon
radon cc -j -s src/
# Go — staticcheck JSON
staticcheck -f json ./...
# JS — eslint JSON
npx eslint --format json src/ > eslint-report.json

Étape 3 — Security scan

Priorité absolue. Utiliser semgrep en mode multi-langage + outil natif :

semgrep --config=p/default --json --quiet .
bandit -r src/ -f json -o bandit-report.json   # Python

Patterns à détecter systématiquement :

  • Injections : SQL (f"SELECT … {user_input}"), command (subprocess.call(input, shell=True))
  • Secrets hardcodés : regex (api_key|password|token|secret)\s*=\s*['"][^'"]{8,} sur tout le diff
  • Désérialisation : pickle.loads, yaml.load(…) sans Loader=yaml.SafeLoader
  • Cryptographie faible : MD5, SHA1 pour hachage de mots de passe, ECB mode
  • IDOR / autorisation manquante : endpoint qui utilise un ID sans vérifier current_user

Read the full file on GitHub · 239 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. 10d ago First seen · 239 lines · 118 tokens per session scan A 3dd7ef9d3702

Subscribe to this mod's changes

code-review-subagent is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 16d ago), licensed MIT. It adds 118 tokens to every session and 2,398 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.