dotnet-clean-architecture
Scaffolds and extends .NET 10 Minimal API modules using self-registering IModule + IEndpoint (reflection discovery) + hexagonal ports/adapters per module…
Skill by fmflurry
Chalk Labs
Need help deploying dotnet-clean-architecture?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/fmflurry-dotnet-clean-architecture-a8885a
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: presentations, backend, devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
dotnet-clean-architecture- Description
- Scaffolds and extends .NET 10 Minimal API modules using self-registering IModule + IEndpoint (reflection discovery) + hexagonal ports/adapters per module (Domain/Application/Infrastructure/Presentation). Use when creating new .NET modules, adding endpoints/use-cases, or refactoring toward ports/adapters and module isolation. Persistence is chosen per bounded context — EF Core CRUD and event-sourced Marten stores are both first-class. DDD/CQRS are optional additive patterns.
- License
- MIT
- Instructions
- 421 lines in SKILL.md · view on GitHub
Files (7)
- SKILL.md
- cross-module-communication.md
- database-isolation.md
- implementation-playbook.md
- optional-ddd-cqrs.md
- optional-event-sourcing.md
- testing-patterns.md
SKILL.md (first lines)
# .NET Clean Architecture: Minimal API + Hexagonal + Modular
**SOURCE OF TRUTH (SoT):** Minimal API endpoints self-register via `IEndpoint`, and each module
self-registers its DI via `IModule`; both are discovered by reflection in
`GcPlatform.SharedKernel.Modularity.ModuleExtensions`. Each module is a hexagon:
**Domain** (pure logic, zero infrastructure) → **Application** (use cases, ports) ↔
**Infrastructure** (adapters, EF Core or Marten, RLS). **Presentation** composes the module
(endpoints, the `<Module>Module : IModule` registrar) and is the only layer allowed to wire
Infrastructure. Persistence is **chosen per bounded context** — EF Core CRUD and event-sourced
Marten stores are both first-class; there is no global default (ADR-0037, ADR-0048). Modules
communicate asynchronously via serialized integration events over the Wolverine message bus —
events are the **only** inter-module contract (ADR-0014). Per-module language autonomy: the same
real-world entity may be named differently **across** modules, but every module's language MUST be
English, and within a module each concept has exactly one name. Database isolation is one
PostgreSQL schema per module with `FORCE ROW LEVEL SECURITY` (RLS), a per-module GUC
`app.tenant_id`, and lightweight per-module roles (ADR-0013/0038).
**Optional additive patterns** (opt-in per module): DDD (aggregates, value objects, domain
events) and CQRS (separate read/write models). Event Sourcing (Marten event stores) is a
**first-class persistence choice per bounded context**, not an optional add-on. See
[optional-ddd-cqrs.md](optional-ddd-cqrs.md) and [optional-event-sourcing.md](optional-event-sourcing.md).
## Language & Naming (MANDATORY)
All code MUST be written in English — identifiers, comments, and documentation — regardless of
the user's language or the conversation language. French (or any other non-English) identifiers,
comments, or docs are a hard violation. This mirrors the commit-message mandate
(the `git-workflow` skill, Canonical spec, Language).
| Artifact | Rule |
|---|---|
| Identifiers (types, methods, properties, variables, parameters, enums, namespaces, test names) | English, PascalCase/camelCase per C# convention. No French, no accents, no transliteration. |
| Comments & XML docs | English, always. |
| Developer-facing strings (logs, exception messages, ProblemDetails `title`/`detail`) | English. |
| User-facing text | Never hardcoded French in the backend; end-user localization belongs to the frontend (Transloco). |
| DB objects (schemas, tables, columns) | English snake_case. |
**Module names: PascalCase + English.** A module lives directly under `backend/src/` (or under a
bounded-context folder, e.g. `backend/src/Sales/Invoices/`) as a set of projects:
`GcPlatform.<Module>.Domain`, `GcPlatform.<Module>.Application`,
`GcPlatform.<Module>.Infrastructure`, `GcPlatform.<Module>.Presentation`. The module registrar is
`<Module>Module : IModule`, discovered by reflection; the schema name is the lowercase
snake_case module name (e.g. `invoice`). `GcPlatform.Api` is the **host/composition root only**
— it holds no `Module/<ModuleName>/` tree.
**Ubiquitous language.** One canonical English term per domain concept — no synonyms, no ad-hoc
translations. Canonical terms are anchored in `docs/architecture/ubiquitous-language.md` and
aligned with the frontend module names (`invoices`, `payments`, `dunning`, `customers`,
`catalog`). Per-module language autonomy allows different names across modules for the same
real-world entity; it does NOT allow synonyms within a module, and it does NOT allow non-English
names.
## When To Activate
- Scaffolding a new .NET REST API with modular hexagonal architecture.
- Adding a new module or use case to an existing project.
- Adding an endpoint/use-case with EF Core CRUD or an event-sourced Marten store.
- Refactoring code toward ports/adapters and module isolation.
- Integrating with other modules via integration events.
## Architecture Overview
```text
backend/
├── GcPlatform.slnx
├── src/
│ ├── SharedKernel/ # shared types ONLY — no application logic
│ │ ├── Modularity/
│ │ │ ├── IModule.cs # RegisterModule(IServiceCollection)
│ │ │ ├── IEndpoint.cs # MapEndpoint(IEndpointRouteBuilder)
│ │ │ └── ModuleExtensions.cs # reflection discovery (modules + endpoints)
│ │ ├── Tenancy/ # ITenantContext, AmbientTenant, TenantSessionInterceptor
│ │ └── ...
│ ├── GcPlatform.Api/ # HOST / composition root (NOT a module tree)
│ │ ├── Program.cs # composes bounded contexts + endpoint discovery
│ │ ├── Infrastructure/ # host cross-cutting wiring (auth, tenancy, DB bootstrap)
│ │ └── ...
│ ├── <Module>/ # e.g. Identity, McpAccess, ThirdParties, Companies
│ │ ├── GcPlatform.<Module>.Domain/
│ │ │ ├── Aggregates/ (or Entities/)
│ │ │ ├── ValueObjects/
│ │ │ ├── Events/ # domain events (past-tense records)
│ │ │ ├── Exceptions/
│ │ │ └── Model/
│ │ ├── GcPlatform.<Module>.Application/
│ │ │ ├── <UseCase>/ # <UseCase>Command.cs, <UseCase>Handler.cs, <UseCase>Result.cs
│ │ │ └── Ports/ # incoming + outgoing port interfaces
│ │ ├── GcPlatform.<Module>.Infrastructure/
│ │ │ ├── Persistence/ # DbContext, Configurations/, Migrations/
│ │ │ └── Adapter/ # outgoing-port adapters (EfCore…, Marten…)
│ │ └── GcPlatform.<Module>.Presentation/
│ │ ├── Endpoints/ # IEndpoint implementations (+ Requests/, Responses/)
│ │ └── <Module>Module.cs # IModule registration (composition root of the module)
│ ├── Sales/ # bounded context made of subdomains
│ │ ├── GcPlatform.Sales.Domain/
│ │ ├── GcPlatform.Sales.Infrastructure/
│ │ ├── GcPlatform.Sales.Presentation/ # SalesModule.ConfigureServices(...)
│ │ ├── GcPlatform.Sales.Contracts/ # integration-event contracts
│ │ ├── Catalog/ Customers/ Invoices/ Payments/ Dunning/ Receivables/
│ │ └── ... # each subdomain: Domain + Infrastructure + Presentation
│ └── Conversation/ # single-project module
└── tests/
└── GcPlatform.<Module>.Tests/
├── Application/ Domain/ Events/ Infrastructure/
├── Integration/ Architecture/ Composition/
└── ...
```
**Layering variance:** a full module (e.g. Identity) has all four projects. Some Sales subdomains
(e.g. Invoices) fold the use cases into the Domain project and ship Domain + Infrastructure +
Presentation only. Match the neighbouring subdomain in the bounded context you are extending.
## Hexagon Rules (Important)
```
Domain (pure logic)
↑
├── Depends on: NOTHING
└── Used by: Application + InfrastructureFrom fmflurry/settings-opencode, MIT.
More from fmflurry/settings-opencode
- 0.779score
interfectio-commentarum
poteto
Spawn Haruspex Commentorum, fix accepted findings, and offer encodings for claimed constraints.
SkillAFreshness: A★ 171Claude Code +9 - 0.655score
chimera
poteto
Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it.
SkillAFreshness: A★ 171Claude Code +9 - 0.649score
humanizer
poteto
Cut AI tells from any writing.
SkillAFreshness: A★ 171Claude Code +9 - 0.643score
e2e
fmflurry
Resolve this project's browser end-to-end stack before /e2e or e2e-runner writes tests.
SkillAFreshness: A★ 171Claude Code +9 - 0.643score
show-your-work
fmflurry
Keep a reviewable decision trail for long-running or unattended work: a TSV log with one row per decision (what, why, evidence, result).
SkillAFreshness: A★ 171Claude Code +9 - 0.643score
why
fmflurry
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: A★ 171Claude Code +9 - 0.641score
verify-this
fmflurry
Verify a claim with fresh local evidence: restate it falsifiably, capture baseline and treatment, compare artifacts, and return VERIFIED, NOT VERIFIED, or…
SkillAFreshness: A★ 171Claude Code +9 - 0.640score
create-verification-skill
fmflurry
Use when creating or refreshing a project's verify-this override.
SkillAFreshness: A★ 171Claude Code +9 - 0.639score
angular-ddd
fmflurry
Domain-Driven Design for Angular/TypeScript: functional patterns with `type` aliases, `readonly` fields, pure rule functions, immutable value types, branded…
SkillAFreshness: A★ 171Claude Code +9 - 0.639score
codebase-exploration
fmflurry
Use when searching a repository, looking up symbols, callers, callees, or imports, and when deciding whether CodeMemory is on.
SkillAFreshness: A★ 171Claude Code +9 - 0.639score
patterns
fmflurry
Use when starting a feature from a skeleton project, or when adding a repository interface or a shared API response envelope.
SkillAFreshness: A★ 171Claude Code +9 - 0.639score
socratic-design
fmflurry
Use when a planning, design, architecture, or refactor decision is still open.
SkillAFreshness: A★ 171Claude Code +9
Signals
- Stars
- 171
- Forks
- 9
- Open issues
- 0
- Last commit (this folder)
- Oct 18, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/fmflurry/settings-opencode
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.639score
dotnet-clean-architecture
fmflurry
Scaffolds and extends .NET 10 Minimal API modules using self-registering IModule + IEndpoint (reflection discovery) + hexagonal ports/adapters per module…
SkillAFreshness: A★ 171Claude Code +9 - 0.333score
dotnet-clean-architecture
fmflurry
Scaffolds and extends .NET 10 Minimal API modules using self-registering IModule + IEndpoint (reflection discovery) + hexagonal ports/adapters per module…
SkillAFreshness: A★ 171Claude Code +9
More from fmflurry
- 0.643score
why
fmflurry
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds.
SkillAFreshness: A★ 171Claude Code +9 - 0.643score
show-your-work
fmflurry
Keep a reviewable decision trail for long-running or unattended work: a TSV log with one row per decision (what, why, evidence, result).
SkillAFreshness: A★ 171Claude Code +9 - 0.643score
e2e
fmflurry
Resolve this project's browser end-to-end stack before /e2e or e2e-runner writes tests.
SkillAFreshness: A★ 171Claude Code +9 - 0.641score
verify-this
fmflurry
Verify a claim with fresh local evidence: restate it falsifiably, capture baseline and treatment, compare artifacts, and return VERIFIED, NOT VERIFIED, or…
SkillAFreshness: A★ 171Claude Code +9 - 0.640score
create-verification-skill
fmflurry
Use when creating or refreshing a project's verify-this override.
SkillAFreshness: A★ 171Claude Code +9 - 0.639score
codebase-exploration
fmflurry
Use when searching a repository, looking up symbols, callers, callees, or imports, and when deciding whether CodeMemory is on.
SkillAFreshness: A★ 171Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get dotnet-clean-architecture running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
dotnet-clean-architecture skill. Agent Mart. https://agentmart.dev/skills/fmflurry-dotnet-clean-architecture-a8885a (last updated 2026-10-24)