solid-principles
Installation
SKILL.md
Follow SOLID design principles and maintain good information hiding:
- Single Responsibility Principle (SRP): A class should have only one reason to change.
- Open-Closed Principle (OCP): Open for extension, closed for modification.
- Liskov Substitution Principle (LSP): Subclass objects should be substitutable for superclass objects.
- Interface Segregation Principle (ISP): Many client-specific interfaces are better than one general-purpose interface.
- Dependency Inversion Principle (DIP): High-level modules should not depend on low-level modules — both should depend on abstractions.
Individual code files should strive to stay under 200 lines. This is a goal, not a strict limit — justified outliers are fine.
Decompose extensive logic into multiple discrete files rather than accumulating lines in a single file. This promotes information hiding and keeps modules focused and comprehensible.
When writing code, consider:
- Does it adhere to SOLID principles? If not, which principles are being violated?
- Is the code organized into small, focused units?
- Are there areas where information hiding could be improved?