clean-architecture
Skill2 starsChanged 3 months agoMITView on GitHub
Principles and checks for structuring code with clear boundaries, low coupling, and high cohesion. Use this whenever you are designing a new module, refactoring existing code, reviewing structure, deciding where logic should live, or untangling a messy codebase — even if the user doesn't say the words "clean architecture". Applies to Go, React/TypeScript, and C#/.NET.
33 other projects use a version of this.
Adopted by
Most recently taken up by
- LetermeFlorent/claude-skillstheir own version, first seen Nov 16, 2026
- travissmithv1/claude-skillstheir own version, first seen Nov 16, 2026
- Ajustor/claude-skillstheir own version, first seen Nov 16, 2026
- aazirani/flutter_agentifytheir own version, first seen Nov 15, 2026
- zdanovichnick/dotnet-pilottheir own version, first seen Nov 8, 2026
- kinhluan/skillstheir own version, first seen Nov 8, 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 versions33 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 33
- ciembor/agent-rules-books★ 2.8ksame name
- wondelai/skills★ 2.7ksame 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
23 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 repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessible-componentsSkill
- production-readinessSkill
- accessible-componentsSkill
- clean-architectureSkill
- production-readinessSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
No leaky boundaries: Don't pass framework types (HTTP requests, ORM entities) into business logic.
- Distinctive: line 56
Put server-state access behind a data layer (e.g.
- Distinctive: line 67
Add abstraction "for later" with no current consumer.
“Common” is measured: kept by at least 6 in 10 of the 31 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 (applied, not dogmatic)
The goal is code that's easy to change safely. Use these principles as a lens, not a religion — apply the ones that reduce real coupling, skip ceremony that doesn't.
Core principles
- Separate concerns by responsibility. Transport (HTTP/handlers), business logic (services/use-cases), and data access (repositories) are three different jobs. Keep them in different units so a change to one doesn't ripple into the others.
- Depend inward, on abstractions. Business logic should not import the database driver or the web framework. Define interfaces it needs; let the outer layers implement them. Dependencies point toward the domain, never out of it.
- High cohesion, low coupling. Things that change together live together; things that don't, don't. A package/module should have one clear reason to exist.
- No leaky boundaries. Don't pass framework types (HTTP requests, ORM entities) into business logic. Translate at the edge.
- Single source of truth. One place for each piece of logic. Duplication is a bug waiting to diverge.
When structuring or refactoring, check:
- Can I describe each unit's single responsibility in one sentence? If not, split it.
- Does business logic depend on a concrete framework/DB? Invert it behind an interface.
- Is the same logic in more than one place? Consolidate.
- Could I swap the database or the web layer without touching business rules? That's the test for whether boundaries are clean.
- Am I adding a layer that doesn't pull its weight? Remove it. Simplicity wins.
Stack-specific shape
Go
/cmd entrypoints
/internal
/transport http handlers, routing, request/response mapping
/service business logic, depends on repo interfaces
/repository data access, implements interfaces
/domain core types, no external importsDefine repository interfaces in the service layer (consumer side), implement them in
/repository. Wrap errors with context as they cross boundaries.
React / TypeScript
- Separate presentation (dumb components) from container/logic (hooks).
- Put server-state access behind a data layer (e.g. query hooks), not inside UI.
- Shared logic → custom hooks; shared UI → reusable components. No business rules buried in JSX.
C# / .NET
- Layered or vertical-slice; domain project has no dependency on infrastructure.
- Constructor injection; program against interfaces; keep EF/DbContext out of the domain.
Do not
- Add abstraction "for later" with no current consumer.
- Refactor and change behavior in the same step (see the
refactoreragent's rule). - Mistake "more folders" for "better architecture." Boundaries are about dependencies, not directory count.
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.

