agentleFS
Ayoub-EDAHLOULIAyoub-EDAHLOULI/dotnet-clean-architecture-skill/CLAUDE.md

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

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
  1. Very specific:

    Prefer honest, critical feedback over agreement.

    line 21
  2. Distinctive:

    Default database provider is SQL Server.

    line 27
  3. Very specific:

    Default endpoint style is minimal APIs with endpoint groups and TypedResults.

    line 29
  4. Distinctive:

    Never HR, payroll, or any real company's business domain.

    line 32
  5. Distinctive:

    No commercially licensed dependencies by default: Mediator (martinothamar, source-generated) instead of MediatR, explicit mapping instead …

    line 35
  6. Distinctive:

    Verify package names, versions and APIs before stating them.

    line 39
  7. Distinctive:

    Every rule in a reference file explains _why_ in one or two sentences, ideally with the failure it prevents.

    line 41
  8. Distinctive:

    Keep each file focused and under ~400 lines.

    line 54

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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.md or 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:

  1. Purpose: one paragraph on when to load the file.
  2. Rules: numbered, each with a short rationale.
  3. Code: minimal, compilable-looking C# in the Orders domain.
  4. Anti-patterns: what not to do and why.
  5. 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  .gitignore

Planned order of reference files

  1. multi-tenancy.md
  2. persistence-efcore.md
  3. error-handling.md
  4. cqrs-slices.md
  5. api-endpoints.md
  6. testing.md
  7. solution-structure.md
  8. pipeline-behaviors.md
  9. domain-modeling.md
  10. audit-checklist.md
  11. anti-patterns.md
  12. mediatr-alternative.md

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.