clean-architecture
Skill0 starsChanged 3 days agoMITView on GitHub
Use when the user types /clean-arch, asks to audit or reorganise a project's folder layout, or files look misplaced, duplicated or useless, or a folder has become a dumping ground.
33 other projects use a version of this.
Adopted by
Most recently taken up by
- 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
- tiagosilva07/zyrax-guardtheir 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 9 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 repository13 other files it gives its agents.
- browser-bidiSkill
- claude-model-effortSkill
- clean-codeSkill
- clean-commitsSkill
- drive-projectSkill
- limited-runSkill
- other-model-effortSkill
- progress-boardSkill
- resource-guardSkill
- stop-resume-agentsSkill
- strip-ai-tracesSkill
- using-git-worktreesSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 31 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 20
No two files with same content.
- Distinctive: line 25
No import cycle between folders.
- Very specific: line 26
No needless depth: chain of folders holding one subfolder only, depth over max_depth [6].
- Very specific: line 47
Read: tree (git ls-files <scope>), then files the candidates name.
- Very specific: line 51
Verify: one fresh Agent call, never a fork, prompt verify-brief.md.
- Very specific: line 70
Commit through the clean-commits skill with the step's Files: only, hurry or not: a hand git commit skips its checks.
- Very specific: line 73
Before each commit, rg old path and old module path (dotted) in project: no hit left.
- Very specific: line 74
Delete only after rg of the name finds no reference.
“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
Audit scope's folder layout: misplaced, duplicated, useless files and folders, missing groups, folder cycles. Note /20 from script on verified findings, then plan, then apply. Same machine as the clean-code skill: its "Rules that never bend", Apply and Report hold here. Needs clean-code installed next to this folder.
<skill> = this folder. Scripts from project root: python -I "<skill>/scripts/<tool>.py". Run goes to
.ia/clean-architecture/<run>/, thresholds in .ia/clean-architecture/config.json.
Rules
Defaults in brackets.
- Bad layout outside grid, 0.5 to 3 points.
- No two files with same content. Script. Look-alike files: by reading.
- File lives with its users: used only from one unrelated folder, it moves there, or to a new folder when rule 9 says the users' folder is the wrong concern. Script.
- Nothing useless: folder of empty files, tracked junk (logs, backups, copies, OS files, built output). Script.
- Folder over
max_files[8] code files splits by name prefix,group_min[3] files a group. Script. - No import cycle between folders. Script.
- No needless depth: chain of folders holding one subfolder only, depth over
max_depth[6]. Script. - One file naming style per folder. Script.
- Tests in one place, one convention. Script.
- One folder, one concern: no folder mixing layers or domains (UI, data, clients, models). Reading.
- Tree fits project kind and framework; root holds entry points, manifests, docs, config only. Reading.
| Rule | Deduction |
| 0 | its points |
| 1, 5 | 1 per finding, 3 at most |
| 2, 3, 4, 9, 10 | 0.5 per finding, 2 at most |
| 8 | 0.5 per finding, 1 at most |
| 6, 7 | 0.25 per finding, 1 at most |
Audit
Each step ends before next.
- Scope:
/clean-archargument, elseAskUserQuestion, narrowest folder first. - Measure:
measure.py <scope>. - Suite: run project tests once, low priority, two workers at most. Result = plan
Suite:line. - Read: tree (
git ls-files <scope>), then files the candidates name. Rules 9, 10, 0, look-alike files:findings.py add --rule <n> --file <path> --line <n> --what "<defect>" --proof "<paths or lines>". Rules 9 and 10 each need a finding orfindings.py checked --rule <n> --why "<what was read>", on every run, new measure included, elsescore.pyrefuses. - Verify: one fresh Agent call, never a fork, prompt
verify-brief.md. - Score:
score.py. At 20: stop, no plan. - Plan:
<run>/plan.mdshaped like clean-codeplan-template.md, first line<!-- clean-architecture plan v1 -->, phases below.plan_check.pyuntilplan ok. - Print note alone as heading,
# 14/20, then apply whole plan without asking.
Apply
clean-code Apply section, this phase table:
| Phase | Rules |
| 1 | 0, 3: delete |
| 2 | 1: point every import at kept copy, delete other |
| 3 | 2, 4, 6, 8: move |
| 4 | 7: rename |
| 5 | 5, 9, 10: restructure |
- Finding an earlier step already solves (file merged or deleted, cycle gone):
Left as is, naming that step. - Commit through the clean-commits skill with the step's
Files:only, hurry or not: a handgit commitskips its checks. Nevergit add -Aor a folder: it takes__pycache__,.ia/and other sessions' files. - Move =
git mv, then every import, path string, config entry and doc link fixed in same step. - Before each commit,
rgold path and old module path (dotted) in project: no hit left. - Delete only after
rgof the name finds no reference. - Public path (package export, route, URL, file another repo reads) never moves:
Left as is.
Report
clean-code Report, after a new measure, verify and score on same scope.
Files
New check = module in scripts/checks/layout/ with check(files, root, config) returning (findings, stats).
Tests: python -I -B -m unittest discover -s tests -p "test_*.py" from this folder.
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.

