apply-solid
Skill7 starsChanged 16 days agoMITView on GitHub
Use when a class or module violates SOLID — an edit forces unrelated edits, a dependency needs a mock everywhere, an abstraction leaks — and you must apply the five principles at the class level.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- VelimirMueller/claude-skillsword for word, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 1
- VelimirMueller/claude-skills★ 7100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository156 other files it gives its agents.
- skills/swift/swiftui-design-principles/AGENTS.mdAGENTS.md
- skills/swift/ios-code-audit/CLAUDE.mdCLAUDE.md
- skills/swift/swift-focusengine-pro/llms.txtllms.txt
- build-llm-seamSkill
- build-mcp-serverSkill
- build-rag-pipelineSkill
- secure-llm-featuresSkill
- set-up-llm-evalsSkill
- build-nextjs-backendSkill
- build-supabase-edge-functionSkill
- configure-backend-testsSkill
- design-http-apiSkill
- harden-backendSkill
- scaffold-fastapi-serviceSkill
- scaffold-go-serviceSkill
- scaffold-hono-serviceSkill
- secure-supabase-rlsSkill
- set-up-backend-authSkill
- set-up-background-jobsSkill
- set-up-databaseSkill
- set-up-nextjs-supabase-authSkill
- set-up-observabilitySkill
- set-up-supabaseSkill
- build-cliSkill
- release-cliSkill
- set-up-dev-toolchainSkill
- audit-securitySkill
- audit-toolchainSkill
- extend-skillsetSkill
- promote-releaseSkill
- set-up-stack-profileSkill
- write-commit-messagesSkill
- write-pull-requestsSkill
- analyze-complexitySkill
- apply-algorithmsSkill
- apply-design-patternsSkill
- apply-design-principlesSkill
- choose-data-structureSkill
- debug-systematicallySkill
- enforce-dependency-ruleSkill
- refactor-safelySkill
- slice-and-estimateSkill
- write-clean-testsSkill
- write-readable-codeSkill
- clean-frontend-scaffoldingSkill
- configure-accessibilitySkill
- configure-analyticsSkill
- configure-ciSkill
- configure-error-trackingSkill
- configure-lintingSkill
- configure-test-stackSkill
- configure-typescriptSkill
- create-moduleSkill
- optimize-performanceSkill
- scaffold-frontend-projectSkill
- set-up-authSkill
- set-up-design-systemSkill
- set-up-document-headSkill
- set-up-error-boundariesSkill
- set-up-feature-flagsSkill
- The first 60 shown.
The file
Files
Apply SOLID
The five principles applied at the class and module level (Clean Architecture). The layer-level rules — dependencies point inward, boundaries at axes of change — are in enforce-dependency-rule. Object-design rules in apply-design-principles.
The five
- Single Responsibility — a module has one reason to change, which means one actor it serves. Two actors (e.g. the billing team and the ops team) that share a class will fight over it.
- Open/Closed — open for extension, closed for modification. Protect the high-level, stable components by pointing dependencies away from them; add behaviour by adding code, not editing the core.
- Liskov Substitution — a subtype must be usable wherever its base type is, including the base's contract (preconditions not stronger, postconditions not weaker). LSP is about behaviour, not shape: a Square that breaks Rectangle's setters fails LSP even though it inherits.
- Interface Segregation — depend only on what you use. A fat interface forces every client to recompile and re-mock for methods it never calls; split by client.
- Dependency Inversion — depend on abstractions, not concretions. The abstraction is owned by the high-level policy; the detail (DB, web, framework) implements it and points inward.
1. Audit (change nothing)
cat .claude/stack-profile.md 2>/dev/null | head -20
grep -rn "mock\|Mock\|stub" --include="*.ts" --include="*.rs" --include="*.go" --include="*.py" . 2>/dev/null | head -20Find the violation, not the abstraction: a class that changed for two unrelated tickets (SRP), a change that forced edits to a stable core (OCP), a subtype that throws "not supported" (LSP), an interface with methods most clients leave empty (ISP), a policy module importing a vendor SDK directly (DIP).
2. Apply the smallest fix
- SRP: extract the second actor's responsibility into its own class/module.
- OCP: add a seam (a function parameter, a registry, an interface) so the new case is an addition.
- LSP: fix the contract, or drop the inheritance and use composition (see apply-design-principles).
- ISP: split the interface by client; a client depends only on the slice it uses.
- DIP: move the abstraction up into the policy and have the detail import it.
3. State the exception
SOLID is a means to a maintainable boundary, not a purity test. If a principle's ceremony outweighs the churn it prevents in this codebase, say which and why.
Verify
The edit that used to touch two unrelated places now touches one; a new case landed as an addition, not a modification; the mock that was needed everywhere now appears once at the seam. State the principle violated and the fix in the note.
When to deviate
- Small, single-actor modules where a full abstraction is premature.
- Framework or library code whose contract is fixed by the vendor.
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
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.

