Principle Minimize Reader Load
Coding8.1K installs
What it does
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.
Install
npx skills add https://github.com/backnotprop/pstack --skill principle-minimize-reader-loadWebsite
www.skills.sh/backnotprop/pstack/principle-minimize-reader-loadDetails
From the skill’s SKILL.md or README, by its authors. View the original
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. 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.
More Coding skills
See allCoding
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
1.2M installsnpx skills add https://github.com/mattpocock/skills --skill improve-codebase-architectureCoding
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data…
881K installsnpx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-best-practicesCoding
Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel…
869.3K installsnpx skills add https://github.com/mattpocock/skills --skill code-reviewCoding
Use when you need to resolve an in-progress git merge/rebase conflict.
551.2K installsnpx skills add https://github.com/mattpocock/skills --skill resolving-merge-conflicts
Skills are shared by members and not reviewed by us. Read a skill’s code before you install it.