less-code-same-behavior

Installation
SKILL.md

Less Code, Same Behavior

A divergence-and-DRY audit hunts for places where a codebase spends more code than its behavior requires — the same block pasted N times, the same concern hand-rolled in N different shapes, one responsibility scattered across a dozen files, public surfaces exporting three times what anyone imports — and consolidates them into less code with identical behavior.

Two disciplines make this safe instead of destructive. First, every consolidation must respect the project's declared architecture: its layers, import contracts, and package boundaries are hard constraints, not obstacles. Second, the audit must be able to conclude "leave it" — a DRY pass that cannot reject its own findings produces churn, not consolidation.

Map the constraints before proposing anything

Read the project's declared architecture first: layer definitions, import/dependency contracts (whatever tool enforces them — import linters, module-boundary rules, package manifests), and the public API surface (exported symbols, documented entry points, semver promises). These determine where consolidated code may live and what may not break. A consolidation plan written before this map is guesswork; the gate at the end must re-run whatever enforces these rules.

The six passes

Run them in order; the cheap structural ones narrow what the expensive ones have to read. Each in full, with the shape that gives it away and where the consolidation should land, is in references/finding-passes.md.

Installs
22
GitHub Stars
1
First Seen
Aug 6, 2026
less-code-same-behavior — morzecrew/agent-skills