solid-principles
Installation
SKILL.md
SOLID Principles Skill
Enforce SOLID design principles across all generated code. Apply these principles alongside existing project skills (design-patterns, service-pattern-nestjs, frontend-code-quality, etc.). SOLID is an additional lens through which to evaluate every piece of code.
When to Use
- When generating new code (services, components, hooks, controllers, repositories).
- When reviewing or refactoring existing code.
- When a code smell suggests a design concern (see quick-reference table below).
Platform-Specific References
SOLID applies differently to OOP-based backends and functional/component-based frontends. Load the appropriate reference based on the code being written:
- Backend (NestJS): Read references/backend.md for class-based patterns — constructor injection, strategy pattern, interface contracts, lean DTOs.
- Frontend (React): Read references/frontend.md for functional patterns — composition, slot props, hook abstractions, context-based DI.
When working on shared packages (e.g. @eridu/api-types), apply the principles from both references as relevant.