query-generator

Generate CQRS query scaffolding with handlers, DTOs, and pagination for .NET projects.

4|1|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill query-generator
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: query-generator
Source: https://github.com/FaysilAlshareef/dotnet-ai-kit/tree/main/skills/cqrs/query-generator
Command: npx skills add https://github.com/FaysilAlshareef/dotnet-ai-kit --skill query-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generates consistent CQRS query scaffolding (queries, handlers, and DTOs) to accelerate domain-driven development in .NET projects.

Core Features & Use Cases

  • Generates a GetAll query with pagination support and a matching handler.
  • Generates a GetById query and its handler to fetch single entities.
  • Projects results to DTOs to avoid exposing domain entities and to enforce a stable API.

Quick Start

Provide the domain and the entity set to generate a full query scaffold including GetAll and GetById.

Frequently Asked Questions about query-generator

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

FAQPage Schema
How do I generate CQRS query scaffolding with handlers and DTOs in a .NET project?▼

To generate CQRS query scaffolding, provide your domain and entity set to automate the creation of type-safe query records, projection DTOs, and EF Core-ready handlers for GetAll and GetById retrieval.

What is the best way to scaffold pagination for GetAll queries using CQRS and EF Core?▼

Scaffolding pagination for GetAll queries is handled automatically by generating matching query handlers and projection DTOs that enforce a stable API while fetching paginated EF Core entity sets.

Can I use this to generate both GetById and GetAll queries for a Customers domain?▼

Yes, you can generate GetById and GetAll queries for domains like Customers by providing the specific entity set, which produces the full query scaffold including handlers and pagination.

Do I need to manually create DTOs to avoid exposing domain entities when scaffolding CQRS queries?▼

You do not need to manually create DTOs to avoid exposing domain entities because the scaffolding process automatically projects query results to DTOs to enforce a stable API.

Why scaffold DTOs and query handlers separately for CQRS domain-driven development?▼

Scaffolding DTOs and query handlers separately for CQRS accelerates domain-driven development in .NET by ensuring type-safe query records and EF Core-ready handlers without exposing domain entities.

Does the generated CQRS scaffold support EF Core directly across different domains like Orders?▼

The generated CQRS scaffold supports EF Core directly across domains like Orders by producing type-safe query records and EF Core-ready handlers for both GetAll and GetById retrieval.