cqrs-query-generator

Generate CQRS read-side queries and handlers with Dapper for .NET 8+ projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides ready-to-use templates for generating CQRS read-side queries and their handlers, accelerating the creation of fast, read-optimized data access layers in .NET applications.

Core Features & Use Cases

  • Query Template Coverage: GetById, GetAll, GetPaged, Search, and Exists patterns with DTO responses.
  • Deterministic Code Generation: Produces consistent Get{Entity}ById, GetAll{Entities}, Get{Entities}Paged, and related query files ready to integrate.
  • Use Case: Quickly scaffold the read-model layer for a new feature area in a .NET 8+ project using Dapper for high-performance reads.

Quick Start

Use the cqrs-query-generator skill to scaffold read-side queries and handlers in your application, starting from a sample top-level feature.

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 read queries and handlers using Dapper in a .NET project?

To generate CQRS read queries, you scaffold query files and handlers using Dapper-based SQL. This produces deterministic GetById, GetAll, GetPaged, and existence checks with DTO-based responses for .NET 8+ applications.

What is the best way to scaffold a read-optimized data access layer for CQRS?

Scaffolding a read-optimized data access layer involves generating parameterized SQL and multi-mapping patterns with Dapper. This approach creates a clear, repeatable file layout for read-side queries and handlers to accelerate .NET feature development.

Does this CQRS query generation approach support pagination and existence checks?

Yes, CQRS query generation supports pagination and existence checks alongside GetById and GetAll patterns. It targets .NET 8+ projects and outputs parameterized SQL queries with DTO-based responses to ensure read-optimized data access.

Can I use Dapper multi-mapping patterns for DTO responses in my CQRS read model?

Yes, you can use Dapper multi-mapping patterns for DTO responses in your CQRS read model. The query generation process explicitly satisfies design requirements for parameterized SQL and multi-mapping to produce clear, deterministic read-side query files.

When do I need to generate separate query files for my CQRS read side?

You need to generate separate query files when scaffolding a new feature area in a .NET 8+ project. This provides a clear, repeatable file layout for read-optimized queries and handlers, ensuring fast data access using Dapper-based SQL.

Related Skills