cqrs-query-generator

Generate immutable CQRS query records, handlers, validators, and DTOs.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/gerardogarnica/aurora-flowboard-api --skill cqrs-query-generator-gerardogarnica
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cqrs-query-generator
Source: https://github.com/gerardogarnica/aurora-flowboard-api/tree/main/.claude/skills/cqrs-query-generator
Command: npx skills add https://github.com/gerardogarnica/aurora-flowboard-api --skill cqrs-query-generator-gerardogarnica

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires FluentValidation.

What problem does it solve?

Generating coherent CQRS query scaffolding manually is repetitive and error-prone. This skill creates immutable query records, corresponding handlers, validators, and Data Transfer Objects (DTOs) aligned with Clean Architecture, reducing boilerplate and ensuring consistency.

Core Features & Use Cases

  • Generates GetById, GetAll, GetPaged, and Exists query structures as immutable records.
  • Creates dedicated Handlers, internal Validators, and Response DTOs for each query.
  • Enforces Clean Architecture principles and uses a DbContext-backed data access model for query execution.

Quick Start

Provide your domain feature and entity name to generate a full CQRS query scaffold.

Frequently Asked Questions about cqrs-query-generator

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

FAQPage Schema
How do I generate CQRS query scaffolding for a Clean Architecture project?

Generating CQRS query scaffolding requires providing your domain feature and entity name to automatically create immutable query records, handlers, validators, and DTOs. This enforces Clean Architecture principles while reducing manual boilerplate and ensuring consistency across application features.

What read operations are supported when generating CQRS queries?

Supported CQRS read operations include GetById, GetAll, GetPaged, and Exists query structures. Each operation generates as an immutable record with a dedicated handler, internal validator, and response DTO for standard read models.

Does the generated CQRS query handler work with Entity Framework DbContext?

Yes, the generated CQRS query handlers use a DbContext-backed data access model for query execution. This integrates directly with your Entity Framework DbContext to retrieve data and map it to the corresponding response DTOs.

Do I need FluentValidation to use the generated CQRS queries?

Yes, FluentValidation is required because the generated CQRS queries include internal validators. This dependency ensures that query inputs are validated automatically before the handler executes the DbContext data access logic.

Why use immutable records for CQRS query objects?

Immutable records ensure thread safety and predictable state for CQRS query objects. This skill generates query structures as immutable records to align with Clean Architecture principles, preventing unintended side effects during handler execution and data retrieval.

What is the best way to scaffold DTOs and validators for CQRS read models?

Scaffolding DTOs and validators for CQRS read models is best handled by automating the generation of corresponding handlers and internal validators. This ensures standard read operations maintain consistent validation and data transfer structures across all features.