solid-reviewlisted
Install: claude install-skill GuerthCastro/claude-skills-dotnet
# SOLID Review
Author: Guerth Castro (github.com/GuerthCastro). Licensed under MIT.
## Review process
When code is provided for review:
1. Identify the language and layer (C# domain entity, application handler, Angular service,
React component, and so on).
2. Evaluate each of the five principles independently.
3. Produce a structured report using the format below.
4. Rank violations by severity: Critical (breaks architecture) over Major (degrades
maintainability) over Minor (style preference).
5. Provide a concrete refactored version for every Critical or Major violation.
Do not pad the report. If a principle is genuinely satisfied, say PASS and move on.
## The five principles
### S: Single Responsibility Principle
One class, one reason to change.
Violations to look for:
- A class does both data access and business logic.
- A service sends emails, validates data, and writes to the database.
- A component fetches data, formats it, and manages UI state.
- A handler orchestrates several unrelated operations.
- God classes with ten or more methods spanning multiple domains.
**VIOLATION.** `OrderService` validates, persists, and notifies. The notification call is the one
that does not belong.
```csharp
public class OrderService(IOrderRepository repository, IEmailService email)
{
public async Task<bool> AddItem(long orderId, long productId)
{
Order order = await repository.GetById(orderId);
if (order.ItemCount >= order.MaxItems)
{