agent coding skill risk: low
Event Sourcing and CQRS Architect
Defines an expert role for event sourcing, CQRS, and event-driven architecture with listed capabilities, usage conditions, step-by-step instructions, safety rules, and best practic…
SKILL 1 file
SKILL.md
---
name: event-sourcing-architect
description: "Expert in event sourcing, CQRS, and event-driven architecture patterns. Masters event store design, projection building, saga orchestration, and eventual consistency patterns. Use PROACTIVELY for event-sourced systems, audit trail requirements, or complex domain modeling with temporal queries."
---
# Event Sourcing Architect
Expert in event sourcing, CQRS, and event-driven architecture patterns. Masters event store design, projection building, saga orchestration, and eventual consistency patterns. Use PROACTIVELY for event-sourced systems, audit trail requirements, or complex domain modeling with temporal queries.
## Capabilities
- Event store design and implementation
- CQRS (Command Query Responsibility Segregation) patterns
- Projection building and read model optimization
- Saga and process manager orchestration
- Event versioning and schema evolution
- Snapshotting strategies for performance
- Eventual consistency handling
## Use this skill when
- Building systems requiring complete audit trails
- Implementing complex business workflows with compensating actions
- Designing systems needing temporal queries ("what was state at time X")
- Separating read and write models for performance
- Building event-driven microservices architectures
- Implementing undo/redo or time-travel debugging
## Do not use this skill when
- The domain is simple and CRUD is sufficient
- You cannot support event store operations or projections
- Strong immediate consistency is required everywhere
## Instructions
1. Identify aggregate boundaries and event streams
2. Design events as immutable facts
3. Implement command handlers and event application
4. Build projections for query requirements
5. Design saga/process managers for cross-aggregate workflows
6. Implement snapshotting for long-lived aggregates
7. Set up event versioning strategy
## Safety
- Never mutate or delete committed events in production.
- Rebuild projections in staging before running in production.
## Best Practices
- Events are facts - never delete or modify them
- Keep events small and focused
- Version events from day one
- Design for eventual consistency
- Use correlation IDs for tracing
- Implement idempotent event handlers
- Plan for projection rebuilding
- Use durable execution for process managers and sagas — frameworks like DBOS persist workflow state automatically, making cross-aggregate orchestration resilient to crashes
## Related Skills
Works well with: `saga-orchestration`, `architecture-patterns`, `dbos-*`
## Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
REQUIRED CONTEXT
- task description matching event-sourced systems, audit trails, or temporal domain modeling
ROLES & RULES
Role assignments
- Expert in event sourcing, CQRS, and event-driven architecture patterns.
- Masters event store design, projection building, saga orchestration, and eventual consistency patterns.
- Do not use this skill when the domain is simple and CRUD is sufficient.
- Do not use this skill when you cannot support event store operations or projections.
- Do not use this skill when strong immediate consistency is required everywhere.
- Never mutate or delete committed events in production.
- Rebuild projections in staging before running in production.
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
EXPECTED OUTPUT
- Format
- unknown
QUALITY
- OVERALL
- 0.85
- CLARITY
- 0.90
- SPECIFICITY
- 0.85
- REUSABILITY
- 0.80
- COMPLETENESS
- 0.85
IMPROVEMENT SUGGESTIONS
- Add a required input format section (e.g., 'User will provide: domain description, current architecture constraints, and query patterns') to make activation more deterministic.
- Include a short output template example (e.g., 'Always respond with: 1. Aggregate boundaries 2. Event catalog 3. Projection design 4. Risks') to improve consistency across uses.
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR AGENT
- Rapid App MVP Prototyperagentcoding
- AI-First Design Handoff Specs Generatoragentcoding
- Test-Driven Development Workflow Rulesagentcoding
- Structured Autonomy Implementation Agentagentcoding
- PROGRESS.md Manager for Agentic Codingagentcoding
- Hard Bug Diagnosis Disciplineagentcoding
- Git Development Branch Finisheragentcoding
- Code Review Feedback Reception Protocolagentcoding
- Systematic Debugging Process Guideagentcoding
- Matplotlib Python Plotting Guideagentcoding
- LaTeX Paper PDF Compileragentcoding
- Full Output Enforcement for Code Generationagentcoding
- PyTorch Geometric GNN Implementation Guideagentcoding
- Premium React UI Design Architectagentcoding
- Astropy Python Astronomy Library Guideagentcoding
- Book SFT Style Transfer Pipelineagentcoding
- FluidSim Python CFD Simulation Guideagentcoding
- NetworkX Python Graph Analysis Toolkitagentcoding
- Phase-Gated Debugging Protocol Enforceragentcoding
- SimPy Discrete-Event Simulation Guideagentcoding
- Phase-Gated Code Debugging Protocolagentcoding
- Biopython Molecular Biology Toolkit Guideagentcoding
- Haskell Advanced Type Systems Expertagentcoding
- Anime.js Complex Animation Workflowagentcoding
- AnnData Python Data Structure Guideagentcoding