anti-overengineering
Skill44 starsChanged 6 months agoMITView on GitHub
Anti-overengineering guide based on YAGNI. Use before adding an architectural pattern, during code review, or to challenge an overly complex implementation.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- roronoazoroshao369/vibe-coding-ostheir own version, first seen Nov 15, 2026
- yanzyuyu/min-toktheir own version, first seen Nov 8, 2026
- yueheng-rgb/codex-factorytheir own version, first seen Sep 15, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- yueheng-rgb/codex-factory★ 100same name
- roronoazoroshao369/vibe-coding-os★ 1same name
- yanzyuyu/min-tok★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-creatorSkill
- audit-docsSkill
- auto-reviewSkill
- architectureSkill
- clean-codeSkill
- commitSkill
- create-docSkill
- dddSkill
- discoverySkill
- docs-indexSkill
- e2eSkill
- event-stormingSkill
- implement-featureSkill
- product-managerSkill
- refactor-featureSkill
- refactoring-mikado-stranglerSkill
- review-backSkill
- review-docSkill
- review-followupSkill
- review-frontSkill
- review-fullstackSkill
- securitySkill
- shipSkill
- skill-creatorSkill
- solidSkill
- dashboard-stylingSkill
- tddSkill
- update-docsSkill
- worktreeSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read .claude/roles/architect.md — adopt this profile and follow all its rules.
- Distinctive: line 88
Cross-Entity Invariants: must be maintained
- Distinctive: line 180
"Refactor when it hurts": - Don't prematurely optimize for imaginary future requirements.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Anti Over-Engineering Guidelines
Persona
Read .claude/roles/architect.md — adopt this profile and follow all its rules.
Activation
This skill activates for:
- Challenging a proposed implementation
- Deciding if a DDD/Clean Architecture pattern is justified
- Code review with suspicion of overengineering
- Refactoring toward more simplicity
Core Principle
"The best code is no code" - Solve problems with the minimum viable complexity.
YAGNI (You Aren't Gonna Need It)
↓
Pragmatic Architecture
↓
Progressive EnhancementDDD Pattern Decision Matrix
When to Apply Patterns
| Pattern | ✅ Apply When | ❌ Avoid When |
| Value Object | Complex business rules, invariants to protect | Simple data structures, basic formatting |
| Entity | Identity-based objects with lifecycle | Stateless operations, simple data transfer |
| Aggregate | Complex transactional boundaries | Single entity operations, simple CRUD |
| Service | Stateless business logic, orchestration | Simple transformations, UI-only logic |
| Repository | Complex data access, multiple sources | Simple API calls, single gateway sufficient |
| Use Case | Business workflow orchestration | Single service calls, simple operations |
Overengineering Red Flags
- Creating Value Objects for
{name: string, email: string} - Adding Repository when Gateway suffices
- Using Domain Events for basic state changes
- Creating Aggregates for single-entity operations
- Factory patterns for simple object creation
- Command/Query separation without complex logic
Decision Tree
Before adding any pattern, ask:
1. Does current code fail to solve the problem?
└─ No → Don't add complexity
└─ Yes ↓
2. Is there actual business complexity?
└─ No → Use simpler approach
└─ Yes ↓
3. Will this pattern reduce overall complexity?
└─ No → Find simpler solution
└─ Yes ↓
4. Can you implement in <50 lines?
└─ Yes → Start simple, refactor later
└─ No → Pattern might be justifiedComplexity Thresholds
Apply patterns ONLY IF:
- Business Logic Complexity > Simple CRUD operations
- Multiple Business Rules need coordination
- Cross-Entity Invariants must be maintained
- Complex Validation beyond basic type checking
- Workflow Orchestration involves multiple steps/services
Practical Examples
✅ Good Simplicity
// Simple service - clear responsibility, no premature abstraction
class ReviewActionDispatcher {
constructor(private readonly gateway: ReviewActionGateway) {}
async dispatch(action: ReviewAction, mrId: MergeRequestId): Promise<void> {
if (action.type === 'comment') return this.gateway.postComment(mrId, action.body);
if (action.type === 'resolve') return this.gateway.resolveThread(action.threadId);
}
}❌ Over-Engineering
// Unnecessary strategy hierarchy for two branches
abstract class AbstractReviewActionStrategy {
abstract execute(action: ReviewAction, mrId: MergeRequestId): Promise<void>;
}
class CommentActionStrategy extends AbstractReviewActionStrategy {
// 50+ lines wrapping a single postComment call
}
class ReviewActionStrategyFactory {
createStrategy(type: ReviewActionType): AbstractReviewActionStrategy {
// Complex factory for two simple options
}
}✅ Start Simple, Evolve
// ❌ Over-engineered from start: class-as-value-object with manual validation
class MergeRequestIdValueObject {
constructor(private readonly value: string) {
this.assertValid();
}
private assertValid(): void { /* runtime check */ }
getValue(): string { return this.value; }
}
// ✅ Start simple: branded type (zero runtime cost) + boundary validation
type MergeRequestId = string & { readonly __brand: 'MergeRequestId' };
const isMergeRequestId = (value: string): value is MergeRequestId =>
/^[a-z0-9-]+$/.test(value);Checklist Before Adding a Pattern
- Business Justification: Does business complexity warrant this?
- Team Understanding: Can team easily understand and maintain?
- Testing Impact: Does this make testing easier or harder?
- Future Flexibility: Does this help or hinder future changes?
- Code Ratio: Is business logic > boilerplate code?
When to Refactor
TO patterns:
- Pain points emerge (hard to test, modify, understand)
- Business logic grows beyond simple functions
- Invariants need protection across operations
- Same logic reused in multiple places
AWAY FROM patterns:
- Pattern used only once (no reusability)
- Boilerplate > Business logic
- Testing becomes harder
- Team confusion increases
Remember
"Architecture should scream the domain" - But don't force patterns where simple functions suffice.
"Refactor when it hurts" - Don't prematurely optimize for imaginary future requirements.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

