convention-solid-lsp

Community

Preserve base contracts with LSP-compliant subtypes.

AuthorsunLeee
Version1.0.0
Installs0

System Documentation

What problem does it solve?

LSP requires that subtypes can replace base types without altering the correctness or behavior of consuming code. Violations occur when derived classes loosen or strengthen contracts, causing contract drift and runtime errors.

Core Features & Use Cases

  • Enforces contract preservation across inheritance hierarchies to maintain substitutability.
  • Provides guidance for safe extension using explicit interfaces, wrappers, and stable return contracts.
  • Use Case: refactor a base processor and a subclass so substituting the subclass does not require changes in client code.

Quick Start

Refactor a sample inheritance hierarchy to satisfy LSP safely and provide before/after code snippets.

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: convention-solid-lsp
Download link: https://github.com/sunLeee/optimization/archive/main.zip#convention-solid-lsp

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.