solid-principles

Enforce SOLID design principles across code modules with five gating phases.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/AymanKastali/pydentity --skill solid-principles-aymankastali
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-principles
Source: https://github.com/AymanKastali/pydentity/tree/main/.claude/skills/solid-principles
Command: npx skills add https://github.com/AymanKastali/pydentity --skill solid-principles-aymankastali

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SOLID principles govern software design to keep systems maintainable, extensible, and robust by ensuring responsibilities are well separated and dependencies are abstracted. This skill provides a structured, phased approach to apply SRP, OCP, LSP, ISP, and DIP across new or existing modules.

Core Features & Use Cases

  • Enforced five-phase gates (SRP, OCP, LSP, ISP, DIP) to guide design decisions and refactoring.
  • Clear gate checks that verify single responsibility, appropriate extension points, substitutability, properly split interfaces, and directed dependencies.
  • Use cases include reviewing a class design, decomposing a god class, and iterating toward a plug-in extension-friendly architecture.

Quick Start

Review a candidate class and walk through the five SOLID gates to validate its design.

Frequently Asked Questions about solid-principles

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce SOLID design principles during code refactoring?

To enforce SOLID design principles during refactoring, walk a candidate class through five sequential gating phases (SRP, OCP, LSP, ISP, DIP) that verify single responsibility, extension points, substitutability, interface segregation, and dependency direction to prevent architectural drift.

What is the best way to decompose a god class into maintainable modules?

Decomposing a god class requires applying the single responsibility gate to identify overlapping duties, then iterating through the remaining SOLID gates to split responsibilities, abstract dependencies, and establish a cohesive, plug-in extension-friendly architecture.

How does the LSP gating phase check substitutability in class design?

The LSP gating phase checks substitutability by verifying that derived classes can replace their base types without altering program correctness, ensuring behavioral consistency and preventing architectural drift during design reviews.

Can I use these SOLID gating phases to review existing code modules?

Yes, you can use the phased SOLID gating approach to review existing code modules by applying each gate check to validate single responsibility, appropriate extension points, and directed dependencies, ensuring current systems remain maintainable and extensible.

When do I need to apply interface segregation to prevent architectural drift?

You need to apply interface segregation when clients are forced to depend on methods they do not use, using the ISP gate to split bloated interfaces into cohesive, client-specific contracts during design reviews and refactoring.

Why does dependency inversion matter for plug-in extension-friendly architecture?

Dependency inversion matters for plug-in architectures because the DIP gate directs high-level modules to depend on abstractions rather than concrete implementations, enabling flexible extensions and preventing tightly coupled architectural drift.