linus-reviewer
A Claude Code, Cursor, Codex CLI, and OpenCode plugin that reviews your code the way Linus Torvalds reviews kernel patches — brutally honest, technically precise, and obsessed with good taste.
"Sometimes you can see a problem in a different way and rewrite it so that a special case goes away and becomes the normal case, and that's good code." — Linus Torvalds, TED 2016
A multi-layer Linus-style analysis that judges your code on:
- Data structures — Are they right? Does the code revolve around good data design, or is it patching around bad structures with conditionals?
- Special cases — Can they be eliminated through better design? (The pointer-to-pointer test)
- Cognitive load — How many context switches does a reader need? Is related code together?
- Abstraction audit — Is every abstraction earning its keep, or is it a premature "helper" that obscures meaning?
- Practicality — Does this solve a real problem? Does the complexity match the severity?
Each finding gets a taste rating: GARBAGE, BAD TASTE, MEH, or GOOD TASTE.
Usage | Install | How It Works | Design Principles | References | Hooks | Configuration
Usage
/linus-review # review current branch changes
/linus-review 405 # review specific PR/MR
/linus-review --fix # review + auto-fix surviving issues
/linus-review --fix 405 # auto-fix specific PR/MR
Install
Claude Code
/plugin marketplace add mattbucci/linus-reviewer
/plugin install linus-reviewer@mattbucci/linus-reviewer
Cursor / cursor-agent
git clone https://github.com/mattbucci/linus-reviewer /tmp/linus-reviewer
cp -r /tmp/linus-reviewer/skills/linus-review ~/.cursor/skills-cursor/linus-review
Then start a new cursor-agent session and /linus-review will be available.
Codex CLI
git clone https://github.com/mattbucci/linus-reviewer /tmp/linus-reviewer
cp -r /tmp/linus-reviewer/skills/linus-review ~/.codex/skills/linus-review
Then start a new codex session and invoke with $linus-review.
OpenCode
git clone https://github.com/mattbucci/linus-reviewer /tmp/linus-reviewer
cp -r /tmp/linus-reviewer/skills/linus-review ~/.config/opencode/skills/linus-review
Then start a new opencode session and /linus-review will be available.
Hooks
This plugin focuses on design review — it does not run linters, type checkers, or tests. Those mechanical checks belong in Claude Code hooks that run automatically, so problems are caught before the review even starts.
"It doesn't even compile... this clearly never even got a whiff of build-testing. Stop sending me garbage."
Configure hooks in your project's .claude/settings.json:
Lint on every file edit:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "npx eslint --fix $CLAUDE_FILE_PATH 2>/dev/null || ruff check --fix $CLAUDE_FILE_PATH 2>/dev/null || true"
}
]
}
]
}
}
Run lint and tests before any agent stops:
{
"hooks": {
"AgentStop": [
{
"hooks": [
{
"type": "command",
"command": ".claude/hooks/check.sh"
}
]
}
]
}
}
Where .claude/hooks/check.sh runs your lint and test suite. Return exit code 2 with a reason on stderr to block the agent from stopping:
#!/bin/bash
set -e
# Lint
if ! npx eslint . 2>&1; then
echo "Lint is failing. Fix lint errors before you stop." >&2
exit 2
fi
# Tests
if ! npm test 2>&1; then
echo "Tests are failing. Fix them before you stop." >&2
exit 2
fi
exit 0
The plugin assumes your code already compiles and passes lint. If it doesn't, that's on you — Linus wouldn't even look at it.
How It Works
"Developers have the attention spans of slightly moronic woodland creatures." — LinuxCon Europe Keynote
Phase 1: Gather Diff
│
├─ docs/config only → skip with note
│
Phase 2: Five-Layer Linus Analysis
│
├─ Layer 1: Data Structures ──┐
├─ Layer 2: Special Cases ────┼── 4 parallel agents
├─ Layer 3: Cognitive Load ───┤ (per-file sub-agents for 5+ files)
├─ Layer 4: Abstraction Audit ┘
│
└─ Layer 5: Practicality & Breakage (deduplicates & synthesizes)
│
Phase 3: Taste Rating & Findings
│
Phase 4: Auto-Fix (if --fix, max 2 iterations)
│
Phase 5: Report (console + PR comments + artifacts)
Design Principles