Solid Liskov Substitution

Subclasses must honor the contract of their parent class Use when designing system architecture. Architecture category skill.

majiayu000 Updated 567 repo stars

File contents

SOLID - Liskov Substitution

Subclasses must honor the contract of their parent class. Don't override methods to throw "not implemented" exceptions. If a subclass can't fulfill the parent's behavior, the inheritance hierarchy is wrong—consider composition instead. Preconditions can't be strengthened; postconditions can't be weakened. Violating LSP leads to fragile code with instanceof checks.

majiayu000/claude-skill-registry-data/tree/main/development/solid-liskov-substitution-omniaffix-dave-sessionguardian commit dda8e2bff3

Frequently asked questions

npx skillmds@latest add majiayu000/solid-liskov-substitution