solid

Audit Java, C#, and JavaScript code against the five SOLID principles with evidence-ranked findings and patches.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/david181222/Paragon --skill solid-david181222
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid
Source: https://github.com/david181222/Paragon/tree/main/.claude/skills/solid
Command: npx skills add https://github.com/david181222/Paragon --skill solid-david181222

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Object-oriented design reviews are usually vague: opinions about inheritance, god classes, and fat interfaces without proof. This Skill audits Java, C#, and JavaScript code against all five SOLID principles using a contract-level protocol, producing severity-ranked findings with file:line evidence, blast-radius estimates, concrete patches, and executable substitution tests that fail on the current code and pass on the fix. ## Core Features & Use Cases - Contract-level LSP analysis: Reconstructs preconditions, postconditions, and invariants from signatures, tests, and caller behavior, then checks every subtype against the R1–R10 requirement set, including async-over-sync overrides, C# new member hiding, and accidental Java overloads. - Four triage modes with output caps: SPOT (one design question), HIERARCHY (one class tree), DIFF (pull request review including untouched supertypes), and REPO (full audit with measured debt metrics and a self-verification pass). - Prescription catalog with migration sequencing: Maps each violation to a concrete refactor (role interfaces, delegation, composition vs. aggregation, strategy, decorator) ordered so every step compiles and is independently revertible. - Use Case: A reviewer asks whether a ReadOnlyStorage : FileStorage hierarchy is safe. The Skill detects the new-hidden no-op Save method, rates it CRITICAL with the 7 affected call sites, prescribes an ISP split into readable/writable role interfaces, and generates an xUnit substitution test proving the defect. ## Quick Start Ask the assistant to audit a class hierarchy, file, pull request, or repository for SOLID violations, for example by requesting a SOLID review of your pricing module's inheritance structure.

Frequently Asked Questions about solid

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

FAQPage Schema
How do I check if my code violates SOLID principles?

Point the audit at a file, hierarchy, pull request, or repository and it runs a phased protocol: reconnaissance, an automated smell scan, per-principle analysis, and contract inference. Every finding includes file:line evidence, a concrete failure mode, blast radius, and a patch.

How to detect Liskov substitution violations in JavaScript?

The highest-yield check is searching for async overrides of synchronous base methods, which silently return Promises where callers expect values. The audit also checks arity mismatches, shape narrowing on parameters, and derives the substitution surface from call sites since JavaScript declares no interfaces.

Does the audit support C# and Java specifically?

Yes, scope is deliberately limited to Java, C#, and JavaScript because each language's compiler enforces different parts of the contract. It catches C# `new` member hiding and static `==` resolution, Java accidental overloads from missing `@Override`, and JavaScript prototype and frozen-object issues.

When should I use composition instead of inheritance?

Use composition when a subtype reuses base code but is not base behavior, adds value-carrying fields to an equality-bearing base, or changes the mutability contract. The refactorings reference includes a decision tree and a composition-versus-aggregation table to pick the correct relation.

What happens if the codebase has no tests?

An evidence guardrail applies: without a test suite for the base types, all contract items are marked inferred with low confidence, and structural refactors are not prescribed. The audit recommends characterization tests first to pin down current behavior before any redesign.

Can it review a pull request for design regressions?

Yes, DIFF mode audits only the changed surface plus the supertypes and subtypes of changed types, since editing a base class alone can introduce LSP violations. Output is capped at one page covering only findings introduced by that diff.