flpbalada/fb-skills/code-architecture-wrong-abstraction
Claude Code and agent skill by flpbalada/fb-skills
- community
Checking that the SKILL.md file is still in the repository.
Decide whether to abstract, duplicate, inline, or split code. Use when creating shared utilities, components, facades, hooks, service wrappers, or DRY/WET refactors; reviewing parameter-heavy helpers, option flags, shallow facades, or premature abstractions. For broad behavior-preserving restructuring use refactoring; for component extraction use decompose.
Install
npx vskill@latest install flpbalada/fb-skills/code-architecture-wrong-abstractionSKILL.md
The same SKILL.md was published earlier as flpbalada/fb-skills/code-architecture-wrong-abstraction.
Avoid Wrong Abstractions
Prefer duplication over wrong abstraction. Wait for real patterns.
Goal
Keep code easy to change. Use abstractions only when they reduce real complexity.
Rules
- Do not abstract before 3 real uses unless there is strong domain reason.
- Similar shape is not enough; behavior must match.
- Prefer clear duplication over parameter-heavy helpers.
- Avoid abstractions that need new flags for every caller.
- Inline bad abstractions before designing new ones.
- Test concrete behavior, not abstraction cleverness.
Abstract When
- Same behavior appears in 3+ places.
- Requirements are stable.
- Callers need the same change together.
- Name and API are obvious.
- Abstraction removes more complexity than it adds.
Do Not Abstract When
- There are only 1-2 uses.
- Requirements are still changing.
- Callers need different behavior.
- API needs many optional parameters.
- Junior developers must learn the wrapper and the underlying tool.
- Manual edits across files would be simpler.
Facade Rule
Use a facade when it hides real complexity or enforces a useful constraint.
Good facade examples:
- Date picker hiding calendar, localization, keyboard, and accessibility logic.
- Button enforcing design system variants.
Skip facades for simple HTML or one-off styling.
Fixing Wrong Abstractions
- Inline the abstraction into each caller.
- Delete unused branches in each caller.
- Keep temporary duplication.
- Compare current use cases.
- Re-extract only stable shared behavior.
Review Questions
- What are the actual callers?
- Do they change for the same reason?
- Which parameters exist only to satisfy one caller?
- Would duplication be clearer?
- Can we delete the abstraction and make code easier?
References
Output
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/code-architecture-wrong-abstraction/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/flpbalada/fb-skills/code-architecture-wrong-abstraction)