code-review

code-review is a skill for Claude Code, Codex from FareedKhan-dev/claude-code-from-scratch. It costs 34 tokens per session (773 once invoked), scanned A, original, MIT.

A structured process for reviewing code for bugs, security problems, performance issues, style problems, and optional improvements.

In plain words
What is it for?
Use it to review files or functions, audit error handling and security, check code quality, compare implementations, or suggest refactors.
Why use it?
It makes code reviews more consistent by requiring the reviewer to read the full code, understand its purpose, and classify each finding.

Skill for Claude CodeCodex

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

Good fit Use it to review files or functions, audit error handling and security, check code quality, compare implementations, or suggest refactors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fareedkhan-dev/claude-code-from-scratch/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.

Any agent
npx skills add FareedKhan-dev/claude-code-from-scratch --skill code-review
Clone the repo
git clone --depth 1 https://github.com/FareedKhan-dev/claude-code-from-scratch

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/fareedkhan-dev/claude-code-from-scratch/code-review/github.svg)](https://agentmods.dev/skills/fareedkhan-dev/claude-code-from-scratch/code-review)
Your own site
<a href="https://agentmods.dev/skills/fareedkhan-dev/claude-code-from-scratch/code-review"><img src="https://agentmods.dev/badge/skills/fareedkhan-dev/claude-code-from-scratch/code-review/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/fareedkhan-dev/claude-code-from-scratch/code-review"><img src="https://agentmods.dev/badge/skills/fareedkhan-dev/claude-code-from-scratch/code-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 773 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.00034 $0.00773
Opus 5.5 $0.00014 $0.00309
Sonnet 5.5 $0.00007 $0.00155
Haiku 4.5 $0.00003 $0.00077

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

skills/code-review/SKILL.md · 106 lines

How it starts

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

Code Review Skill

When to use this skill

Load when the user asks you to:

  • Review a file or function for bugs
  • Check code quality or style
  • Suggest improvements or refactors
  • Audit security or error handling
  • Compare two implementations

Review process

Always follow this order. Do not skip steps.

Step 1 — Read before commenting

Use the read tool to read the full file first. Use grep to find related code (callers, tests, imports). Never comment on code you haven't fully read.

Step 2 — Understand intent

Ask: what is this code trying to do? Read any docstrings, comments, and function names. If the intent is unclear, note it — don't assume.

Step 3 — Categorise issues

Use these categories consistently:

Category When to use
BUG Code that will produce wrong results or crash
SECURITY Input not validated, secrets exposed, injection risks
PERF Unnecessary work, wrong data structure, O(n²) that could be O(n)
STYLE Inconsistent naming, long functions, missing docstrings
SUGGEST Optional improvements — not required to fix

Step 4 — Write findings

Format each finding:

[CATEGORY] file.py:line_number
  Issue: one sentence describing the problem
  Why:   why this matters
  Fix:   concrete suggestion or corrected code snippet

Step 5 — Summary

End with:

  • Total issues found per category
  • The most critical issue (if any BUG or SECURITY)
  • Whether the code is safe to deploy as-is

What good code review looks like

  • Specific: cite file + line number, not "somewhere in the code"
  • Actionable: every issue has a suggested fix
  • Proportionate: distinguish blocking bugs from style nits
  • Respectful: review the code, not the author

Common bugs to look for in Python

# Mutable default argument (very common)
def append(item, lst=[]):   # BUG: lst shared across all calls
    lst.append(item)

# Exception swallowed silently
try:
    do_something()
except Exception:            # BUG: hides errors, use `except Exception as e: log(e)`
    pass

# Off-by-one in slices
items[1:len(items)]          # STYLE: prefer items[1:]

# Late binding closure
fns = [lambda: i for i in range(5)]   # BUG: all return 4
fns = [lambda i=i: i for i in range(5)]  # Fix

# Forgetting to close resources
f = open("file.txt")        # BUG: use `with open("file.txt") as f:`

Read the full file on GitHub · 106 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. 1mo ago First seen · 106 lines · 34 tokens per session scan A 47c3f2b79ddc

Subscribe to this mod's changes

code-review is a skill published in the GitHub repository FareedKhan-dev/claude-code-from-scratch (302 stars, last pushed 6mo ago), licensed MIT. It adds 34 tokens to every session and 773 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-30.