cqrs-specialist

cqrs-specialist is an agent for Claude Code from mnzralee/claude-multi-agent-architecture. It costs 41 tokens per session (1,103 once invoked), scanned A, original, MIT.

An agent for CQRS and event-driven systems. CQRS separates writing data from reading data, while event-driven systems pass changes through events that other parts of the system consume.

In plain words
What is it for?
Use it for outbox commands, message-broker integration, event projectors, idempotent handlers, and building databases or views optimised for reading.
Why use it?
It helps keep command handling, background delivery, event processing, and read-model updates reliable and separate.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Part of the claude-multi-agent-architecture plugin — 18 skills, 19 agents, 3 hooks shipped together

Good fit Use it for outbox commands, message-broker integration, event projectors, idempotent handlers, and building databases or views optimised for reading.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mnzralee/claude-multi-agent-architecture/cqrs-specialist
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/mnzralee/claude-multi-agent-architecture

Made for: Claude Code.

Or install claude-multi-agent-architecture, the plugin that ships this one along with the rest of its 18 skills, 19 agents, 3 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cqrs-specialist

README.md
[![agentmods](https://agentmods.dev/badge/agents/mnzralee/claude-multi-agent-architecture/cqrs-specialist/github.svg)](https://agentmods.dev/agents/mnzralee/claude-multi-agent-architecture/cqrs-specialist)
Your own site
<a href="https://agentmods.dev/agents/mnzralee/claude-multi-agent-architecture/cqrs-specialist"><img src="https://agentmods.dev/badge/agents/mnzralee/claude-multi-agent-architecture/cqrs-specialist/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cqrs-specialist

Your own site · 80×15
<a href="https://agentmods.dev/agents/mnzralee/claude-multi-agent-architecture/cqrs-specialist"><img src="https://agentmods.dev/badge/agents/mnzralee/claude-multi-agent-architecture/cqrs-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,103 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.01103
Opus 5 $0.00020 $0.00551
Sonnet 5 $0.00008 $0.00221
Haiku 4.5 $0.00004 $0.00110

Measured 11d ago against content hash 814e910cec67, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cqrs-specialist scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/cqrs-specialist.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CQRS Specialist Agent

Purpose

Specialist for the Command Query Responsibility Segregation pattern in event-driven systems. Handles outbox command handlers, projector event handlers, and the event-source-to-read-model flow. The discipline is stack-agnostic; examples below use TypeScript and Prisma as illustration only.

Key Knowledge

Architecture

HTTP Request -> Service Use Case -> OutboxCommand (PENDING) -> Primary Database
    | (polled by outbox worker)
outbox-worker -> enrichPayload() -> resolveAction() -> Downstream System / Message Broker
    | (event subscription / consumer)
projector -> handler.handle(eventName, payload, event) -> Read-Model Database

Outbox Command Handler Pattern

All handlers extend BaseCommandHandler:

class MyCommandHandler extends BaseCommandHandler {
  get commandTypes() { return ['COMMAND_TYPE']; }

  async resolveAction(payload) {
    // Return the downstream call descriptor: contract name, function name, args
    return { target: 'TargetService', action: 'ActionName', args: [...] };
  }

  async enrichPayload(payload) {
    // Pre-submission database lookups; mutate payload in place
  }

  async postCommitSideEffects(payload, result) {
    // CRITICAL: errors here must be caught and logged, never rethrown.
    // The downstream commit already happened; a thrown error here
    // would produce a false retry of a completed operation.
  }
}

Projector Handler Pattern

All handlers extend BaseEventHandler:

class MyEventHandler extends BaseEventHandler {
  get eventNames() { return ['EventName']; }

  async handle(eventName, payload, event) {
    // MANDATORY: idempotency check before any mutation
    if (await this.isTransactionAlreadyProcessed(event.transactionId)) return;

    // All read-model mutations inside a single transaction
    await this.db.$transaction(async (tx) => {
      // ... create / update read models
    });

    // AFTER the transaction succeeds, mark processed
    this.addToProcessedCache(event.transactionId);

    // Non-fatal side effects: notifications, WebSocket pushes
    try { await this.notify(...); } catch { /* log warn, do not rethrow */ }
  }
}

Read the full file on GitHub · 109 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 109 lines · 0 tokens per session scan A 814e910cec67

Subscribe to this mod's changes

cqrs-specialist is an agent published in the GitHub repository mnzralee/claude-multi-agent-architecture (6 stars, last pushed 1mo ago), licensed MIT. It adds 41 tokens to every session and 1,103 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

backend-connector

Expert Supabase integration that connects UI to real database securely. Delegate when: database connection, authentication, RLS policies, real-time features. Self-sufficient: analyzes existing code, generates schema from types, implements with security-first approach - all autonomously.

wasintoh/toh-framework · 56 tokens

messaging-cache

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for message brokers and caches (Redis/RabbitMQ/Kafka/NATS/MQTT/ActiveMQ/ZooKeeper) covering unauthenticated exposure, management APIs, and RCE-adjacent primitives.

ASCIT31/Dark-Moon · 56 tokens

supabase-architect

Projeta schema + RLS + topologia realtime antes da primeira migration. Entrega plano arquitetural (schema, RLS, realtime, branching). Use ao iniciar app Supabase. Não escreve código. (pesado).

luanpdd/kit-mcp · 50 tokens

evolution-go-integrator

Gera tabelas orgwhatsappconfigs + whatsappmessages, webhook Edge Function e send queue pgmq para WhatsApp (Evolution Go ou Meta Cloud API) em Supabase B2B multi-tenant. (pesado — despacha.

luanpdd/kit-mcp · 53 tokens

backend-architect

Design RESTful APIs, microservice boundaries, and database schemas. Reviews system architecture for scalability and performance bottlenecks. Use PROACTIVELY when creating new backend services or APIs.

einverne/dotfiles · 41 tokens

godmode-engineering

Senior Fullstack & Backend Engineer. Enforces Domain-Driven Design (DDD), Clean Architecture, TDD cycles, strict TypeScript/Python safety, and database best practices.

hybridlabor-api/bdb-dev-optimized-agent-skills · 40 tokens