dabydat/alpha-omega/nestjs-cqrs-queries

Claude Code and agent skill by dabydat/alpha-omega

Trust tier 3
  • community
Source check pending

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-queries

SKILL.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

AspectQueryCommand
Intentread_file stateChange state
ReturnsDTOEntity or void
Side effectsNoneDomain events, cache, etc.
ConsistencyEventually consistent fineTransactional
OptimizationRead replicas, cachingWrite optimization
FailuresNotFoundExceptionDomainException

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 operations
  • nestjs-repository-pattern - Data access and query optimization
  • nestjs-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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dabydat/alpha-omega/nestjs-cqrs-queries/badge)](https://verified-skill.com/skills/dabydat/alpha-omega/nestjs-cqrs-queries)

Something wrong with this skill or its page? Tell us.