cqrs-event-projection-basics
Applies practical CQRS and event projection fundamentals in TypeScript systems by separating write and read concerns with deterministic projections. Use when read models diverge from write workflows or event-driven views are needed.
Best use case
cqrs-event-projection-basics is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Applies practical CQRS and event projection fundamentals in TypeScript systems by separating write and read concerns with deterministic projections. Use when read models diverge from write workflows or event-driven views are needed.
Teams using cqrs-event-projection-basics should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/cqrs-event-projection-basics/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How cqrs-event-projection-basics Compares
| Feature / Agent | cqrs-event-projection-basics | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Applies practical CQRS and event projection fundamentals in TypeScript systems by separating write and read concerns with deterministic projections. Use when read models diverge from write workflows or event-driven views are needed.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# CQRS + Event Projection Basics ## Rule Anchor - `AGENTS.md` > "Execution Safety" ## Use This Skill When - Read queries and write commands have different shapes and scaling needs. - You need projection-based views from event streams. - Event-driven workflows require deterministic read models. ## Core Principles 1. Commands mutate state, queries read optimized views. 2. Events are immutable facts emitted after successful command handling. 3. Projections update read models incrementally from events. 4. Projection logic must be deterministic and idempotent by design. ## Workflow 1. Define command contracts and validation rules. 2. Define emitted event names and payload contracts. 3. Build projection handlers per event name. 4. Maintain projection checkpoints (e.g., sequenceId). 5. Rebuild read models from event logs when required. ## Projection Handler Rules - Handle one event contract at a time. - Avoid hidden state inference from IDs or naming conventions. - Use explicit payload fields only. - Fail fast on contract violations. ## Checklist - [ ] Command and query models are separated. - [ ] Event schemas are explicit and version-aware. - [ ] Projection updates are deterministic. - [ ] Replay from checkpoint produces identical read state. - [ ] Observability exists for processed/failed event counts. ## Anti-Patterns - Querying write models directly for all reads. - Projections that depend on runtime global mutable state. - Silent fallback behavior on malformed events.
Related Skills
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
vitest-testing-strategy
Defines a practical testing strategy for TypeScript and JavaScript using Vitest across unit, integration, and type-level tests. Use when adding features, refactoring, or preventing regressions with fast feedback loops.
version-management
All packages must have the same version. Use changesets for coordinated version bumps. Never version packages independently.
vercel-react-native-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
vercel-composition-patterns
React composition patterns that scale. Use when refactoring components with boolean prop proliferation, building flexible component libraries, or designing reusable APIs. Triggers on tasks involving compound components, render props, context providers, or component architecture. Includes React 19 API changes.
user-request-gate
Use immediately when the user requests any implementation, code change, feature addition, fix, or modification. Gates code writing behind a backlog draft document. Read-only exploration is always permitted.
type-boundary-and-ssot
Applies Robota's preferred workflow for trust-boundary validation, strict typing, quality gates, and owner-based SSOT reuse. Use when adding or reviewing type contracts, boundary parsing, shared contract ownership, or running quality checks.
tdd-red-green-refactor
Kent Beck's TDD workflow. Use when writing new code or modifying existing behavior. Enforces the Red-Green-Refactor cycle with small, verifiable steps.
task-tracking
Track work using task files in .agents/tasks/. Use when starting, progressing, or completing a task to maintain a persistent record of work.
tailwind-truncation
Provide Tailwind truncation patterns for single-line and multi-line text. Use when discussing text ellipsis, truncation, or line-clamp usage.
state-machine-design
Designs finite state machines as pure, declarative transition tables with guards and actions. Use when modeling lifecycle states, status flows, or any system with discrete states and controlled transitions.