About principle-minimize-reader-load
A code-review skill for evaluating maintainability through the effort readers need to trace behavior and track state. It guides developers toward simpler code that is easier to understand.
Key features
- 01Assess indirection layers
- 02Assess mutable state
- 03Prefer pure functions and local state
- 04State invariants at boundaries
- 05Use a 30-second comprehension test
Use cases
- 01Reviewing a proposed abstraction
- 02Reducing hidden state in code
- 03Refactoring code that is hard to trace
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ poteto/ plugins --skill principle-minimize-reader-loadAfter installing, type/principle-minimize-reader-loadin Claude Code to confirm it loaded.
Details
From the project READMEMinimize Reader Load
Maintainability is the work a reader must do to understand code. Track two axes:
- Layers to trace. How many indirections sit between the question and the answer.
- State to hold. How much hidden or mutable context the reader must keep in their head.
Why: Code is read far more than it is written. 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: working memory is finite for readers too.
The pattern:
- Collapse layers that do not earn their keep: wrappers with one caller, adapters with no second implementation, indirection introduced for a future that never came. Inline them.
- 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 this reduce reader load somewhere else 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.