reviewing a git diff for small localized coding mistakes that can be fixed without high-level understanding
68
55%
Does it follow best practices?
Impact
86%
1.26xAverage score across 3 eval scenarios
Risky
Do not use without reviewing
Optimize this skill with Tessl
npx tessl skill review --optimize ./.claude/skills/low-level-code-review/SKILL.mdThis skill is for performing a low-level code review on a git diff, looking for small, localized coding mistakes that can be identified and fixed without any high-level understanding of the codebase. These are the kinds of mistakes that could occur in any codebase, in any language, and are purely mechanical in nature.
For larger diffs, consider splitting the review into pieces and running each piece as a subagent (e.g., one subagent per file or directory). Keep each subagent focused on a moderate amount of work so it doesn't get lost or wander off track.
The output is a worklist of issues to fix.
Before starting the review, gather the following information (if running as a subagent, the invoking agent should provide these; otherwise, determine them yourself or ask the user):
Git range: Determine which diff to review:
git diff and git diff --cached)masterContext about the change (optional but helpful): A brief description of what the change is intended to do, if known.
If invoking as a subagent, the prompt should include: "Review the diff from
<git-command>. "
Run the git diff command provided by the invoking agent to obtain the diff, then analyze it.
Focus only on issues that are clearly mistakes and can be fixed with confidence. Do not flag anything that requires understanding the broader system design.
uint32_t values near max).%d for a size_t).break in switch: Fall-through that appears unintentional.if (x = y) vs if (x == y).const: Parameters or variables that could clearly be const but
aren't.Produce a structured worklist as output. Each item should contain:
Group issues by file. Example format:
## src/foo/Bar.cpp
### Line 142: Numeric overflow risk
**Original:** `uint32_t total = count1 + count2;`
**Fix:** `uint64_t total = static_cast<uint64_t>(count1) + count2;`
**Why:** Both operands are uint32_t and their sum could exceed UINT32_MAX.
### Line 287: Typo in comment
**Original:** `// Calcualte the checksum`
**Fix:** `// Calculate the checksum`
**Why:** Misspelled "Calculate".+)if (auto* p = getPtr()) as "assignment in condition")Summarize your work as follows:
If invoked as a subagent, pass this summary back to the invoking agent.
1b0eccd
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.