principle-minimize-reader-load — Claude Code skill: reduce code
A skill that spots unnecessary layers of abstraction and hidden state slowing down code comprehension. Use it when reviewing complex code where the logic is hard to trace.
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a claude-codeWhat principle-minimize-reader-load does
The skill distinguishes two axes of complexity: depth of tracing (how many layers between a question and its answer) and state held in a reader's head (hidden or mutable context). Cyclomatic complexity and LOC are only proxies. What matters is the actual work required to understand the code.
The skill offers concrete actions: remove one-caller wrappers and adapters with no second implementation, align layers so each one changes the abstraction instead of repeating it, demand interface compression—interfaces should hide meaningful decisions. For state: prefer pure functions over mutations, locals over fields, fields over module state, module state over globals.
The test is simple: can a fresh reader answer "where does X come from?" and "what can change X?" in under 30 seconds. If not, cut layers or cut state.
What it helps with
- identify unnecessary abstraction layers during code review
- uncover hidden state the reader must track
- decide whether another wrapper or adapter is worth adding
- reduce variable scope and mutable state
- compress interfaces that hide little meaning
Example prompts for the agent
- @skills principle-minimize-reader-load this module is wrapped in adapters, which ones should I remove?
- @skills principle-minimize-reader-load there's too much state in this file, how do I make functions purer?
- @skills principle-minimize-reader-load can a new reader trace where this variable comes from in 30 seconds?
How to install principle-minimize-reader-load
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a claude-code2Manually: put the files in place
~/.claude/skills/principle-minimize-reader-load/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/principle-minimize-reader-load/
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a codex2Manually: put the files in place
.agents/skills/principle-minimize-reader-load/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a cursor2Manually: put the files in place
.cursor/skills/principle-minimize-reader-load/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install backnotprop/pstack principle-minimize-reader-load2Manually: put the files in place
.github/skills/principle-minimize-reader-load/SKILL.md1Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a gemini-cli2Platform CLI
gemini skills install https://github.com/backnotprop/pstack --path skills/principle-minimize-reader-loadManually: put the files in place
.devin/skills/principle-minimize-reader-load/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set5
The whole set →Similar
Questions about principle-minimize-reader-load
How do I install principle-minimize-reader-load in Claude Code?
Run npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a claude-code, then open ~/.claude/skills/principle-minimize-reader-load/SKILL.md.
What does principle-minimize-reader-load do?
It teaches you to count tracing layers and hidden state to make code easier to understand. It shows how to remove unnecessary wrappers, align interfaces, and shrink variable scope.
Which platforms support this skill?
Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode. Each platform has its own install command.
Source text
SKILL.md · MIT
--- name: principle-minimize-reader-load description: "Apply when reviewing or shaping code that's hard to trace. Count layers between question and answer, and hidden state in the reader's head; collapse one-caller wrappers and shrink mutable scope." disable-model-invocation: true --- # Minimize Reader Load Maintainability is the work a reader must do to understand code. Track two axes: **layers to trace** (indirections between the question and the answer) and **state to hold** (hidden or mutable context the reader must keep in their head). LOC, cyclomatic complexity, and "clean architecture" are proxies. Reader load is the thing that matters. The two axes are independent. A flat file with 50 globals can be as hard to reason about as a 6-layer adapter stack. Guard both. This is the human analog of [Guard the Context Window](../principle-guard-the-context-window/SKILL.md). Working memory is finite for readers too. - **Collapse layers** that cost more than they save: wrappers with one caller, adapters with no second implementation, speculative indirection that was never needed. Inline them. - **Make adjacent layers change the abstraction.** A layer that repeats the same methods and arguments adds reader load without compression. Collapse pass-through layers. - **Demand interface compression.** A broad interface that hides little complexity makes readers learn both the surface and the implementation. Prefer boundaries that hide meaningful decisions. - **Shrink state scope:** prefer pure functions (returns over mutations), locals over fields, fields over module state, and module state over globals. Derive instead of sync. - **Name the invariant at the boundary,** not in every consumer, so the reader learns it once. - Before adding a layer or a piece of state, ask: does it reduce reader load elsewhere by at least as much? **The test:** can a new reader answer "where does X come from?" and "what can change X?" in under 30 seconds? If not, cut layers or cut state.
© backnotprop · MIT · backnotprop/pstack