open-closed-principle

Community

Extend behavior without touching existing code.

Authoryanko-belov
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps developers avoid modifying working code when adding new features, preventing regression and churn by promoting design that is open for extension but closed for modification.

Core Features & Use Cases

  • Promotes safe extensions by guiding the extraction of interfaces and creation of new variants instead of altering existing branches.
  • Prevents feature drift by encouraging a strategy or plugin pattern that keeps core logic intact.
  • Use Case: When adding a new notification channel, implement a new class that conforms to an existing interface rather than adding an else/if branch.

Quick Start

Refactor a branching conditional into a strategy-based design and register the new variant without modifying the existing code paths.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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: open-closed-principle
Download link: https://github.com/yanko-belov/code-craft/archive/main.zip#open-closed-principle

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.