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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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.mdfor 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.
热度
- GitHub 星标
- 48k
- 排名
- #4277
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。