cqrs-command-generator

Generate CQRS commands, validators, and handlers for .NET applications.

69|13|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill cqrs-command-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cqrs-command-generator
Source: https://github.com/ronnythedev/dotnet-clean-architecture-skills/tree/main/sample/POS/.claude/skills/02-cqrs-command-generator
Command: npx skills add https://github.com/ronnythedev/dotnet-clean-architecture-skills --skill cqrs-command-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The CQRS scaffolding skill solves the problem of manually creating consistent Command, Validator, and Handler boilerplate for write operations in a Clean Architecture-style .NET application.

Core Features & Use Cases

  • Generates structured CQRS commands and corresponding validators, handlers, and optional request DTOs.
  • Provides templates for Create, Update, and Delete commands aligned with domain-driven patterns.
  • Use Case: When starting a new domain feature, run the generator to scaffold endpoints and ensure consistency across layers.

Quick Start

Use the cqrs-command-generator skill to scaffold a new CreateProduct command, including its Handler and Validator, in the application layer.

Frequently Asked Questions about cqrs-command-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate CQRS commands and validators in a .NET Clean Architecture project?

You can scaffold structured CQRS commands, validators, and handlers for Create, Update, and Delete operations in your .NET application. This standardizes write operations and aligns generated code with repository and unit-of-work patterns.

What is the best way to reduce boilerplate when creating MediatR commands?

The best way to reduce MediatR command boilerplate is auto-generating consistent Commands, Validators, and Handlers. This ensures structured alignment with domain-driven patterns and Result-based error handling without manual coding.

Does this CQRS scaffolding approach work with FluentValidation and MediatR?

Yes, this CQRS scaffolding approach works directly with FluentValidation and MediatR. It relies on both frameworks to automatically generate command structures and validate requests within Clean Architecture .NET applications.

Can I include request DTOs when scaffolding Create, Update, and Delete commands?

Yes, you can include optional request DTOs when scaffolding Create, Update, and Delete commands. The generator produces these DTOs alongside standard Validators and Handlers to manage write operations consistently.

Why standardize write operations with a CQRS command generator?

Standardizing write operations with a CQRS command generator solves the problem of manually creating inconsistent boilerplate. It provides consistent templates for write operations and ensures standard Result-based error handling across domain features.

When should I avoid auto-generating CQRS handlers and validators?

You should avoid auto-generating CQRS handlers and validators if your .NET project does not use Clean Architecture, MediatR, or FluentValidation. The generated code specifically depends on repository, unit-of-work, and Result-based error handling patterns.

Related Skills