principle-minimize-reader-load

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

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/gmackie/agent-skills --skill principle-minimize-reader-load-gmackie
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-minimize-reader-load
Source: https://github.com/gmackie/agent-skills/tree/main/skills/principle-minimize-reader-load
Command: npx skills add https://github.com/gmackie/agent-skills --skill principle-minimize-reader-load-gmackie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code that is hard to trace slows down every future change. This Skill gives reviewers a concrete method to measure how much work a reader must do to understand code, 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 wrappers with one caller, adapters with no second implementation, and pass-through layers that add indirection without compression, then inlines them. - State Scope Reduction: Guides shrinking mutable scope from globals to module state, fields, locals, and pure functions, preferring derived values over synchronized copies. - Use Case: During a code review of a service with six adapter layers and scattered module-level mutable state, apply this Skill to collapse the pass-through 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 tell me which layers and pieces of state I can cut to reduce reader load.

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 reduce cognitive load in code reviews?▼

Count two things: the layers between a question and its answer, and the hidden state a reader must track. Collapse wrappers with one caller and pass-through layers, and shrink mutable scope from globals toward locals and pure functions.

How to decide when a code abstraction layer is worth keeping?▼

A layer earns its keep only if it changes the abstraction or hides meaningful decisions. If it repeats the same methods and arguments as the layer below, or exists for a future that never came, inline it.

What is the difference between reader load and cyclomatic complexity?▼

Cyclomatic complexity counts branches; reader load measures the work a human does to trace code. A flat file with 50 globals can be harder to reason about than a layered design, so both layers and state scope must be guarded independently.

When should I not collapse a wrapper or adapter?▼

Keep a layer when it has multiple callers or implementations, hides a meaningful decision, or names an invariant at a boundary so consumers learn it once. Collapsing such layers increases reader load elsewhere instead of reducing it.

How do I shrink mutable state scope in a codebase?▼

Prefer returns over mutations, locals over fields, fields over module state, and module state over globals. Derive values instead of synchronizing copies, so readers can answer "what can change X?" quickly.