cqrs-query-generator

Generate CQRS read queries and DTOs with Dapper and parameterized SQL.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of CQRS read queries and DTOs by using Dapper for fast, no-tracking reads against a relational data store.

Core Features & Use Cases

  • Generate GetById, GetAll, GetPaged, Search, and Exists queries with dedicated handlers and response DTOs.
  • Use multi-mapping and lightweight SQL for performance and predictable data shapes.
  • Ideal for read-heavy applications needing consistent, typed query templates across features.

Quick Start

Provide the target entity name and fields, and the generator will emit ready-to-use CQRS query templates with DTOs and handlers.

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 with Dapper to bypass domain models?

You can generate CQRS read queries with Dapper by providing a target entity name and fields to produce ready-to-use query templates, DTOs, and handlers for fast, no-tracking reads against a relational data store.

What CQRS query patterns can I automate for read-heavy applications?

You can automate GetById, GetAll, GetPaged, Search, and Exists query patterns. The generator emits dedicated handlers, parameterized SQL, and response DTOs to ensure consistent, typed query templates across features.

Does this approach support multi-mapping for related detail queries in Dapper?

Yes, the generated queries use multi-mapping and lightweight SQL to handle related detail queries like Get{Entity}ById, ensuring predictable data shapes and performance for complex relational data access.

How do I standardize data access for paged queries and SQL connections?

You standardize data access by utilizing the included shared PagedList and ISqlConnectionFactory templates, which provide consistent paging structures and connection management across all generated CQRS read operations.

What is the best way to create typed response DTOs for Dapper read operations?

The best way to create typed response DTOs is to use an automated generator that maps parameterized SQL results directly to response DTOs, bypassing domain models for leaner and faster data access.

When should I not use Dapper for CQRS read queries over an ORM?

You should avoid using Dapper for CQRS read queries if your application requires heavy change tracking, complex object graph persistence, or if you prefer an ORM that abstracts raw SQL rather than executing lightweight, parameterized queries.