symfonycqrs-and-handlers
Implement CQRS pattern in Symfony with separate Command and Query handlers using Messenger component
When & Why to Use This Skill
This Claude skill automates the implementation of the Command Query Responsibility Segregation (CQRS) pattern within Symfony applications. By leveraging the Symfony Messenger component, it helps developers decouple read and write operations, ensuring a scalable, maintainable, and high-performance PHP architecture through dedicated command and query handlers.
Use Cases
- Refactoring Monolithic Controllers: Transition complex Symfony controllers into a decoupled architecture by separating business logic into discrete Command and Query handlers.
- Implementing Asynchronous Workflows: Use the Symfony Messenger component to handle heavy write operations asynchronously, improving user response times and system reliability.
- Standardizing Clean Architecture: Enforce consistent architectural patterns across large-scale Symfony projects to simplify code reviews and long-term maintenance.
- Optimizing Database Performance: Enable independent scaling of read and write models by isolating data retrieval logic from state-changing operations.
| name | symfony:cqrs-and-handlers |
|---|---|
| description | Use when symfony cqrs and handlers |
symfony:cqrs-and-handlers (Micro)
Use when
- Use when symfony cqrs and handlers
Rules
- Keep changes minimal and focused
- Ask before running servers/builds/tests
- Load reference/examples only on explicit request
References
reference.mddocs/complexity-tiers.md