code-reviewer

code-reviewer is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 107 tokens per session (1,687 once invoked), scanned A, original, MIT.

A structured method for reviewing code for bugs, security risks, maintainability problems, and missed edge cases. It starts by identifying the language, framework, and intended behavior.

In plain words
What is it for?
Use it when asking for a review of pasted code or proposed improvements, with attention to correctness, security, design, performance, and readability.
Why use it?
It helps find failures such as swallowed errors, unsafe database queries, race conditions, and incorrect handling of unusual inputs before they reach users.

Skill for Claude CodeCodex

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

Good fit Use it when asking for a review of pasted code or proposed improvements, with attention to correctness, security, design, performance, and readability.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/code-reviewer
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-reviewer
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-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/code-reviewer/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/code-reviewer)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/code-reviewer"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/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/skills/khalilbenaz/claude-skills-collection/code-reviewer"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,687 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
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.00107 $0.01687
Opus 5 $0.00053 $0.00843
Sonnet 5 $0.00021 $0.00337
Haiku 4.5 $0.00011 $0.00169

Measured 9d ago against content hash 6059ae47f04e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 9d 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.

dev-skills/code-reviewer/SKILL.md · 166 lines

How it starts

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

Code Reviewer

Workflow de revue (étapes dans l'ordre)

1. Contexte avant tout

Avant d'analyser une ligne : identifier le langage, le framework, et l'intention du code. Si le contexte manque et est déterminant, poser UNE question ciblée. Sinon, déduire et avancer.

2. Analyse sur 5 axes — ordre de criticité décroissant

🔴 Axe 1 — Bugs & correctness
  • Race conditions, nullpointer / undefined, edge cases non gérés (tableau vide, valeur négative, overflow)
  • Mauvaise gestion des erreurs : catch vide, erreur avalée, retry sans backoff
  • Off-by-one, mauvaise comparaison (== vs ===, = au lieu de ==)

Exemple concret :

# ❌ Bug silencieux
def get_user(id):
    try:
        return db.query(f"SELECT * FROM users WHERE id={id}")
    except:
        pass  # exception avalée, retourne None sans le signaler

# ✅ Correct
def get_user(user_id: int) -> User | None:
    try:
        return db.query("SELECT * FROM users WHERE id = ?", (user_id,))
    except DatabaseError as e:
        logger.error("get_user failed: %s", e)
        raise
🔴 Axe 2 — Sécurité
  • Injection SQL/NoSQL/command : interpolation de chaîne dans une requête → requête paramétrée
  • Secrets en dur : clé API, mot de passe dans le code → variable d'environnement / vault
  • Données sensibles exposées dans les logs ou les réponses API
  • Autorisation manquante (endpoint accessible sans auth)
  • Désérialisation non sécurisée, path traversal

Commande rapide audit dépendances :

# npm / Node
npm audit --audit-level=high

# Python
pip-audit

# .NET
dotnet list package --vulnerable
🟡 Axe 3 — Performance
  • Complexité algorithmique : O(n²) évitable, boucle dans une boucle avec accès DB
  • N+1 : requête dans une boucle → eager load ou batch
  • Allocation inutile en boucle critique (création d'objets, concaténation de string)
  • Pas de cache sur des résultats coûteux et stables

Exemple N+1 → batch :

// ❌ N+1
for (const order of orders) {
  order.user = await db.users.findById(order.userId); // 1 requête/itération
}

// ✅ Batch
const ids = orders.map(o => o.userId);
const users = await db.users.findByIds(ids); // 1 requête
const userMap = Object.fromEntries(users.map(u => [u.id, u]));
orders.forEach(o => (o.user = userMap[o.userId]));

Read the full file on GitHub · 166 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. 9d ago First seen · 166 lines · 107 tokens per session scan A 6059ae47f04e

Subscribe to this mod's changes

code-reviewer is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (22 stars, last pushed 19d ago), licensed MIT. It adds 107 tokens to every session and 1,687 once invoked, about $0.0005 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-09-03.