solid-principles

Apply SOLID design principles to React and NestJS code during generation, review, and refactoring.

1|Updated Jan 2, 2025
One-click install
npx skills add https://github.com/allenlin90/eridu-services --skill solid-principles-allenlin90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-principles
Source: https://github.com/allenlin90/eridu-services/tree/main/.agent/skills/solid-principles
Command: npx skills add https://github.com/allenlin90/eridu-services --skill solid-principles-allenlin90

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SOLID design principles provide a consistent framework to ensure frontend and backend code remains maintainable, extensible, and correctly structured as systems evolve.

Core Features & Use Cases

  • SRP: keep components, services, and modules focused on a single responsibility.
  • OCP + LSP: enable extension without breaking existing behavior and ensure substitutability across variants.
  • ISP + DIP: minimize coupling and depend on abstractions, with clear interfaces for both frontend hooks and backend services.
  • Platform-specific references guide applying SOLID to NestJS and React code, with targeted checks during generation, review, and refactor.

Quick Start

Apply SOLID principles to a selected backend or frontend artifact by reviewing its SRP, OCP, LSP, ISP, and DIP alignment against the platform guidelines and refactoring as needed.

Frequently Asked Questions about solid-principles

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

FAQPage Schema
How do I apply SOLID design principles to React components and hooks?

To apply SOLID design to React, ensure components and hooks maintain a single responsibility and depend on clear abstractions. This Skill provides targeted checklists to refactor frontend artifacts for cohesion and extensibility.

What is the best way to refactor a NestJS service to follow SOLID architecture?

Refactoring a NestJS service for SOLID architecture involves minimizing coupling by depending on abstractions and keeping modules focused. Use platform-specific references to review and restructure backend controllers and services.

Can I use SOLID principles to improve TypeScript code during generation and review?

Yes, you can use SOLID principles during TypeScript code generation and review to ensure cohesive, extensible designs. This Skill aligns SRP, OCP, LSP, ISP, and DIP checks against platform guidelines for both frontend and backend.

How does ISP and DIP minimize coupling in frontend and backend modules?

ISP and DIP minimize coupling by enforcing clear interfaces for frontend hooks and backend services, ensuring modules depend on abstractions rather than concrete implementations. This approach keeps systems extensible and maintainable as they evolve.

When should I refactor code to enforce OCP and LSP substitutability across variants?

You should refactor to enforce OCP and LSP when you need to enable extension without breaking existing behavior and ensure substitutability across component or service variants. This prevents regressions when systems scale.