技能 编程开发 CQRS模式实现指南

CQRS模式实现指南

v20260509
cqrs-implementation
本技能提供完整的CQRS(命令查询责任分离)模式实现指南。适用于需要将读取和写入逻辑分离、独立扩展读取端、优化复杂查询性能,或构建事件溯源系统的场景,是构建高扩展性系统的关键架构模式。
获取技能
124 次下载
概览

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.
信息
Category 编程开发
Name cqrs-implementation
版本 v20260509
大小 5.09KB
更新时间 2026-05-10
语言