interface-segregation-principle
CommunitySplit interfaces to keep clients lean and safe.
Authoryanko-belov
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Clients should not be forced to depend on interfaces they don't use. A fat interface forces implementers to provide methods that are irrelevant, leading to brittle code, throw/no-op workarounds, and hidden capabilities. ISP promotes smaller, cohesive interfaces that map to actual needs.
Core Features & Use Cases
- Segregated interfaces: Create focused contracts like Printer, Scanner, Fax.
- Avoids throw/no-op: Implement only what you can deliver.
- Improves maintainability and testability across API design and refactoring.
Quick Start
- Identify a fat interface in your codebase.
- Split it into focused interfaces reflecting cohesive capabilities.
- Update implementations to depend only on the interfaces they need and remove unused methods.
Dependency Matrix
Required Modules
None requiredComponents
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: interface-segregation-principle Download link: https://github.com/yanko-belov/code-craft/archive/main.zip#interface-segregation-principle 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.