implement-cqrs

Implement CQRS command and query handlers in Firefly Framework services.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/fireflyframework/fireflyframework-claude-skills --skill implement-cqrs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: implement-cqrs
Source: https://github.com/fireflyframework/fireflyframework-claude-skills/tree/main/skills/implement-cqrs
Command: npx skills add https://github.com/fireflyframework/fireflyframework-claude-skills --skill implement-cqrs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides developers on implementing command and query handlers in a Firefly Framework service, covering bus wiring, authorization, validation, caching, and reactive patterns.

Core Features & Use Cases

  • Standardized CQRS components: defining Command/Query, their handlers, and the wiring to CommandBus and QueryBus with consistent validation and authorization.
  • End-to-end workflows: examples showing creation and retrieval operations, with support for caching, context propagation, and domain-event publishing.
  • Context and automation: built-in ExecutionContext, correlation IDs, and optional fluent APIs to reduce boilerplate.

Quick Start

Define a sample command and its handler to perform a state-changing operation, a matching query and its handler to read data, and trigger both through their respective buses.

Frequently Asked Questions about implement-cqrs

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

FAQPage Schema
How do I implement CQRS in a Firefly Framework service?▼

You implement CQRS by defining Command and Query objects with their respective Handlers, then wiring them to the CommandBus and QueryBus to execute state-changing and read operations.

What is the best way to separate command and query handlers in Firefly?▼

The best way to separate handlers is by defining distinct CommandHandler and QueryHandler components, issuing state-changing requests via the CommandBus and retrieving data via the QueryBus.

Can I integrate validation and authorization into Firefly command handlers?▼

Yes, Firefly command handlers support built-in validation and authorization rules to secure operations before state changes execute.

Does Firefly CQRS support caching and domain event publishing?▼

Yes, Firefly CQRS supports optional query caching and domain event publishing to propagate state changes across service boundaries.

How does context propagation work with Firefly CommandBus and QueryBus?▼

Context propagation leverages built-in ExecutionContext and correlation IDs across CommandBus and QueryBus operations to maintain contextual data automatically.

When should I use the CQRS pattern in my Firefly backend?▼

Use the CQRS pattern when you need to scale complex domain models independently, separating write operations from read operations to optimize caching and event publishing.