---
name: applying-solid-principles
description: This skill should be used when implementing code that requires SOLID principles and clean code practices. It provides detailed guidance on Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles with comparison examples in TypeScript.
---

# SOLID Principles and Clean Code - File Contents

This document is a mandatory guide to SOLID principles and clean code practices for all code implementations.

## Main Components

This skill is made up of four detailed documents:

1. **SOLID Principles in Detail** - Explanation and comparison examples for the five design principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion). See @SOLID-PRINCIPLES.md.

2. **Clean Code Basics** - Fundamentals for everyday implementation: naming conventions, function design, reducing nesting, and eliminating magic numbers. See @CLEAN-CODE-BASICS.md.

3. **Quality Checklist** - Criteria for confirming adherence to design principles, detecting code smells, and deciding when to refactor. See @QUALITY-CHECKLIST.md.

4. **Quick Reference** - One-line summaries for rapid lookup, common mistakes and fixes, and code review points. See @QUICK-REFERENCE.md.

## The Five SOLID Principles

The documentation systematically explains the patterns that underpin extensibility and maintainability, starting with the Single Responsibility rule that "there should be only one reason to change."

## Related Supplementary Principles

The additional principles referenced — DRY, YAGNI, and KISS — also provide frameworks that increase the effectiveness of your design.
