principle-minimize-reader-load — скилл для Claude Code: снизить
Скилл помогает найти лишние слои абстракции и спрятанное состояние, которое замедляет понимание кода. Применяй при ревью сложных участков, когда трудно проследить логику.
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a claude-codeЧто делает principle-minimize-reader-load
Скилл учит различать две оси сложности: глубину трассировки (сколько слоёв между вопросом и ответом) и объём состояния в голове читателя (скрытые или изменяемые данные). LOC и цикломатическая сложность — только прокси; на самом деле важна работа, которую нужно проделать, чтобы понять код.
Скилл предлагает конкретные действия: убирать одноколлеры-обёртки и адаптеры без второй реализации, выравнивать слои (каждый должен менять абстракцию, не повторяя сигнатуру), требовать сжатие интерфейсов — они должны скрывать осмысленные решения. Для состояния: предпочитать чистые функции, локальные переменные полям, поля — модульному состоянию, модульное — глобальному.
Тест применения простой: может ли новый читатель за 30 секунд ответить на вопрос «откуда берётся X?» и «что может изменить X?» Если нет — режь слои или состояние.
Какие задачи решает
- найти лишние слои абстракции при ревью кода
- определить, какое состояние скрыто от читателя
- решить, нужна ли ещё одна обёртка или адаптер
- сократить область видимости переменных
- упростить интерфейс, который скрывает мало смысла
Примеры запросов агенту
- @skills principle-minimize-reader-load этот модуль покрыт адаптерами, помоги понять, какие убрать
- @skills principle-minimize-reader-load в этом файле много state, как сделать функции чище?
- @skills principle-minimize-reader-load проверь, может ли новичок разобраться, откуда берётся эта переменная
Как установить principle-minimize-reader-load
1Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a claude-code2Вручную: положить файлы
~/.claude/skills/principle-minimize-reader-load/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/principle-minimize-reader-load/
1Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a codex2Вручную: положить файлы
.agents/skills/principle-minimize-reader-load/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a cursor2Вручную: положить файлы
.cursor/skills/principle-minimize-reader-load/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install backnotprop/pstack principle-minimize-reader-load2Вручную: положить файлы
.github/skills/principle-minimize-reader-load/SKILL.md1Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a gemini-cli2Командой платформы
gemini skills install https://github.com/backnotprop/pstack --path skills/principle-minimize-reader-loadВручную: положить файлы
.devin/skills/principle-minimize-reader-load/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
Из того же набора5
Весь набор →Похожие
Вопросы о principle-minimize-reader-load
Как установить principle-minimize-reader-load в Claude Code?
Запусти npx skills add backnotprop/pstack --skill principle-minimize-reader-load -a claude-code, затем открой ~/.claude/skills/principle-minimize-reader-load/SKILL.md.
Что делает principle-minimize-reader-load?
Показывает, как считать слои трассировки и скрытое состояние, чтобы код было проще понимать. Учит убирать лишние обёртки, выравнивать интерфейсы и сжимать область видимости переменных.
На каких платформах работает скилл?
На Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode. Для каждой платформы своя команда установки.
Исходный текст
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