dotnet-clean-architecture-skill
CLAUDE.md0 starsChanged 33 days agoMITView on GitHub
An open-source agent skill pack: skills/dotnet-clean-architecture/SKILL.md plus reference files in skills/dotnet-clean-architecture/references/. It teaches agents to build, extend and audit .NET 10 services using Clean Architecture, CQRS, EF Core and multi-tenant SaaS patterns. SKILL.md is the source of truth for rules, layout, workflows and the reference index. Read it before any task. - One step at a time. Before writing or changing a file, state in a few lines what you will do and which files you will touch, then wait…
- Commits and pushes
In this repositoryOne other file it gives its agents.
The file
We split this CLAUDE.md into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Prefer honest, critical feedback over agreement.
- Distinctive: line 27
Default database provider is SQL Server.
- Very specific: line 29
Default endpoint style is minimal APIs with endpoint groups and TypedResults.
- Distinctive: line 32
Never HR, payroll, or any real company's business domain.
- Distinctive: line 35
No commercially licensed dependencies by default: Mediator (martinothamar, source-generated) instead of MediatR, explicit mapping instead …
- Distinctive: line 39
Verify package names, versions and APIs before stating them.
- Distinctive: line 41
Every rule in a reference file explains _why_ in one or two sentences, ideally with the failure it prevents.
- Distinctive: line 54
Keep each file focused and under ~400 lines.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md — working agreement for this repo
What this repo is
An open-source agent skill pack: skills/dotnet-clean-architecture/SKILL.md
plus reference files in skills/dotnet-clean-architecture/references/.
It teaches agents to build, extend and audit .NET 10 services using Clean
Architecture, CQRS, EF Core and multi-tenant SaaS patterns.
SKILL.md is the source of truth for rules, layout, workflows and the
reference index. Read it before any task.
How we work
- One step at a time. Before writing or changing a file, state in a few lines what you will do and which files you will touch, then wait for my "go".
- One reference file (or one focused change) per step, sized to be one commit.
- Never run
git commit,git push, or any history-changing git command. I make every commit myself. When a step is done, suggest a commit message in Conventional Commits style (docs(references): add multi-tenancy guide). - Prefer honest, critical feedback over agreement. If one of my requests
conflicts with
SKILL.mdor with current .NET practice, say so and explain.
Content rules
- Target .NET 10 / EF Core 10 / C# 14. Flag anything version-specific.
- Default database provider is SQL Server. Where a rule differs on PostgreSQL, add a short "PostgreSQL:" note.
- Default endpoint style is minimal APIs with endpoint groups and
TypedResults; controllers are a documented alternative. - Examples use a neutral domain only: Orders, Products, Customers. Never HR, payroll, or any real company's business domain.
- The patterns come from a private production service. Never ask for its code, never name it or the company, never reproduce its business logic.
- No commercially licensed dependencies by default: Mediator (martinothamar, source-generated) instead of MediatR, explicit mapping instead of AutoMapper, AwesomeAssertions or Shouldly instead of FluentAssertions 8+.
- Verify package names, versions and APIs before stating them. If you can't verify, say so instead of guessing.
- Every rule in a reference file explains why in one or two sentences, ideally with the failure it prevents.
Reference file format
Each file in references/ follows this shape:
- Purpose: one paragraph on when to load the file.
- Rules: numbered, each with a short rationale.
- Code: minimal, compilable-looking C# in the Orders domain.
- Anti-patterns: what not to do and why.
- Checklist: items an agent can verify mechanically.
Keep each file focused and under ~400 lines. Load-on-demand only works if the files stay small.
Repo layout
skills/dotnet-clean-architecture/
SKILL.md
references/ one .md per topic, listed in SKILL.md's reference index
README.md LICENSE CLAUDE.md .gitignorePlanned order of reference files
- multi-tenancy.md
- persistence-efcore.md
- error-handling.md
- cqrs-slices.md
- api-endpoints.md
- testing.md
- solution-structure.md
- pipeline-behaviors.md
- domain-modeling.md
- audit-checklist.md
- anti-patterns.md
- mediatr-alternative.md
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.

