principle-minimize-reader-load

Reviews code to reduce indirection layers and hidden mutable state for readers.

3|2|Updated Aug 28, 2026
One-click install
npx skills add https://github.com/adjohn/pstack --skill principle-minimize-reader-load-adjohn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: principle-minimize-reader-load
Source: https://github.com/adjohn/pstack/tree/main/skills/principle-minimize-reader-load
Command: npx skills add https://github.com/adjohn/pstack --skill principle-minimize-reader-load-adjohn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code that is hard to trace slows down every engineer who touches it. This Skill gives reviewers a concrete framework for measuring maintainability by counting the layers between a question and its answer, and the hidden state a reader must hold in their head. ## Core Features & Use Cases - Layer Auditing: Identifies one-caller wrappers, pass-through adapters, and speculative abstractions that add indirection without compression, and recommends inlining them. - State Scope Reduction: Guides shrinking mutable state from globals to module state, fields, locals, and pure functions, favoring derivation over synchronization. - Use Case: During a code review of a service with six adapter layers and scattered module-level flags, apply this Skill to collapse redundant layers and localize state so a new reader can answer "where does X come from?" in under 30 seconds. ## Quick Start Review this module and minimize reader load by collapsing unnecessary layers and shrinking mutable state.

Frequently Asked Questions about principle-minimize-reader-load

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make code easier to read and trace?

Measure reader load on two axes: layers of indirection between a question and its answer, and hidden mutable state the reader must track. Collapse wrappers with one caller, inline pass-through adapters, and shrink state scope from globals toward locals and pure functions.

How to reduce abstraction layers in a codebase?

Identify layers that do not earn their keep: wrappers with a single caller, adapters with no second implementation, and indirection added for a future that never arrived. Inline them, and require that each remaining layer changes the abstraction rather than repeating the same methods.

When should I keep an abstraction layer instead of inlining it?

Keep a layer when it provides interface compression, hiding meaningful decisions behind a narrow boundary. Remove it when it merely repeats the same methods and arguments, since pass-through layers add reader load without reducing complexity.

What is the difference between cyclomatic complexity and reader load?

Cyclomatic complexity counts decision paths, while reader load measures the work a human does to understand code: indirection layers to trace and hidden state to hold. A flat file with fifty globals can be as hard to reason about as a six-layer adapter stack.

How do I reduce mutable state scope in a module?

Prefer pure functions that return values over mutations, locals over fields, fields over module state, and module state over globals. Derive values instead of synchronizing them, and name invariants once at the boundary rather than in every consumer.