codex/skills/reduce/SKILL.md
Audit over-engineered codebases. Use when change latency or agent difficulty comes from frameworks, plugins, DI, codegen, task runners, config indirection, ORMs, GraphQL, monorepo/infra tooling, bundled web stacks, or requests to remove layers while preserving behavior. Produces evidence-backed cuts, lower-level replacements, phased migration, proof signals, rollback, and an essential-abstraction check.
npx skillsauth add tkersey/dotfiles reduceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Act as an architecture simplification reviewer. Find costly abstractions whose value is unproven, expired, redundant, or outweighed by the change latency they impose. Recommend lower-level primitives while preserving observable behavior and essential truth.
The default product is a decision package, not a patch. Implement only when the user explicitly asks for implementation.
reduce descends. universalist climbs. They share an altitude map.
Before recommending removal, classify the move:
descend: lower primitive preserves behavior and essential truth.climb: the current problem is missing shape, not too much abstraction; hand off to universalist.hold: value, public obligation, protocol risk, or proof weakness justifies the layer.split: remove the incidental wrapper while preserving or improving the essential invariant.Read references/abstraction-altitude.md and references/abstraction-move-packet.md for shared vocabulary.
Use this skill when the user asks to remove, reduce, replace, or challenge layers such as:
Use it for prompts like: "this is over-engineered," "too many layers," "remove the framework," "ditch codegen," "reduce the codebase," "start simpler," "make this agent-editable," or "what can we delete?"
Do not use this skill for ordinary local cleanup unless the user explicitly frames the problem as layer removal.
Do not use for:
universalist.wrap or slice.Identify which layers exist at altitudes 0 through 5. Note the layer under suspicion, lower primitives already available, and any invariant/protocol the layer may be carrying.
Inspect at least these categories when available:
package.json, pnpm-workspace.yaml, turbo.json, nx.json, Makefile, justfile, pyproject.toml, go.mod, Cargo.toml, pom.xml, Gradle files;Use scripts/reduce-scan.sh for a non-destructive first pass. Treat script output as inventory, not proof.
For each major abstraction under review, trace at least one real change/request/command path through it.
Record:
List candidates that cause one or more of these costs:
Use references/agent-editability.md and record concrete counters when possible:
Use references/rubric.md.
T = agent/change tax, 0 to 3.V = proven value, 0 to 3.D = T - V.confidence = high, medium, low.external obligation risk = high, medium, low, unknown.Keep value and obligation risk separate. Lack of repo proof may reduce V, but it does not prove the layer is safe to remove.
Before replace or delete, check whether the layer encodes any of:
If yes:
universalist when the missing shape is the real problem.Use one of these verdicts:
keep: value is proven, tax is low, or external obligation risk is too high;wrap: keep the external surface but hide or centralize the abstraction behind a simpler seam;slice: retain only the useful subset and remove unused features, configuration, plugins, generated surface, or dependency paths;replace: move to a lower-level primitive with equivalent behavior and migration proof;delete: remove the layer because usage is absent/redundant and rollback is trivial.For each proposed cut, provide:
For normal audits, produce this structure:
T, V, D.Use templates in references/output-templates.md when you need a strict format.
If the user asks for a quick answer, output only:
If the user explicitly asks you to implement:
If implementation is requested together with an audit, do the audit first, then implement only the first safe phase or the specific cut named by the user.
references/abstraction-altitude.md: shared climb/descend/hold/split vocabularyreferences/abstraction-move-packet.md: handoff packet between skills and subagentsreferences/rubric.md: scoring, confidence, and verdict thresholdsreferences/agent-editability.md: concrete tax countersreferences/essential-abstraction-check.md: invariant-preservation gate before cutsreferences/evidence-model.md: evidence packet and trace checklistreferences/replacement-ladder.md: common lower-level primitives and migration patternsreferences/protocol-evolution.md: stateful protocol safeguardsreferences/output-templates.md: full, quick, provisional, and implementation templatesreferences/eval-prompts.md: trigger and non-trigger test promptstools
Convert markdown plans into beads with dependencies using br CLI. Use when creating task graphs, polishing beads before implementation, or bridging planning to agent swarm execution.
development
Orchestrate Codex skill optimization during active sessions through $cas goal control, $shadow single-session evidence, $tune diagnosis/refinement briefs, and the skill-optimizer custom subagent. Trigger for $opt, skill optimization loops, session-driven skill tuning, meta-skill audits, or explicit validated skill edits. Do not use for general code optimization, product optimization, or performance tuning.
development
Run a targeted fresh-eyes blunder pass over code, specs, plans, adjudications, closure gates, skill edits, or negative-evidence ledgers. Trigger when asked to reread with fresh eyes, find obvious bugs, catch mistakes/oversights/omissions, check for embarrassing misses, or perform a second independent blunder pass before closure. Do not use as a substitute for implementation, adjudication, or verification; use it as the final falsification/check pass for those workflows.
development
Explicitly shadow, tail, watch, follow, monitor, supervise, or companion exactly one Codex session id/path through `$seq`, then apply a named target skill as an interpretation/reporting/proposal/action lens until the watched session stops.