agentleFS
JeremyMorganJeremyMorgan/code-review-skills/skills/solid-principles/SKILL.md

solid-principles

Skill15 starsChanged 5 months agoCC0-1.0View on GitHub

Audits code for adherence to the five SOLID principles and reports violations with concrete fixes. Use when reviewing class design, dependency structure, or object-oriented quality.

We split this skill into the rules it gives an agent

8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no target path is given above, review the entire codebase.

    line 14
  2. Distinctive:

    Check for if/else chains that could be strategy pattern

    line 31
  3. Distinctive:

    Do derived classes properly extend base classes?

    line 34
  4. Distinctive:

    Do clients depend on methods they don't use?

    line 39
  5. Distinctive:

    Check for 'new' keyword usage vs injection

    line 44
  6. Distinctive:

    Prefer minimal, drop-in fix snippets over prose.

    line 60
  7. Distinctive:

    Do not invent files or functions that aren’t present.

    line 62
  8. Distinctive:

    Write this into a markdown file and place it in the audits/ folder.

    line 64

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Target: $ARGUMENTS

If no target path is given above, review the entire codebase.


Evaluate this application and its adherence to SOLID principles:

Check each principle:

  1. SINGLE RESPONSIBILITY (SRP)
    • Does each module have one reason to change?
    • Identify modules violating SRP
    • Example: UserController handling emails, payments, and auth
  2. OPEN/CLOSED PRINCIPLE
    • Can we extend without modifying?
    • Are there hardcoded switch statements that should be polymorphic?
    • Check for if/else chains that could be strategy pattern
  3. LISKOV SUBSTITUTION
    • Do derived classes properly extend base classes?
    • Any violations of expected behavior?
  4. INTERFACE SEGREGATION
    • Are interfaces too large?
    • Do clients depend on methods they don't use?
  5. DEPENDENCY INVERSION
    • Are we depending on abstractions or concretions?
    • Is there proper dependency injection?
    • Check for 'new' keyword usage vs injection

Rate SOLID compliance (1-10) with specific violations and fixes.

Provide:

A structured finding report

A scale of 1/10 on how important each finding is

Remediation: precise code-level fix or config change (snippets welcome) if possible

Constraints & style:

Be concrete and cite exact code locations and identifiers.

Prefer minimal, drop-in fix snippets over prose.

Do not invent files or functions that aren’t present; if context is missing, mark as Unable to verify and say what code would prove it.

Write this into a markdown file and place it in the audits/ folder.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.