open-closed-principle
✓Use when adding new functionality to existing code. Use when tempted to add if/else or switch branches. Use when extending behavior of existing classes.
Installation
SKILL.md
Software entities should be open for extension, but closed for modification.
When new functionality is needed, extend the system with new code rather than modifying existing code. If adding a feature requires changing existing if/else chains, you're violating OCP.
Noting the problem while doing it anyway is still a violation.
Use when adding new functionality to existing code. Use when tempted to add if/else or switch branches. Use when extending behavior of existing classes. Source: yanko-belov/code-craft.
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/yanko-belov/code-craft --skill open-closed-principle- Source
- yanko-belov/code-craft
- Category
- </>Dev Tools
- Verified
- ✓
- First Seen
- 2026-02-12
- Updated
- 2026-02-18
Quick answers
What is open-closed-principle?
Use when adding new functionality to existing code. Use when tempted to add if/else or switch branches. Use when extending behavior of existing classes. Source: yanko-belov/code-craft.
How do I install open-closed-principle?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/yanko-belov/code-craft --skill open-closed-principle Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/yanko-belov/code-craft
Details
- Category
- </>Dev Tools
- Source
- skills.sh
- First Seen
- 2026-02-12