solid-principles

Guide SOLID design principles with TypeScript examples and code review checklists.

1|Updated Jun 18, 2025
One-click install
npx skills add https://github.com/knopki/dotfiles --skill solid-principles-knopki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-principles
Source: https://github.com/knopki/dotfiles/tree/main/home/private_dot_config/opencode/skills/solid-principles
Command: npx skills add https://github.com/knopki/dotfiles --skill solid-principles-knopki

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers adhere to the SOLID principles of object-oriented design, leading to more maintainable, flexible, and understandable codebases.

Core Features & Use Cases

  • Guidance on SRP, OCP, LSP, ISP, DIP: Provides explanations and TypeScript examples for each principle.
  • Code Review Checklist: Offers questions to ask during code reviews to ensure SOLID compliance.
  • Common Violations: Identifies typical anti-patterns in codebases related to SOLID principles.
  • Use Case: When designing a new module or refactoring existing code, consult this Skill to ensure your implementation follows best practices for extensibility and maintainability.

Quick Start

Review the SOLID principles and their application in TypeScript code.

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 principles in TypeScript code?

To apply SOLID principles in TypeScript, use specific design patterns to ensure single responsibility, open/closed, Liskov substitution, interface segregation, and dependency inversion. This Skill provides explanations and TypeScript examples for each principle to guide your implementation.

What are common violations of SOLID design principles to look for in a code review?

Common violations of SOLID design principles include typical anti-patterns that reduce maintainability and flexibility. This Skill identifies these frequent mistakes and provides a checklist of questions to ask during code reviews to ensure compliance.

When do I need to refactor code using object-oriented design patterns?

You need to refactor code using object-oriented design patterns when your existing implementation lacks extensibility and maintainability. Consulting SOLID principles during module design or refactoring helps ensure codebases remain flexible and understandable.

What is the best way to ensure maintainability and flexibility when designing a new module?

The best way to ensure maintainability and flexibility when designing a new module is to adhere to SOLID principles. Following these object-oriented design guidelines prevents rigid code structures and promotes long-term extensibility.

Does this SOLID principles guidance work for general object-oriented design or only TypeScript?

This SOLID principles guidance addresses general object-oriented design concepts but provides concrete implementation examples in TypeScript. The underlying design patterns and maintainability checklists apply broadly to any object-oriented codebase.