SOLID design auditor and fixer for Claude Code.
Review your changed files for SOLID design principle violations and apply targeted, behavior-preserving fixes — without leaving your Claude Code session.
Open claude cli and run the below commands to install
# Add the muthuspark/solid-audit marketplace
/plugin marketplace add muthuspark/solid-audit
# Install the plugin
/plugin install solid-audit@solid-audit
# Reload your plugins
/reload-plugins Run this once in any Claude Code session. The plugin is available immediately.
Post installation you should see the plugin listed in the marketplace tab
| Command | Action | Modifies Files? | Confirmation? |
|---|---|---|---|
/audit |
Audit all 5 SOLID principles — structured report | No | No |
/srp |
Fix Single Responsibility violations | Yes | Yes |
/ocp |
Fix Open/Closed violations | Yes | Yes |
/lsp |
Fix Liskov Substitution violations | Yes | Yes |
/isp |
Fix Interface Segregation violations | Yes | Yes |
/dip |
Fix Dependency Inversion violations | Yes | Yes |
/solid-fix |
Fix all violations across all 5 principles | Yes | Yes |
- Write your feature code
- Stage your changes:
git add -p - Run
/solid-audit— review the violation report - Run the relevant fix command(s) — review the before/after diff and confirm
- Review the diff summaries
- Open your PR
/solid-audit src/services/user.py
All fix commands also accept an optional file path:
/srp src/services/user.py
/solid-fix src/
## SOLID Audit Report
**Files reviewed**: 3
**Total violations**: 2
### S — Single Responsibility
- `src/services/user.py` · `UserService` — handles both user persistence and email notification → extract `EmailNotificationService` with a single `notify(user)` method
### O — Open/Closed
(none)
### L — Liskov Substitution
(none)
### I — Interface Segregation
(none)
### D — Dependency Inversion
- `src/services/order.py` · `OrderService` — directly instantiates `PostgresDatabase` in `__init__`, preventing dependency substitution → accept a `Database` Protocol parameter with a default value
---
**Files with no violations**: src/models/user.py
**Files skipped**: package-lock.json
Every fix command:
- Shows a before/after diff before writing anything
- Asks for confirmation — type
yesto apply,noto skip - Skips any fix it cannot apply as behavior-preserving (flags with reason)
- Shows a diff summary after each modified file
- Matches your existing code style (type hints, docstrings, import ordering)
| Language | Idioms Used |
|---|---|
| Python | Protocol, abc.ABC, constructor injection, @dataclass |
| TypeScript / TSX | interface, abstract class, constructor injection |
| Java | interface, abstract class, @Autowired or constructor injection |
| Go | interface types, struct composition, constructor functions |
| C# | interface, abstract class, constructor injection, IServiceCollection |
| Kotlin | interface, data class, sealed class, constructor injection |
| Ruby | modules, duck typing, keyword argument injection |
| PHP | interface, abstract class, constructor injection, DI containers |
*.lockfiles (package-lock.json,yarn.lock,pnpm-lock.yaml,Gemfile.lock,composer.lock)- Database migrations (
**/migrations/**) - Generated code (
**/__generated__/**) - Test fixtures (
**/fixtures/**) - Minified files (
**/*.min.js)
solid-audit/
├── commands/
│ ├── audit.md
│ ├── srp.md
│ ├── ocp.md
│ ├── lsp.md
│ ├── isp.md
│ ├── dip.md
│ └── solid-fix.md
└── skills/
├── solid-audit/
│ ├── SKILL.md
│ └── references/
│ └── examples.md
├── srp/SKILL.md
├── ocp/SKILL.md
├── lsp/SKILL.md
├── isp/SKILL.md
├── dip/SKILL.md
└── solid-fix/SKILL.md
Muthukrishnan · github.com/muthuspark/solid-audit


