event-sourcing-architect
它能做什么
这位专家可以帮你构建一种系统,把每一次变化都记录为一连串的事件。这对于追踪完整的操作历史,以及构建需要高度灵活性的复杂系统非常有用。
适用场景
- ✓当你需要完整记录系统中发生过的所有事情时。
- ✓当你要构建可能需要撤销或修正的复杂工作流程时。
- ✓如果你想查询某个东西在过去某个特定时间点的状态。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/event-sourcing-architect/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我该如何设置一个系统,把所有用户操作都记录为事件?”
每周 5 个新技能,1 分钟读完。
工作原理
它知道如何组织这些事件的存储方式,也知道如何创建“视图”,让数据随着事件的发生而自动更新。它还懂得如何管理多步骤流程。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
- Identify aggregate boundaries and event streams
- Design events as immutable facts
- Implement command handlers and event application
- Build projections for query requirements
- Design saga/process managers for cross-aggregate workflows
- Implement snapshotting for long-lived aggregates
- Set up event versioning strategy
Safety
- Treat committed events as immutable by default; approved privacy/retention/legal deletion requirements need a deliberate redaction/key-deletion/migration design and audit trail, not a blanket claim that events can never be deleted.
- Rebuild projections in staging before running in production.
Best Practices
- Events record domain assertions with version/provenance; corrections are new events by default, not proof that every recorded assertion was objectively true
- 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-*
Example
User request:
Build systems requiring complete audit trails.
Limitations
- Record actual aggregate concurrency/ordering guarantees, idempotency keys and projection lag; sagas compensate business effects but are not automatic rollback of every external action. Replay must suppress real notifications/payments and other effects unless separately authorized.
- Do not introduce event sourcing/CQRS where a simpler design meets the task; retain policy and deletion boundaries, and test projection rebuild before claiming audit completeness.
- 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.
常见问题
这里说的“事件”是什么意思?
它们是对某件已发生之事的记录,比如“用户X将商品Y加入购物车”。系统的状态正是基于这些记录重建的。
什么是 CQRS?
这是一种把“写入”数据(命令)和“读取”数据(查询)的任务分开的方法,这样可以让系统更快、更高效。
什么是“最终一致性”?
意思是数据可能需要一点时间才能在各处都更新完成,但最终所有地方都会显示正确的信息。
详情
作者的原始描述
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.
热度
- GitHub 星标
- 48k
- 排名
- #4555
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。