abstraction-improver
Installation
SKILL.md
Abstraction Improver
Over-abstraction hides simple code behind layers that earn nothing: interfaces
with one implementation, factories that construct one thing, managers that just
forward calls, generics used at exactly one type. This routine flattens them
back to direct, readable code — same behaviour, fewer hops. Runs daily (once per
app) and on demand via /abstraction-improver.
Over-engineering smells (flatten candidates)
- Single-implementation interface / abstract class with exactly one concrete type and no second on the horizon → inline the concrete type.
- Speculative generality: parameters, hooks, and config that no caller uses; "we might need it" seams with one caller.
- Pass-through layers: wrapper/manager/service/handler classes that only forward to another → collapse the hop.
- Factory/builder for one shape → a plain constructor / literal.
- Premature generics/type-params instantiated at one type → specialize.
- Indirection for its own sake: an event/observer/registry where a direct call would do; config-driven dispatch with one entry.