lean-codelisted
Install: claude install-skill HeisenbergI8/claude-harness
# Lean Code
The cheapest code to maintain is the code you did not write. This skill runs **before** you type. For
cleaning up code that already exists, use a simplification pass instead — this does not duplicate it.
## The search-first rule
Before writing any new helper, type, hook, or component, **spend one search proving it does not already
exist.** The answer is very often yes.
Check, every time:
- The shared utilities directory named in `CONVENTIONS.md`.
- The canonical reference module — whatever it does, it probably does this too.
- The transport or client layer. **Never hand-roll a fetch wrapper or a URL concatenation** when the
project has a sanctioned one.
- Any component library the project already ships. Check before building a dialog, table shell, or form
field from scratch.
If something similar exists but does not quite fit, **prefer extending it over cloning it** — but say so,
since widening a shared helper affects its other callers.
## Questions to pass before adding code
**Does this need to exist?** Not "is it nice" — does removing it break a stated requirement?
Speculative flexibility for a future nobody specified is the most common source of bulk.
**Is this the third time?** Two similar call sites do not justify an abstraction. **Duplication is
cheaper than the wrong abstraction**, and the right shape is usually only visible on the third use.
**Can an existing type carry this?** A new type that is an existing type plus one field is usually a
fi