clean-architecture
Skill1 starsChanged 28 days agoMITView on GitHub
Subagent-side, preloaded into the developer; also read by the conductor in /project:init. How to place and wire code under the boundaries architecture.md § Layers declares — the four shapes (layered, core/shell, slices, flat) and when each fits, which boundary a file belongs to, reaching the outside through a port, wiring adapters, and handling architecture check failures.
28 other projects use a version of this.
Adopted by
Most recently taken up by
- kinhluan/skillstheir own version, first seen Nov 8, 2026
- codewithmukesh/dotnet-claude-kittheir own version, first seen Nov 8, 2026
- yht-4403/jc-agent-skillstheir own version, first seen Nov 8, 2026
- zdanovichnick/dotnet-pilottheir own version, first seen Nov 6, 2026
- nledford/engineering-review-boardtheir own version, first seen Nov 3, 2026
- soysantana/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use convention-learner, opentelemetry 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.
codewithmukeshSkillconvention-learner
Detects and enforces project-specific coding conventions by analyzing existing codebase patterns. Learns naming conventions, folder structure, test organization, and coding style from the existing code. Load when: "conventions", "coding standards", "project patterns", "enforce style", "detect patterns", "learn conventions", "code consistency".
Also in 3 projects that use this
codewithmukeshSkillopentelemetry
OpenTelemetry observability for .NET 10 applications. Covers traces, metrics, and logs using the OpenTelemetry SDK with OTLP export. Includes custom ActivitySource, IMeterFactory metrics, resource configuration, and Aspire Dashboard integration. Load this skill when setting up distributed tracing, custom metrics, OTLP export, or when the user mentions "OpenTelemetry", "OTLP", "traces", "spans", "Activity", "ActivitySource", "metrics", "IMeterFactory", "Meter", "Counter", "Histogram", "Gauge", "telemetry", "observability", "distributed tracing", "OTEL", or "Aspire Dashboard".
Also in 3 projects that use this
MovGP0Skillmodern-csharp
Modern C# style guidance for Bendex and MicroSea code changes, including primary constructors, expression-bodied members, var usage, target-typed new, lambdas, and pattern matching.
Also in 3 projects that use this
MicrosoftSkillresilience
Apply resilience patterns (retry, backoff, circuit breaking) when writing or reviewing code that makes outbound HTTP/REST calls, database operations, or any I/O that can experience transient failures. Use this skill when: (1) writing new code that calls external services or APIs, (2) reviewing code that uses fetch, HTTP clients, or service-to-service calls, (3) adding queue consumers or workers that interact with remote systems, (4) debugging intermittent failures in production.
Also in 3 projects that use this
hongyuancSkillvertical-slice
Build and evaluate a production-quality vertical slice before advancing from Pre-Production to Production.
Also in 3 projects that use this
wpankSkillcaching
Caching strategies, invalidation, eviction policies, HTTP caching, distributed caching, and anti-patterns. Use when designing cache layers, choosing eviction policies, debugging stale data, or optimizing read-heavy workloads.
Also in 3 projects that use this
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- ciembor/agent-rules-books★ 2.8ksame name
- wondelai/skills★ 2.6ksame name
- codewithmukesh/dotnet-claude-kit★ 808same name
- Mindrally/skills★ 275same name
- Resgrid/Core★ 238same name
- GabrielMartinMoran/mind★ 193same name
- tokenaissance/clean-architecture★ 17same name
- G1Joshi/Agent-Skills★ 15same name
- korallis/skills-collection★ 14same name
- nledford/engineering-review-board★ 11same name
18 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 repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adversarial-reviewSkill
- decision-recordingSkill
- design-system-checkSkill
- dispatch-handoffSkill
- feature-branchingSkill
- finding-dispositionSkill
- git-recoverySkill
- gotcha-recordingSkill
- human-checkpointSkill
- plan-reviewSkill
- plan-writingSkill
- pr-createSkill
- simplicity-ladderSkill
- spec-writingSkill
- subagent-contractSkill
- subagent-dispatchSkill
- tdd-loopSkill
- update-toolkitSkill
- wiki-updateSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 26 edited versions we read keep these.
2
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 38
Place files in the directories named in § Layers.
- Distinctive: line 49
Never import framework types, ORM models, HTTP objects, or SDK types into an inner boundary.
- Distinctive: line 70
Mocking owned domain/port types: instead of writing a simple fake.
“Common” is measured: kept by at least 6 in 10 of the 26 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
Clean Architecture — placing and wiring code
Read first
docs/wiki/architecture.md § Layers— the shape, its boundary table, composition root, and exceptions.docs/wiki/commands.md § Architecture— the enforcement command (none forflat).
Shapes
/project:init picks one and records it as an ADR; the rest of this skill applies the one recorded.
| Shape | Fits | Boundaries |
layered | backend services, domain-rich apps | domain ← application ← adapters ← infrastructure, ports owned by application |
core/shell | CLIs, parsers, compilers, small SDKs | core (pure logic, owns its ports) ← shell (I/O, entry points, adapters) |
slices | frontends, feature-heavy apps | one slice per feature, importing only shared and other slices' public API |
flat | scripts, tiny libraries | none; no check, simplicity-ladder alone decides structure |
Pick the smallest shape the project's I/O and domain justify: four layers on a CLI is indirection simplicity-ladder would reject, and flat on a service with a database lets I/O leak into every rule.
Place every new file
Choose the boundary before creating a file by what the code knows about, using the row for the declared shape:
| If the code… | layered | core/shell | slices |
| states a rule true with no database, UI, or network | domain | core | its slice (or shared if two slices need it) |
| orchestrates one user-meaningful operation and declares external needs as ports | application | core | its slice |
| converts between external shapes and inner shapes (HTTP ↔ input, rows ↔ entities, SDK ↔ port) | adapters | shell | its slice |
| configures or wraps a framework, driver, client, or runtime | infrastructure | shell | shared |
Place files in the directories named in § Layers. A file spanning two boundaries must be split into two files. Under flat, put the file where the existing layout puts its neighbours.
Reach the outside through a port
layered and core/shell only. When an inner boundary (domain/application, or core) needs external I/O (persistence, time, randomness, network):
- Declare the port in the inner boundary using its own types (
OrderRepository.save(order),Clock.now()), never driver/framework types. - Test the inner code against an in-memory fake of the port (no database needed for its Red/Green).
- Implement the port in the outer boundary as its own Behavior case with an integration test against the real boundary.
- Wire concrete adapters in the composition root only. Inner code receives ports via injection.
Never import framework types, ORM models, HTTP objects, or SDK types into an inner boundary.
Cross a slice
slices only. A slice imports another slice only through the public API (index file or module root) that slice exports; code two slices need moves to shared in its own case. shared never imports a slice.
When the architecture check fails
- Your change caused it → move the code to the right boundary, or invert the dependency via a port or public API, then re-run check + tests.
- Requires more than a small port → stop and report which case, import, and port are needed.
- The rule itself seems wrong → stop and report; the shape and rule files are protected and require human approval + an ADR (rule 23).
- Never silence the check with ignore comments, dynamic imports, or widened allowlists.
Anti-patterns
- Anemic use case: business rules in a controller while the use case merely forwards to a repo.
- Leaky port: returning ORM rows, HTTP responses, or SDK objects across a port.
- Service locator: pulling dependencies from a global container inside inner code.
- Cross-boundary
utils: shared helpers that quietly import framework/infrastructure packages. - Reaching into a slice: importing another slice's internals instead of its public API.
- Ceremony past the shape: a port, factory, or layer the declared shape does not ask for.
- Mocking owned domain/port types instead of writing a simple fake.
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.

