跳到正文
Skillpedia
机器学习48k · #4555

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/event-sourcing-architect/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  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

  • 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.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4555
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能