liskov-substitution-principle
CommunityHonor parent contracts, prevent LSP violations.
Software Engineering#interfaces#inheritance#composition#lsp#design-principles#liskov-substitution#substitutability
Authoryanko-belov
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps engineers ensure that subclasses can replace parent types without altering program behavior, preventing Liskov Substitution Principle violations.
Core Features & Use Cases
- Contract-aware inheritance: Guides when to use inheritance or switch to interfaces and composition.
- Override discipline: Flags throwing or no-op overrides that break substitutability.
- Design best practices: Recommends separating capabilities via interfaces to maintain correct behavior across hierarchies.
- Use Case: When refactoring a class hierarchy, apply this skill to validate that all subclasses uphold the parent's contracts and invariants.
Quick Start
Review your current class hierarchy to ensure all overrides preserve contracts and avoid throwing exceptions.
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: liskov-substitution-principle Download link: https://github.com/yanko-belov/code-craft/archive/main.zip#liskov-substitution-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.