solid
Skill10 starsChanged 9 months agoMITView on GitHub
When designing module boundaries, interfaces, or class hierarchies for maintainable architecture. Use when the user says "how should I structure this," "too coupled," "hard to test," "dependency injection," "single responsibility," or "interface design." For simpler structural concerns, see separation-of-concerns.
15 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- vladcheck/agenticedited, first seen Nov 8, 2026
- vladcheck/skillsedited, first seen Nov 1, 2026
- openclaw/openclawtheir own version, first seen Nov 1, 2026
- vercel-labs/json-rendertheir own version, first seen Oct 29, 2026
- bighamx/openclaw-android-node-apktheir own version, first seen Oct 17, 2026
- steipete/warelaytheir own version, first seen Oct 17, 2026
Used with
Projects with it also use openclaw-performance, plugin-sdk-impact and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
clawdbotSkillopenclaw-performance
Performance work in OpenClaw: a slow or heavy flow (latency, CPU, memory, SQL, RPC, renders), writing or reviewing a perf PR, or adding a cache. Count the work, delete waste first, cache last.
Also in 7 projects that use this
clawdbotSkillplugin-sdk-impact
Count Plugin SDK consumers across live ClawHub releases and bundled OpenClaw plugins before deprecation, removal, or behavior changes; supports public release-date filters.
Also in 7 projects that use this
molt-botSkilldiscord-e2e
Test Discord with Convex-leased QA bots: check credentials without a Gateway, exercise owned messages, or prove OpenClaw replies, files, threads, reactions, streaming, and typing. Distinguish API and Gateway evidence from manual user interactions.
Also in 7 projects that use this
molt-botSkillopenclaw-repair-sweep
Run scoped OpenClaw issue/PR repair campaigns: coordinate workers, prove root causes, and land or close verified work under the requested authority.
Also in 7 projects that use this
supermansuper563-opsSkillauto-qa
Continuously audit, live-test, and stress-test the current OpenClaw codebase across at least ten independently scoped subsystem lanes; default to 100 independently verified, landed root-cause fixes, maintain an evidence-backed report, and announce each merged pull request immediately. Use for OpenClaw-wide autonomous QA, live-provider campaigns, gateway, CLI, web, plugin, native-app, scenario, packaging, and extended soak testing.
Also in 7 projects that use this
clawsoulsSkillchannel-message-flows
Use when running QA Lab channel message flow evidence.
Also in 7 projects that use this
- +2 more from molt-bot
- +1 more from clawdbot
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- vladcheck/agentic★ 113% same
- vladcheck/skills★ 113% same
Wrote their own version · 13
- moltbot/clawdbot★ 394ksame name
- steipete/warelay★ 394ksame name
- steipete/clawdis★ 394ksame name
- moltbot/moltbot★ 394ksame name
- clawdbot/clawdbot★ 394ksame name
- openclaw/openclaw★ 394ksame name
- vercel-labs/json-render★ 19ksame name
- ramziddin/solid-skills★ 591same name
- nank1ro/solid★ 165same name
- bighamx/openclaw-android-node-apk★ 57same name
3 more not listed
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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- boy-scout-ruleSkill
- convention-over-configurationSkill
- detect-stackSkill
- drySkill
- kissSkill
- law-of-demeterSkill
- separation-of-concernsSkill
- yagniSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 11 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
If .agents/stack-context.md exists, read it first.
- Distinctive: line 28
Every module, function, or component should own exactly one piece of functionality.
- Distinctive: line 36
If a function does two things, split it into two functions
- Distinctive: line 37
If a module handles both "what to do" and "how to do it," separate policy from mechanism
- Distinctive: line 51
Every new integration requiring changes to a central dispatch function
- Distinctive: line 54
Use dispatch tables, registries, or polymorphism instead of branching on type
- Distinctive: line 64
If your code accepts a base type, any implementation of that type should work correctly.
- Distinctive: line 72
If a subtype can't fulfill the full contract of the parent, it shouldn't be a subtype — use composition instead
- Distinctive: line 74
Test with substitution: swap implementations and verify the system still behaves correctly
- Distinctive: line 82
Keep interfaces small and focused.
- Distinctive: line 92
If your test mocks are painful to write, your interfaces are too broad
- Distinctive: line 118
Tension with KISS: Every interface, injection point, and abstraction adds a layer of indirection.
“Common” is measured: kept by at least 6 in 10 of the 13 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.
Files
SOLID Principles
Before Applying
If .agents/stack-context.md exists, read it first. Apply this principle using idiomatic patterns for the detected stack. For framework-specific details, use context7 MCP or web search — don't guess.
Principle
Five design principles that produce modular, testable, and resilient systems. While originally framed for object-oriented design, the underlying ideas apply to any paradigm — functions, modules, services, or components.
Why This Matters in Production
SOLID code is change-friendly code. Production systems change constantly — new features, bug fixes, integrations, scaling. Systems designed with SOLID principles absorb change locally rather than requiring cascading modifications. This means fewer regressions, faster feature delivery, and smaller blast radius when things go wrong.
S — Single Responsibility Principle
A module should have one, and only one, reason to change.
Every module, function, or component should own exactly one piece of functionality. When a change request comes in, you should be able to predict which file needs editing without searching.
Violations look like:
- A function that validates input, queries the database, applies business logic, and formats the response
- A "utils" file that grows indefinitely because nothing else has a clear home
- A class that changes every time any feature in the system changes
Apply it:
- If a function does two things, split it into two functions
- If a module handles both "what to do" and "how to do it," separate policy from mechanism
- Name modules after their responsibility — if the name is vague ("Manager", "Helper", "Utils"), the responsibility is unclear
O — Open/Closed Principle
Software should be open for extension but closed for modification.
You should be able to add new behavior without modifying existing, working code. This doesn't mean you never touch existing code — it means you design so that the common extension points don't require it.
Violations look like:
- A growing switch statement that gets a new case every time a feature is added
- A function that checks
if type == "x"for an ever-expanding list of types - Every new integration requiring changes to a central dispatch function
Apply it:
- Use dispatch tables, registries, or polymorphism instead of branching on type
- Design around contracts (interfaces, protocols, function signatures) that new implementations can fulfill
- Plugin architectures — but only when you have multiple plugins (see YAGNI)
L — Liskov Substitution Principle
Subtypes must be usable wherever their parent type is expected, without surprises.
If your code accepts a base type, any implementation of that type should work correctly. No special-casing, no "except when it's type X" guards.
Violations look like:
- A subclass that throws "not implemented" for inherited methods
- Type checks (
instanceof,typeof) to determine behavior after accepting a general type - Consumers that must know which specific implementation they're dealing with
Apply it:
- If a subtype can't fulfill the full contract of the parent, it shouldn't be a subtype — use composition instead
- Design interfaces around what consumers need, not what implementations can provide
- Test with substitution: swap implementations and verify the system still behaves correctly
I — Interface Segregation Principle
No consumer should be forced to depend on methods it doesn't use.
Keep interfaces small and focused. A consumer that only reads data shouldn't depend on an interface that also includes write, delete, and admin operations.
Violations look like:
- A "god interface" with 20+ methods that most implementations only partially fulfill
- Consumers that import a large module but only use one function
- Mock objects in tests that stub out 15 methods when the test only exercises 2
Apply it:
- Split large interfaces into role-based ones:
Reader,Writer,Admininstead ofRepository - In languages without interfaces, apply the principle to module boundaries — export only what consumers need
- If your test mocks are painful to write, your interfaces are too broad
D — Dependency Inversion Principle
High-level policy should not depend on low-level detail. Both should depend on abstractions.
Your business logic should not directly import database drivers, HTTP clients, or filesystem operations. It should depend on abstractions that those details implement.
Violations look like:
- Business logic that directly instantiates database connections, HTTP clients, or external SDKs
- Inability to test business rules without spinning up real infrastructure
- Changing a database or API provider requires rewriting business logic
Apply it:
- Pass dependencies in (dependency injection) rather than constructing them internally
- Define interfaces at the boundary of your business logic — let infrastructure adapt to them
- In functional code: accept functions as parameters instead of hard-coding calls to specific implementations
Boundaries
- SOLID is a set of heuristics, not laws. Small scripts, prototypes, and glue code don't need full SOLID treatment. Apply these principles where they reduce the cost of change.
- Don't over-abstract. SOLID taken to the extreme produces an explosion of tiny classes and interfaces that are harder to navigate than the original monolith. An abstraction must earn its keep by serving multiple consumers or enabling meaningful testability.
- Tension with KISS: Every interface, injection point, and abstraction adds a layer of indirection. Apply SOLID where the system genuinely changes along those axes, not prophylactically.
- Functional code gets SOLID for free in some areas. Pure functions naturally satisfy SRP. Higher-order functions naturally satisfy DIP. Focus SOLID effort on the architectural boundaries where it matters most.
Code Review Checklist
- Does each module have a clear, single responsibility?
- Can new behavior be added without modifying existing working code?
- Are interfaces small enough that consumers don't depend on things they don't use?
- Are dependencies injected rather than hard-coded?
- Could you swap an implementation (e.g., database, API client) without touching business logic?
Related Skills
- separation-of-concerns: For layer-level structure (SoC is the "what," SOLID is the "how")
- law-of-demeter: For reducing coupling between components
- yagni: To avoid over-applying SOLID with premature abstractions
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.

