cqrs-command-generator

Generate CQRS commands, handlers, validators, and DTOs for .NET with MediatR and FluentValidation.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/hiiamsky/multi-agent-dev-team --skill cqrs-command-generator-hiiamsky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cqrs-command-generator
Source: https://github.com/hiiamsky/multi-agent-dev-team/tree/main/.github/skills/dotnet-cqrs-command
Command: npx skills add https://github.com/hiiamsky/multi-agent-dev-team --skill cqrs-command-generator-hiiamsky

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates boilerplate generation for CQRS commands, ensuring consistent structure and reducing manual repetitive coding across commands, validators, and handlers.

Core Features & Use Cases

  • Generates Create{Entity}, Update{Entity}, and Delete{Entity} command templates with corresponding Validators, Handlers, and optional Request DTOs.
  • Enforces Clean Architecture and MediatR-style ICommand patterns, enabling reliable error handling with Result.
  • Use Case: Quickly scaffold command layers when adding new domain features to accelerate delivery and maintain consistency.

Quick Start

Run the generator to scaffold a new Create{Entity}Command along with its Validator and Handler.

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 with MediatR and FluentValidation in .NET?

You can generate CQRS commands by scaffolding Create, Update, and Delete templates with corresponding Handlers, Validators, and DTOs. This targets .NET applications using MediatR and FluentValidation, enforcing immutable command records and per-command handlers across multiple domains.

What is the best way to automate Clean Architecture boilerplate for CQRS commands?

Automating Clean Architecture boilerplate involves generating command layers with handlers, validators, and optional request DTOs. This ensures consistent structure, follows MediatR-style ICommand patterns, and enables reliable error handling with Result across new domain features.

Does this CQRS command generator enforce immutable records and Unit of Work integration?

Yes, the CQRS command generator enforces immutable command records and per-command handlers. It also integrates with a Unit of Work for persistence, ensuring reliable data transactions and consistent Clean Architecture patterns across generated files.

Can I scaffold multiple domain features at once using MediatR command patterns?

Yes, you can scaffold command layers across multiple features and domains simultaneously. The generator produces Create, Update, and Delete command templates with MediatR-style ICommand patterns to accelerate delivery and maintain architectural consistency.

Why do I need a separate validator and handler for each CQRS command?

Separate validators and handlers for each CQRS command ensure consistent structure and reliable error handling with Result. This per-command design follows Clean Architecture patterns, reducing manual repetitive coding and maintaining strict separation of concerns.

What are the limitations of using generated CQRS commands for domain-driven design?

The generated CQRS commands are specifically tailored for .NET applications using MediatR and FluentValidation. They focus on Create, Update, and Delete operations with Unit of Work persistence, requiring adherence to these specific Clean Architecture patterns.