dotnet-clean-architecture-skills

skill
Security Audit
Warn
Health Warn
  • No license — Repository has no license file
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 48 GitHub stars
Code Pass
  • Code scan — Scanned 5 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested
Purpose
This tool provides a collection of 27 AI-ready prompt templates and skill files designed to teach AI coding assistants how to generate production-grade .NET code following Clean Architecture, CQRS, and DDD patterns.

Security Assessment
The overall risk is Low. The code scan checked 5 files and found no dangerous patterns, hardcoded secrets, or requests for dangerous system permissions. Because this tool is fundamentally a set of text-based instructions and templates for AI assistants, it does not natively execute shell commands, make external network requests, or access sensitive data. Users should simply be aware that the code ultimately generated by their AI assistant will still require their own standard security review, especially regarding the provided JWT and authentication templates.

Quality Assessment
The project is actively maintained, with its most recent push occurring today. It enjoys a healthy level of community trust, evidenced by 48 GitHub stars, and the repository includes a clear description of its capabilities. However, the repository currently lacks a formal open-source license. While this does not impact the operational security of the tool, it technically means the author retains all exclusive rights, which might be a concern for strict corporate environments looking to legally adopt and redistribute the generated patterns.

Verdict
Safe to use, though corporate users should note the missing license before heavily integrating the unlicensed templates into proprietary commercial workflows.
SUMMARY

27 AI-ready skills for generating production-grade .NET code — Clean Architecture, CQRS, DDD. Works with Claude Code, GitHub Copilot, and Cursor.

README.md

.NET Clean Architecture Skills

27 AI-ready skills that teach your coding assistant how to generate production-grade .NET code — Clean Architecture, CQRS, DDD — without explaining the patterns every time.

Works with: Claude Code | GitHub Copilot | Cursor

Before (plain prompt)

"Create a Product entity with name, price, and category"

Your assistant generates a basic class with public setters, no validation, no events, inconsistent patterns.

After (with skills installed)

"Using skill 04-domain-entity-generator, create a Product aggregate root with Name (required, max 200), Price (positive decimal), and a CategoryId foreign key"

Your assistant generates a proper DDD entity with private setters, a Create() factory method, domain events, typed errors, and a repository interface — matching the patterns already in your codebase.

Get started in 30 seconds

# Clone into your project (Claude Code + Copilot)
git clone https://github.com/ronnydelgado/dotnet-clean-architecture-skills.git

# Or copy all skills globally (Claude Code)
cp -r skills/* ~/.claude/skills/

Then follow Recipe 0: Scaffold a New Project or jump to Recipe 1: Add a CRUD Feature if you already have a solution.


Skills Index

Core Architecture Skills

# Skill Description Key Templates
1 dotnet-clean-architecture Project scaffolding Solution structure, layer setup, DI configuration
2 cqrs-command-generator Write operations Commands, Handlers, Validators
3 cqrs-query-generator Read operations Queries, Dapper SQL, Response DTOs
4 domain-entity-generator Domain modeling Entities, Value Objects, Factory methods
5 repository-pattern Data access abstraction Repository interfaces, EF Core implementations
6 ef-core-configuration Database mapping Fluent API, Relationships, Indexes
7.1 legacy-api-controllers REST API controllers Controllers, Authorization, Versioning
7.2 minimal-api-endpoints Minimal API endpoints MapGet/MapPost, Filters, Versioning
8 result-pattern Error handling Result, Result, Error types
9 domain-events-generator Event-driven design Domain Events, Handlers, Outbox pattern
10 pipeline-behaviors Cross-cutting concerns Logging, Validation, Transaction behaviors

Validation Skills

# Skill Description Key Templates
11 fluent-validation Input validation AbstractValidator, Custom validators, Async validation

Security Skills

# Skill Description Key Templates
12 jwt-authentication JWT Bearer auth JwtService, Token validation, Refresh tokens
13 permission-authorization Permission-based access HasPermission attribute, Policy provider

Infrastructure Skills

# Skill Description Key Templates
14 outbox-pattern Reliable messaging OutboxMessage, Processor job, Idempotency
15 quartz-background-jobs Scheduled jobs IJob, Cron scheduling, Job configuration
16.1 email-service-sendgrid Email integration IEmailService, SendGrid, Templates
16.2 email-service-aws-ses Email integration IEmailService, AWS SES, Local Templates
17 health-checks Dependency monitoring PostgreSQL, HTTP, Custom checks
18 audit-trail Change tracking IAuditable, EF interceptor, Soft delete

Data Access Skills

# Skill Description Key Templates
19 dapper-query-builder Optimized reads Multi-mapping, Pagination, CTEs
20 specification-pattern Query encapsulation ISpecification, Composable queries

Testing Skills

# Skill Description Key Templates
21 unit-testing Unit tests xUnit, NSubstitute, FluentAssertions
22 integration-testing Integration tests WebApplicationFactory, Testcontainers, Respawn

Cross-Cutting Skills

# Skill Description Key Templates
23 logging-configuration Structured logging Serilog, ILogger, Log enrichment
24 rate-limiting API protection Fixed/Sliding window, Token bucket, Concurrency

Database Skills

# Skill Description Key Templates
25.1 postgresql-best-practices PostgreSQL optimization Naming, Indexing, xmin concurrency, Extensions
25.2 sqlserver-best-practices SQL Server optimization Naming, Indexing, rowversion, Temporal tables
26 options-pattern Typed configuration IOptions, IOptionsSnapshot, IOptionsMonitor, Validation

Recipes — Where to Start

Skills are building blocks. Recipes show you which skills to combine and in what order for common tasks.

Recipe What You Get
Scaffold a New Project Complete solution structure with logging, health checks, and audit trail
Add a CRUD Feature Entity + commands + queries + validation + API — the most common workflow
Add JWT Authentication JWT tokens, refresh tokens, and permission-based authorization
Add Background Processing Domain events with Outbox pattern and Quartz scheduled jobs
Add Email Notifications Transactional emails triggered by domain events
Add Testing Unit tests with NSubstitute + integration tests with Testcontainers

New project? Start with Recipe 0, then Recipe 1. Everything else is optional and independent.

See the full Recipes guide for the suggested order and dependency tree.


Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│                          API Layer                               │
│  • Controllers (api-controller-generator)                        │
│  • Request/Response DTOs                                         │
│  • Middleware                                                    │
│  • Authentication (jwt-authentication)                           │
│  • Authorization (permission-authorization)                      │
├─────────────────────────────────────────────────────────────────┤
│                      Application Layer                           │
│  • Commands (cqrs-command-generator)                             │
│  • Queries (cqrs-query-generator)                                │
│  • Validators (fluent-validation)                                │
│  • Pipeline Behaviors (pipeline-behaviors)                       │
│  • Event Handlers (domain-events-generator)                      │
├─────────────────────────────────────────────────────────────────┤
│                    Infrastructure Layer                          │
│  • Repositories (repository-pattern)                             │
│  • EF Core Configurations (ef-core-configuration)                │
│  • Dapper Queries (dapper-query-builder)                         │
│  • Outbox Pattern (outbox-pattern)                               │
│  • Background Jobs (quartz-background-jobs)                      │
│  • Email Service (email-service)                                 │
│  • Audit Trail (audit-trail)                                     │
│  • Health Checks (health-checks)                                 │
├─────────────────────────────────────────────────────────────────┤
│                       Domain Layer                               │
│  • Entities (domain-entity-generator)                            │
│  • Value Objects (domain-entity-generator)                       │
│  • Domain Events (domain-events-generator)                       │
│  • Result Pattern (result-pattern)                               │
│  • Specifications (specification-pattern)                        │
└─────────────────────────────────────────────────────────────────┘

Technology Stack

Technology Version Purpose
.NET 8+ Framework
MediatR 12+ CQRS implementation
FluentValidation 11+ Request validation
Entity Framework Core 8+ ORM (write side)
Dapper 2+ Micro ORM (read side)
PostgreSQL 15+ Database
SQL Server 2019+ Database
Quartz.NET 3+ Background jobs
Serilog 3+ Logging
xUnit 2.6+ Testing framework
NSubstitute 5+ Mocking
Testcontainers 3+ Integration testing

Installation

Option 1: Clone the repo (works with both Claude Code and GitHub Copilot)

git clone https://github.com/ronnydelgado/dotnet-clean-architecture-skills.git

The repo structure works out of the box for both tools:

  • GitHub Copilot reads skills from skills/ at the repo root.
  • Claude Code reads skills from .claude/skills/, which is a symlink to skills/.

Windows note: Git symlinks require either Developer Mode enabled or running Git as administrator. If symlinks don't resolve, run git config core.symlinks true and re-clone.

Option 2: Copy individual skills into your project

Pick the skills you need and copy them into the appropriate location for your tool:

Claude Code:

# Copy a single skill
cp -r skills/01-dotnet-clean-architecture your-project/.claude/skills/

# Or copy all skills
cp -r skills/* your-project/.claude/skills/

GitHub Copilot:

# Copy a single skill
cp -r skills/01-dotnet-clean-architecture your-project/skills/

# Or copy all skills
cp -r skills/* your-project/skills/

Option 3: Install globally for Claude Code

Make skills available across all your projects:

cp -r skills/* ~/.claude/skills/

Using the skills

Once installed, ask Claude to apply the patterns to your specific use case. Each skill contains:

  • Overview and purpose
  • Quick reference table
  • Complete code templates
  • Usage examples
  • Best practices
  • Anti-patterns to avoid
  • Related skills

Credits

Skills 25.1 (postgresql-best-practices) and 26 (options-pattern) were inspired by johnpuksta/clean-architecture-agents, a fork that extends this collection with a multi-agent orchestration system.


Have suggestions or want to contribute? Open an issue or PR on GitHub. Let's make .NET Clean Architecture accessible to everyone.

Reviews (0)

No results found