solid-principles

Detect SOLID principle violations in C# code and recommend concrete refactorings.

4|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill solid-principles-faysilalshareef
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-principles
Source: https://github.com/FaysilAlshareef/dotnet-ai-kit/tree/main/skills/core/solid-principles
Command: npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill solid-principles-faysilalshareef

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps teams and developers identify and fix violations of SOLID principles in C# code so systems remain modular, testable, and easy to evolve instead of becoming brittle or entangled.

Core Features & Use Cases

  • Guided Evaluations: Explain SRP, OCP, LSP, ISP, and DIP violations in concrete terms and point to the smallest, safest refactors.
  • Practical Patterns: Recommend patterns such as strategy extraction, focused interfaces, and constructor injection with examples and when to avoid over-abstraction.
  • Use Case: Run during code reviews or when adding features to services, handlers, repositories, or domain models to produce prioritized, low-risk refactor steps.

Quick Start

Ask the AI to analyze the provided C# class or handler for SOLID violations and return prioritized, actionable refactor steps.

Frequently Asked Questions about solid-principles

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

FAQPage Schema
How do I find SOLID principle violations in C# code?

To find SOLID principle violations in C# code, submit your services, handlers, repositories, or domain models for analysis. The system detects SRP, OCP, LSP, ISP, and DIP issues and explains them in concrete terms during code reviews or feature development.

What is the best way to refactor C# code that breaks the Single Responsibility Principle?

The best way to refactor C# code breaking the Single Responsibility Principle is to split responsibilities within services or handlers. The analysis identifies SRP violations and recommends the smallest, safest refactor steps to keep systems modular and easy to evolve.

How do I fix Open Closed Principle violations using design patterns in C#?

Fix Open Closed Principle violations in C# by introducing strategy pattern extraction or interface extraction. The analysis identifies OCP issues in your codebase and recommends concrete design patterns with examples while advising when to avoid over-abstraction.

Can I use constructor injection to resolve Dependency Inversion Principle issues in domain models?

Yes, you can use constructor injection to resolve Dependency Inversion Principle issues in domain models. The analysis identifies DIP violations and suggests constructor injection specifically to create testing seams, ensuring your C# systems remain modular and testable.

Does this analysis support identifying Interface Segregation Principle issues in C# repositories?

Yes, this analysis supports identifying Interface Segregation Principle issues in C# repositories. It detects ISP violations and recommends focused interfaces to ensure your code remains maintainable, preventing the creation of bloated, entangled interface implementations.