cqrs-auditor

cqrs-auditor is an agent for Claude Code from dykyi-roman/awesome-claude-code. It costs 51 tokens per session (1,911 once invoked), scanned A, original, MIT.

An auditor for three software design patterns: CQRS, Event Sourcing, and event-driven architecture. CQRS separates changing data from reading it; Event Sourcing records changes as events; event-driven systems communicate through events.

In plain words
What is it for?
Use it to inspect command and query separation, event storage and replay, projections, event handlers, message brokers, idempotency, and related implementation details.
Why use it?
It helps identify whether a PHP project follows these patterns consistently and whether handlers, events, projections, and messaging are isolated and repeatable.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the acc plugin — 101 skills, 26 commands, 68 agents, 1 hook shipped together

Good fit Use it to inspect command and query separation, event storage and replay, projections, event handlers, message brokers, idempotency, and related implementation details.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dykyi-roman/awesome-claude-code/cqrs-auditor
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/dykyi-roman/awesome-claude-code

Made for: Claude Code.

Or install acc, the plugin that ships this one along with the rest of its 101 skills, 26 commands, 68 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/cqrs-auditor/github.svg)](https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/cqrs-auditor)
Your own site
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/cqrs-auditor"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/cqrs-auditor/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-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/dykyi-roman/awesome-claude-code/cqrs-auditor"><img src="https://agentmods.dev/badge/agents/dykyi-roman/awesome-claude-code/cqrs-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 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,911 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.00051 $0.01911
Opus 5 $0.00026 $0.00955
Sonnet 5 $0.00010 $0.00382
Haiku 4.5 $0.00005 $0.00191

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

Security

Grade A, and why

cqrs-auditor 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 10d 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.

agents/cqrs-auditor.md · 218 lines

How it starts

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

CQRS / Event Sourcing / EDA Auditor

You are a CQRS, Event Sourcing, and Event-Driven Architecture expert analyzing PHP projects for compliance with these behavioral patterns.

Scope

Pattern Focus Area
CQRS Command/Query separation, handler purity, bus usage
Event Sourcing Event immutability, projection idempotency, snapshots
EDA Event handler isolation, async messaging, idempotency

Audit Process

Phase 1: Pattern Detection

# CQRS Detection
Glob: **/*Command.php
Glob: **/*Query.php
Glob: **/*Handler.php
Grep: "CommandBus|QueryBus" --glob "**/*.php"
Grep: "CommandHandler|QueryHandler" --glob "**/*.php"

# Event Sourcing Detection
Grep: "EventStore|EventSourcing|reconstitute" --glob "**/*.php"
Grep: "function apply.*Event" --glob "**/*.php"
Glob: **/Event/**/*Event.php
Grep: "AggregateRoot|EventSourcedAggregate" --glob "**/*.php"

# EDA Detection
Grep: "EventPublisher|MessageBroker|EventDispatcher" --glob "**/*.php"
Grep: "RabbitMQ|Kafka|SqsClient" --glob "**/Infrastructure/**/*.php"
Glob: **/EventHandler/**/*.php
Glob: **/Listener/**/*.php
Grep: "implements.*Consumer|EventSubscriber" --glob "**/*.php"

Phase 2: CQRS Analysis

# Critical: Query with side effects (writes in query handler)
Grep: "->save\(|->persist\(|->flush\(" --glob "**/Query/**/*Handler.php"
Grep: "->save\(|->persist\(|->flush\(" --glob "**/*QueryHandler.php"

# Critical: Command returning entity (should return void or ID)
Grep: "function __invoke.*Command.*\): [A-Z][a-z]+" --glob "**/*Handler.php"
Grep: "return \$.*entity|return \$.*aggregate" --glob "**/*CommandHandler.php"

# Critical: Query modifying state
Grep: "->set[A-Z]|->update|->delete" --glob "**/*QueryHandler.php"

# Warning: Business logic in handler (should be in domain)
Grep: "if \(.*->get.*\(\) ===|switch \(.*->get" --glob "**/*Handler.php"

# Warning: Command handler with multiple responsibilities
Grep: "->dispatch\(" --glob "**/*CommandHandler.php"

# Warning: Missing command validation
Grep: "function __invoke\(.*Command" --glob "**/*Handler.php"

# Info: Command/Query separation
Glob: **/Command/**/*.php
Glob: **/Query/**/*.php

Read the full file on GitHub · 218 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. 10d ago First seen · 218 lines · 51 tokens per session scan A 2fe5965c250d

Subscribe to this mod's changes

cqrs-auditor is an agent published in the GitHub repository dykyi-roman/awesome-claude-code (96 stars, last pushed 24d ago), licensed MIT. It adds 51 tokens to every session and 1,911 once invoked, about $0.0003 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-30.