About solid-principles
solid-principles is a coding skill that applies the five SOLID principles and information hiding to code organization. It also encourages focused modules and treats keeping files under 200 lines as a goal rather than a strict rule.
Key features
- 01Apply the five SOLID principles
- 02Improve information hiding
- 03Organize logic into focused modules
- 04Treat 200 lines as a file-size goal
Use cases
- 01Reviewing class responsibilities and dependencies
- 02Breaking extensive logic into smaller files
- 03Assessing interfaces and module boundaries
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ gkwa/ volcanicviper --skill solid-principlesAfter installing, type/solid-principlesin Claude Code to confirm it loaded.
Bundled filestile.json
Details
From the project READMEFollow 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?