Solid review checklist
Skill Sarmkadan/dotnet-senior-skills/skills/solid-review-checklist
Senior-level .NET review rules for AI coding agents - Claude Code skills, Cursor rules, and Copilot instructions from one source
npx -y skills add Sarmkadan/dotnet-senior-skills --skill solid-review-checklistAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 26 days oldThe repository was created 26 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Apply SOLID principles concretely to C# code review - real smells, thresholds, and refactors rather than abstract definitions. Use when reviewing class design, service structure, or interface changes in C#.
SKILL.md
4.2 KB, 866 tokens by cl100k_base, as published. Nobody here has run it
SOLID Review Checklist (C#, applied)
SOLID violations are found in diffs, not definitions. Review with these concrete triggers.
Single Responsibility
Trigger questions: how many reasons does this class change for, and who asks for each change? Concrete smells:
- Constructor takes 6+ dependencies. That is 6 collaborators' worth of reasons to change; split the use cases.
- Method groups with disjoint dependency usage: if
ImportUsersuses_csvand_repo, whileSendDigestuses_emailand_clock, you have two classes cohabiting. - Names containing
Manager,Helper,Util,Processorplus a 500-line body. The name is vague because the responsibility is.
Do not over-apply: a class with three methods around one aggregate is fine. SRP violations are proven by change history (this file appears in every PR), not by line count alone.
Open/Closed
The practical form: adding a new case should not require editing a switch that already shipped. Trigger: the same switch (type) appears in 2+ places.
// SMELL: every new export format edits this switch and its twin in ValidateFormat
public byte[] Export(string format) => format switch
{
"csv" => ExportCsv(), "xlsx" => ExportXlsx(), _ => throw new NotSupportedException()
};
// REFACTOR: strategy resolved from DI
public interface IExporter { string Format { get; } byte[] Export(ReportData d); }
// registration: services.AddSingleton<IExporter, CsvExporter>(); ... resolve IEnumerable<IExporter>
One switch in one place is fine - it IS the extension point. Extract only on the second occurrence. Do not pre-build plugin architectures for cases that never had a second implementation.
Liskov Substitution
C#-specific violations to reject:
- Overrides throwing
NotSupportedExceptionorNotImplementedException: the type does not honor the contract; split the interface or fix the hierarchy. (ReadOnlyCollection.Addis the cautionary tale, not a license.) - Override that strengthens preconditions: base accepts null/empty, derived throws. Callers coded against the base break.
if (x is SpecificDerived d)in code that receives the base type - the hierarchy has failed and callers are re-dispatching manually. Push the varying behavior into the type.- Async contract narrowing: base method is truly async, override returns
Task.FromResultafter blocking work, or vice versa - behavioral surprise under load counts as a substitution failure.
Interface Segregation
- An interface with 10+ members where implementations throw or no-op half of them: split by consumer. The consumer defines the interface shape, not the implementer.
- Test doubles are the detector: if every test mocks the same 2 of 12 methods, those 2 are the real interface.
- One-interface-per-class-by-reflex (
IUserServicewith exactly one implementation, extracted only for mocking) is not ISP - it is acceptable ceremony at the application boundary, noise everywhere else. Do not demand interfaces for classes with no second implementation and no test seam need.
Dependency Inversion
- High-level policy referencing concrete infrastructure: an
OrderServiceconstructingSmtpClientorHttpClientinline. Depend onIEmailSenderdefined in the application layer, implemented in infrastructure. - The interface lives with the CONSUMER (application layer), not next to its implementation in the infrastructure project - otherwise the dependency arrow still points the wrong way.
newon anything with I/O, time, randomness, or configuration inside business logic: inject it (TimeProviderinstead ofDateTime.UtcNowwhere testability matters).- DIP does not mean "interface everything":
List<T>, DTOs, pure functions, and framework types need no abstraction. Abstract at volatility boundaries: I/O, third-party services, things you will swap or fake.
Review verdict guidance
Flag a SOLID issue only with the concrete cost attached: "this switch is duplicated in X and Y, next format touches both" - not "violates OCP". If you cannot name the cost, it is not a finding.
Gives 0 of the 12 instructions most code review skills give in 866 tokens
Counted across 610 of the 674 authors here whose files we hold, read 2026-08-06
- push back with technical reasoning if wrongin 60 of 610, across 24 files
- ask for clarification on unclear itemsin 51 of 610, across 16 files
- fix critical issues immediatelyin 45 of 610, across 29 files
- implement one item at a timein 45 of 610, across 11 files
- group findings by severityin 44 of 610, across 43 files
- verify feedback against the codebasein 42 of 610, across 8 files
- dispatch a code reviewer subagentin 39 of 610, across 23 files
- fix important issues before proceedingin 37 of 610, across 22 files
- test each fix individuallyin 35 of 610, across 7 files
- reply in github comment threadsin 33 of 610, across 5 files
- check for security vulnerabilitiesin 31 of 610, across 27 files
- factualize corrections without over-explainingin 30 of 610, across 2 files
Said here and by no other author read
- review diffs not definitions
- split classes with 6+ constructor dependencies
- split classes with disjoint dependency usage
- extract duplicated switches into strategy pattern
- reject overrides throwing NotSupportedException
- split interfaces throwing or no-oping half their members
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.