code-architecture-wrong-abstraction
CommunityAvoid premature abstraction.
Software Engineering#refactoring#software design#DRY#abstraction#facade pattern#code duplication#WET
Authordavidsteinberger
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps developers make better decisions about when to abstract code versus when to duplicate it, preventing the creation of overly complex and hard-to-maintain codebases due to premature or incorrect abstractions.
Core Features & Use Cases
- Guidance on Abstraction: Provides clear rules and principles for deciding when to abstract code, emphasizing the "Rule of Three" and the dangers of hasty abstractions.
- Identifying Wrong Abstractions: Illustrates common patterns of how wrong abstractions evolve and offers strategies for fixing them by inlining and re-extracting.
- Facade Pattern Analysis: Explains the appropriate use and pitfalls of the Facade pattern, particularly in UI components.
- Use Case: When refactoring a codebase, you encounter a piece of logic that appears in two places. This Skill guides you to wait for a third occurrence before considering an abstraction, thus avoiding a potentially wrong abstraction.
Quick Start
Use the code-architecture-wrong-abstraction skill to understand when to abstract code versus when to duplicate it.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: code-architecture-wrong-abstraction Download link: https://github.com/davidsteinberger/dotfiles/archive/main.zip#code-architecture-wrong-abstraction Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.