dotnet-clean-architecture
БесплатноБез исполняемых скриптовНе проверенScaffolds and extends .NET 10 Minimal API modules using self-registering IModule + IEndpoint (reflection discovery) + hexagonal ports/adapters per module…
от fmflurry★ 173 звезды на GitHubОб этом скилле
.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 and 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
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/
│ │ │
Установить dotnet-clean-architecture в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dotnet-clean-architecture?
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.
Как установить скилл dotnet-clean-architecture?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dotnet-clean-architecture запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic