Agent skill · software engineering · aiskillstore

solid-principles

SOLID object-oriented design principles for maintainable code

Why this skill is useful

Codifies design principles that improve code maintainability, which the AI could infer but now has explicit guidelines.

What it needs

About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

SOLID Principles Five principles for object-oriented design that lead to maintainable, extensible software. S - Single Responsibility Principle A class should have only one reason to change. When to apply: If you describe a class with "and" (UserService creates users AND sends emails AND...), split it. O - Open/Closed Principle Open for extension, closed for modification. When to apply: When adding new features requires modifying existing, tested code. L - Liskov Substitution Principle Subtypes must be substitutable for their base types. When to apply: If subclass overrides change behavior that callers depend on. I - Interface Segregation Principle Clients should not depend on interfaces they don't use. When to apply: When classes implement methods they don't need, or throw "not implemented" errors. D - Dependency Inversion Principle Depend on abstractions, not concretions. When to apply: When testing is hard, or changing one module breaks others. SOLID in Practice Recognizing Violations Principle Code Smell ----------- ------------ SRP Class has many unrelated methods OCP Adding feature requires modifying existing code LSP Subclass throws "not supported" or behaves differently ISP Class implements methods it doesn't use DIP new keyword scattered throughout business logic Applying SOLID 1. Start simple - Don't over-engineer from day one 2. Refactor when needed - Apply when you feel the pain 3. Use dependency injection - Makes DIP natural 4. Prefer composition - Over inheritance (helps LSP) 5. Write small interfaces - Easier than splitting later Balance SOLID is a guide, not law. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/solid-principles

View the source on GitHub

Browse the @skills marketplace