跳到正文
Skillpedia
API 与服务器(后端)48k · #4277

cqrs-implementation

它能做什么

这个工具可以帮你梳理计算机系统处理信息的方式。它把数据的“写入”操作和“读取”操作分开,使系统更快、更易维护,尤其是在数据量大或同时有很多人使用时。

适用场景

  • ✓当你希望系统能够非常快速地回答问题时。
  • ✓当你的系统需要同时处理大量新增数据和大量查询时。
  • ✓当你要构建一个把每次变更都记录为事件的系统时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/cqrs-implementation/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

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

可以这样问 AI

“我怎样组织我的系统,才能更快地回答用户的问题?”

每周 5 个新技能,1 分钟读完。

工作原理

它的做法是把任务拆成两部分:一部分负责接收和保存新信息(命令),另一部分负责检索和展示已有信息(查询)。这样每一部分都可以单独优化。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

CQRS Implementation

Comprehensive guide to implementing CQRS (Command Query Responsibility Segregation) patterns.

Use this skill when

  • Separating read and write concerns
  • Scaling reads independently from writes
  • Building event-sourced systems
  • Optimizing complex query scenarios
  • Different read/write data models are needed
  • High-performance reporting is required

Do not use this skill when

  • The domain is simple and CRUD is sufficient
  • You cannot operate separate read/write models
  • Strong immediate consistency is required everywhere

Instructions

  • Identify read/write workloads and consistency needs.
  • Define command and query models with clear boundaries.
  • Implement read model projections and synchronization.
  • Validate performance, recovery, and failure modes.
  • If detailed patterns are required, open resources/implementation-playbook.md.

Resources

  • resources/implementation-playbook.md for detailed CQRS patterns and templates.

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.
常见问题

什么是 CQRS?

CQRS 是“Command Query Responsibility Segregation”(命令查询职责分离)的缩写,是一种组织计算机系统的方式。

什么时候不应该使用它?

如果你的系统很简单,如果读写部分无法分开,或者你需要所有地方的数据都能即时更新,就不要使用它。

在哪里可以找到更多细节?

更详细的模式和模板可以参考 'resources/implementation-playbook.md' 文件。

详情

作者的原始描述

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

repo: sickn33/agentic-awesome-skills

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能