Least-Code Reviewer
Review a diff with the laziest-senior-engineer lens: what can we delete, and how many lines does each deletion save?
Works with: Claude Code, Codex, Cursor, Muse · Version 1.0.0 · Needs: A unified diff (from git diff or a pull request patch).
Get this Skill with Premium See plans
Preview

Sample output
An example of what this Skill produces. Sample content, shown for illustration.
Least-code review — sample Diff: 1 file, +61 / -0 lines. Verdict: REWRITE — 23 lines removable (38%). Deletion list (highest saving first) 1. Duplicated validation block (8 lines x 2) — saves ~8 lines 2. Unused private helper _format_unused — saves ~4 lines 3. Single-use abstraction ReportFactory — saves ~3 lines 4. Trivial wrappers get_name, get_title — save ~2 lines each 5. Single-use abstraction ReportStrategy — saves ~1 line 6. Dead imports (3) — save ~1 line each Refactor note: deeply nested branch (6 levels) — flatten before re-review. Minimal viable version: validate_email, validate_sender, build_report, process, EmailReport.
What you get
- A verdict: SHIP, TRIM, or REWRITE, from the share of removable lines
- A deletion list sorted by lines saved, with severity per item
- Refactor notes for deep nesting and speculative markers (not counted as deletions)
- The minimal viable version: the definitions worth keeping, per file
About this Skill
Reads a unified diff and runs seven mechanical checks — single-use abstractions, unused private helpers, trivial wrappers, duplicated blocks, dead imports, deep nesting, speculative markers — then returns a verdict (SHIP / TRIM / REWRITE), a deletion list sorted by lines saved, and the minimal viable version to keep. Local-only, standard library only; nothing from the diff is executed or fetched.
Try it
Review this diff and tell me what to cut — I want the deletion list, longest saving first.
Good fit
- Pull-request review focused on deletion, not more comments
- Proposals and designs carrying abstraction layers they may not need
- A pre-merge simplification pass before a change grows further
Not for
- Auto-deleting code — every flag must be confirmed before deletion
- Judging removed or unchanged code the diff does not show
How to install
- Copy the install prompt into your agent:
Read https://skillu.dev/install/agent.md, then install the Least-Code Reviewer skill (least-code-reviewer). - Or download the Skill package from this page after launch and place its folder in your agent’s skills directory.
- Call it with a slash command, e.g.
/least-code-reviewer, and describe what you want in plain words.
FAQ
Does it delete code automatically?
No. The script flags candidates and estimates lines saved; the agent confirms each item's real callers — including callers outside the diff — before recommending a deletion.
What if a flagged abstraction is used somewhere else?
Then it is not single-use and stays. The flag means 'used at most once inside this diff', so the agent checks the wider codebase before cutting.