avoid-hasty-abstractions
Installation
SKILL.md
Avoid Hasty Abstractions (AHA)
Duplication is cheap. The wrong abstraction is expensive — it infects every caller with parameters, flags, and conditionals that grow forever.
"Prefer duplication over the wrong abstraction." — Sandi Metz
The Core Rule
- 2 occurrences: leave them duplicated.
- 3 occurrences: consider extracting — only if the shape is obvious and the name is clean.
- Can't name it cleanly? It's not an abstraction yet. Leave it duplicated.
- Extracting requires a flag/mode/boolean? Wrong abstraction. Inline it back.