Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Before adding abstraction, asks "do we need this now?" Activates when proposing factories, abstract classes, config-driven behavior, or "for future extensibility." Resists over-engineering. Use when the agent is about to build something more complex than what was asked for.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -24% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 1% | 0% |
AI assistants love elegant abstractions. User asks for a button, the agent builds a component factory with theming support. The problem: abstractions have costs. They obscure intent, add indirection, and often solve problems that never materialize. This skill enforces YAGNI - You Aren't Gonna Need It.
Before adding abstraction, answer honestly:
markdown## Complexity Check **I want to add:** [describe the abstraction] **Because:** [your justification] **Is this solving a problem we have TODAY?** - [ ] Yes, we have 3+ concrete cases now - [ ] No, but we might need it later **If "might need later":** Don't build it. Stop.
Abstract when you have three concrete cases, not before:
| Situation | Action | |-----------|--------| | 1 case | Just write it | | 2 cases | Copy-paste is fine. Note the duplication. | | 3 cases | Now consider abstracting |
// With 1 button: just make the button
<button class="blue">Save</button>
// With 2 buttons: copy-paste is fine
<button class="blue">Save</button>
<button class="red">Delete</button>
// With 3+ buttons: NOW consider a component
<Button color="blue">Save</Button>
<Button color="red">Delete</Button>
<Button color="gray">Cancel</Button>Watch for these phrases in your thinking:
Watch for these patterns:
| Instead of | Try | |------------|-----| | Factory pattern | Direct instantiation | | Abstract base class | Concrete class | | Config-driven behavior | Hardcoded behavior | | Dependency injection | Direct imports | | Custom event system | Callbacks | | Generic utility | Inline code |
Abstraction is warranted when:
When resisting complexity:
markdown## Keeping It Simple **Considered:** [the abstraction] **Rejected because:** [only N cases / speculative / etc.] **Instead:** [simpler approach]
When complexity is warranted:
markdown## Abstraction Justified **Adding:** [the abstraction] **Because:** [3+ cases / causing bugs / stable pattern] **Cases:** [list the concrete cases]
User: "Add a way to send notification emails"
Over-engineered approach:
NotificationFactory
├── EmailNotification
├── SMSNotification (might need later!)
├── PushNotification (could be useful!)
└── NotificationConfig
├── templates
├── retryPolicy
└── queueSettingsYAGNI approach:
pythondef send_notification_email(user, subject, body): email_service.send( to=user.email, subject=subject, body=body )
Why simpler is better:
The 5-line function solves the actual problem. The factory solves imaginary ones.
Other measured skills in the registry, with their headline benchmark lift.