cqrs-command

Create CQRS Command, Result, and Handler files for .NET backend CRUD operations.

7|1|Updated Jun 17, 2021
One-click install
npx skills add https://github.com/duc01226/EasyPlatform --skill cqrs-command
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cqrs-command
Source: https://github.com/duc01226/EasyPlatform/tree/main/.claude/skills/backend-cqrs-command
Command: npx skills add https://github.com/duc01226/EasyPlatform --skill cqrs-command

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps create a CQRS command, its result, and a unified handler in a single file pattern for .NET applications.

Core Features & Use Cases

  • Single-file command, result, and handler
  • Async validation and optional file upload
  • CRUD operation with side effects and error handling

Quick Start

Create a SaveProductCommand for creating or updating a product and its handler in one file.

Frequently Asked Questions about cqrs-command

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

FAQPage Schema
How do I create CQRS commands and handlers for CRUD operations in .NET?

CQRS commands separate read and write logic. This Skill creates command, result, and handler in a single file for Save/Create/Update/Delete operations, scaffolding them under Application/UseCaseCommands with built-in validation, repository access, and audit support via RequestContext.UserId().

What validation patterns does a .NET CQRS command handler support?

Handlers enforce fluent validation patterns and optional async validation within the handler itself. The Skill generates command structure that integrates DDD principles, ensuring validation runs before persistence and side effects are applied.

Can I include file uploads in a CQRS command?

Yes, this Skill supports optional file uploads within command handlers. The generated single-file pattern accommodates file processing alongside DTO-to-entity mapping and validation in the same handler flow.

How do I map DTOs to entities in a CQRS handler?

The handler template includes DTO-to-entity mapping as part of the generated command processing. This integrates with repository access patterns and ensures the mapped entity persists with audit information attached.

Does this Skill enforce the no side effects rule for commands?

Yes. The Skill enforces the No Side Effects rule by design, ensuring command handlers execute only the intended write operation and maintain consistency with CQRS principles.

What file structure does the command scaffold create?

Commands scaffold under {Service}.Application/UseCaseCommands/{Feature}/ as single files. Each file contains the command class, result class, and handler in one unified structure, reducing boilerplate while maintaining separation of concerns.