code-review

Reviews diffs and agent-written code for defects and prescribes verification probes.

Updated Jul 3, 2026
One-click install
npx skills add https://github.com/mnazaal/dotfiles --skill code-review-mnazaal
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-review
Source: https://github.com/mnazaal/dotfiles/tree/main/.agents/skills/code-review
Command: npx skills add https://github.com/mnazaal/dotfiles --skill code-review-mnazaal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Agent-written research code often passes its tests while still being wrong, and reading a diff alone catches only about half of defects. This Skill provides a disciplined review methodology that reads changes against the original request, hunts for high-yield defect classes, and names the exact probe that settles what reading cannot. ## Core Features & Use Cases - Defect-focused diff reading: Checks for deleted numerical guards, invented constants, scope over-reach, convention drift across call sites, tests that mirror the implementation, hallucinated imports, swallowed failures, and reimplemented primitives. - Probe prescription: For issues reading cannot settle, it names the decisive check, such as label-shuffle controls, prime-dimension shape probes, finite-difference gradient checks, or tripwire evaluation arms. - Strict output discipline: Reports only findings that clear a severity bar with a settling check, excludes linter-covered and stylistic issues, and scales review depth to blast radius rather than diff size. - Use Case: After an agent writes a new loss function with tests, use this Skill to review the diff, catch a silently dropped stop_gradient, and get a finite-difference probe recommendation to confirm the gradient. ## Quick Start Review the diff of my current branch against the original request and list any defects with the probe that would settle each one.

Frequently Asked Questions about code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review agent-written code before committing it?▼

Read the diff against the original request rather than its docstring, check for deleted numerical guards and invented constants, and verify tests assert against an independent oracle. For anything reading cannot settle, run the named probe such as a finite-difference gradient check.

What defects should I look for when reviewing ML research code?▼

Prioritize deleted numerical guards like jitter and stop_gradient, new unexplained numeric literals, convention drift across call sites, tests mirroring the implementation, swallowed exceptions, and hand-rolled primitives like logsumexp or softmax.

How do I verify a gradient or loss function is correct?▼

Use finite-difference checks on the gradient since the forward value cannot catch a missing stop_gradient or term. For objective semantics, evaluate at a closed-form point and compare against hand arithmetic.

Why do tests pass when the code is still wrong?▼

Agents often write tests from the same misreading of the spec as the implementation, so green tests certify consistency, not correctness. Check whether each test asserts against an independent oracle rather than the code's own output.

What should a code review not flag?▼

Skip anything the configured linter or type checker already reports, style and naming issues, defense-in-depth on guarded code, unchanged surrounding code, and theoretical risks with no traced path to a wrong result.

When is a diff review not enough to confirm correctness?▼

Reading cannot settle metric provenance, axis and broadcasting behavior, seeding, autograd correctness, or config overrides. These require runtime probes like label-shuffle controls, prime-dimension shape tests, or reading the run's recorded resolved config.