dabydat/alpha-omega/nestjs-cqrs-queries
Claude Code and agent skill by dabydat/alpha-omega
- community
Checking that the SKILL.md file is still in the repository.
CQRS Query patterns for NestJS. Covers query definitions, query handlers, pagination, parallel execution, and read operation patterns. Use when implementing read operations, query handlers, list endpoints, or any read-side CQRS patterns.
Install
npx vskill@latest install dabydat/alpha-omega/nestjs-cqrs-queriesSKILL.md
NestJS CQRS Queries
Queries are read operations in CQRS. They don't modify state; they return data. Unlike commands, queries are side-effect free and can be optimized separately from writes.
Production patterns for: Query handlers, pagination, read optimization, parallel data fetching
Agent collaboration: Backend Dev (no side effects, return DTOs), DBA (index design, query optimization)
Core Principle: Queries Don't Change State
See references/why-queries.md for the commands-vs-queries rule, the ❌ BAD same-model example, and the ✅ GOOD separate read/write example.
Query Definition
See references/query-definition.md for GetEntityByIdQuery and GetEntitiesPaginatedQuery.
Query Response DTOs
See references/response-dtos.md for the three response types (simple, detail, paginated).
Search and Count Query
See references/search-count-query.md for the SearchEntitiesHandler and CountEntitiesHandler.
Module Registration
See references/module-registration.md for the QueryHandlers array and EntityModule.
Anti-Patterns to Avoid
See references/anti-patterns.md for the three ❌ examples (domain model return, business logic in query, no pagination).
Summary: Query vs Command
| Aspect | Query | Command | |
|---|---|---|---|
| Intent | read_file state | Change state | |
| Returns | DTO | Entity or void | |
| Side effects | None | Domain events, cache, etc. | |
| Consistency | Eventually consistent fine | Transactional | |
| Optimization | Read replicas, caching | Write optimization | |
| Failures | NotFoundException | DomainException |
Golden rule: Queries are side-effect free. They read data and return DTOs. Any modification should be a command.
Related Skills
nestjs-cqrs-commands- Command patterns and write operationsnestjs-repository-pattern- Data access and query optimizationnestjs-ddd-patterns- Domain-driven design with CQRS
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/nestjs/nestjs-cqrs-queries/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-cqrs-queries)