/codeprobe:codeprobe-solidfrom codeprobe
Audits code for SOLID principle violations (SRP, OCP, LSP, ISP, DIP). Identifies problematic classes and methods, generates fix prompts. Trigger phrases: SOLID check, solid review, SRP violation, dependency inversion.
Ships in codeprobe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
If invoked directly (not via the orchestrator), you must first:
../codeprobe/shared-preamble.md (resolve relative to this SKILL.md's location — the sibling codeprobe skill directory — not the user's project) for the output contract, execution modes, and constraints.../codeprobe/references/ (same resolution) based on the project's tech stack.full mode unless the user specifies otherwise.This sub-skill detects violations of the five SOLID principles:
| ID Prefix | Signal | How to Detect | Severity |
|---|---|---|---|
SRP | Class has 5+ public methods doing unrelated things | Count public methods. If 5+ exist, check whether they cluster around a single responsibility or span multiple concerns (e.g., authentication + email + database). Look for method name prefixes that suggest different domains. | Major |
SRP | Method exceeds 30 LOC doing multiple concerns | Count lines in each method (excluding blank lines and comments). If > 30 LOC, check whether the method handles multiple distinct steps (validation, transformation, persistence, notification) that could be extracted. | Minor |
SRP | Class name is vague | Flag classes named Manager, Handler, Utils, Helper, Processor, Service (when not domain-qualified) — these names suggest the class has no clear single purpose. Exception: if the class is small (< 5 methods, < 100 LOC), downgrade to suggestion. | Minor |
SRP | Constructor takes 5+ dependencies | Count constructor parameters or injected dependencies. 5+ dependencies suggest the class has too many responsibilities. Check whether dependencies serve different domains. | Major |
| ID Prefix | Signal | How to Detect | Severity |
|---|---|---|---|
OCP | Switch/if-else chains on type or status | Look for switch/if-else chains that branch on a type, status, role, or kind field — especially where adding a new variant requires modifying this block. Count the number of cases: 3+ cases on a growable type is a signal. | Major |
OCP | No extension point where variants are likely to grow | When a switch/if-else on type is found, check whether there is an interface, abstract class, strategy pattern, or plugin mechanism that would allow adding new variants without modifying the existing code. If absent, flag it. | Minor |
| ID Prefix | Signal | How to Detect | Severity |
|---|---|---|---|
LSP | Subclass overrides method but changes semantics | Check overridden methods: does the subclass return a fundamentally different type, change the meaning of the return value, or produce side effects the parent does not? Compare method signatures and doc comments. | Major |
LSP | Subclass throws exception parent doesn't declare | Look for overridden methods that throw exceptions not present in the parent's throws clause or documented contract. In dynamic languages, look for raise/throw in overrides where the parent method doesn't throw. | Major |
LSP | Subclass ignores or no-ops parent behavior | Look for overridden methods with empty bodies, pass, return null, return, or // not implemented comments. The subclass is refusing the parent's contract. | Minor |
LSP | instanceof/type checks after polymorphic call | Search for instanceof, is_a, typeof, type(), is checks on objects that should be used polymorphically. If code calls a method on a base type and then checks the concrete type, it signals broken substitutability. | Major |
| ID Prefix | Signal | How to Detect | Severity |
|---|---|---|---|
ISP | Interface has 8+ methods | Count methods declared in each interface/abstract class/protocol. If 8+, the interface is likely too broad. Check whether the methods cluster into distinct groups. | Minor |
ISP | Class implements interface but leaves methods empty or throwing | Look for interface implementations where one or more methods are empty, return null, throw NotImplementedError/UnsupportedOperationException, or contain only pass/TODO comments. | Major |
ISP | Multiple unrelated method groups in one interface | Analyze the interface's methods: do they fall into 2+ distinct responsibility groups (e.g., read operations + write operations + notification methods)? If so, the interface should be split. | Major |
| ID Prefix | Signal | How to Detect | Severity |
|---|---|---|---|
DIP | new ConcreteClass() inside business logic | Search for direct instantiation (new ClassName(), direct constructor calls) of infrastructure or service classes inside business logic methods. Exclude: DTOs, value objects, exceptions, collections, factories, and DI container registrations. | Major |
DIP | High-level module imports from infrastructure layer directly | Check import statements: does a domain/business logic module import directly from database drivers, HTTP clients, file system libraries, or third-party SDKs without an abstraction layer? Look for patterns like import mysql, use Illuminate\Support\Facades\DB, from requests import. | Major |
DIP | No constructor injection — static method calls to concrete dependencies | Look for static method calls like Database::query(), Cache::get(), Logger.log() in business logic where no interface is injected. The class is tightly coupled to the concrete implementation via static access. | Minor |
SRP- — Single Responsibility Principle violationsOCP- — Open/Closed Principle violationsLSP- — Liskov Substitution Principle violationsISP- — Interface Segregation Principle violationsDIP- — Dependency Inversion Principle violationsNumber findings sequentially within each prefix: SRP-001, SRP-002, OCP-001, etc.
src/OrderService.php: extract payment logic (lines 45-78) into a new PaymentService class. Inject PaymentService via constructor into OrderService. Move methods calculateTotal(), applyDiscount(), and processPayment() to the new class."$type in NotificationSender (lines 30-65) with a Strategy pattern: create a NotificationChannel interface with a send(Message $message) method. Create EmailChannel, SmsChannel, and PushChannel implementations. Use a NotificationChannelFactory to resolve the correct channel by type."UserRepository.php, replace new MySqlConnection() at line 23 with constructor injection: add a DatabaseConnectionInterface $connection parameter to the constructor and use it instead of the concrete instantiation."What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub machineroom-dev/codeprobe --plugin codeprobe10 skills in this plugin
/codeprobeWhole-codebase code quality audit system with 9 specialized sub-skills covering security, SOLID principles, architecture, error handling, performance, test quality, code smells, design patterns, and framework best practices. Produces a scored health dashboard (0-100 per category), severity-rated findings (P0-P3) with severity rationales, and copy-pasteable fix prompts; also does PR-style diff review vs a base branch. Strictly read-only — never modifies user code. Use when the user says "codeprobe", "audit", "full code review", "code health", "check my code", "security scan", "code smells", "SOLID check", or asks how healthy, risky, or maintainable a codebase is. (For reviewing just the working diff, the built-in /code-review may be more appropriate unless the user asks for codeprobe.)
/codeprobe-architectureAnalyzes code architecture and structure — layer violations, circular dependencies, god objects, anemic domain models, missing boundaries, directory structure issues, and configuration problems. Generates severity-scored findings with fix prompts. Trigger phrases: "architecture review", "structure check", "layer analysis", "god class".
/codeprobe-code-smellsDetects code smells and anti-patterns — long methods, large classes, feature envy, data clumps, primitive obsession, dead code, magic numbers, deep nesting, and more. Uses configurable thresholds from .codeprobe-config.json when available. Trigger phrases: "code smells", "smell check", "anti-patterns", "clean code review".
Other plugins' skills for the same job