golang-ddd-cqrs
Golang DDD CQRS
Use this skill to split application logic into clear commands and queries without turning Go code into ceremony-heavy enterprise scaffolding.
Start Here
- Use CQRS when a service has meaningful write-side behavior, mixed read and write models, or application services that are hard to reason about.
- Skip or minimize CQRS when the service is mostly simple CRUD or login-like flows with little business behavior.
Workflow
- Split the use cases into writes and reads.
- Commands mutate state and may return errors.
- Queries return data and should not perform business mutations.
- Name them in business language.
- Prefer
ScheduleTraining,CancelTraining,ApproveReschedule,AvailableHours. - Avoid default CRUD names unless the business really speaks that way.
More from joeyave/golang-ddd-skills
golang-ddd-architecture
Design and refactor Go service architecture for DDD-style systems. Use when a Go codebase needs explicit ports/app/domain/adapters boundaries, dependency rules, interface placement, composition-root dependency injection, separate transport and database models, or help deciding whether DDD, Clean Architecture, or CQRS are justified.
13golang-ddd-refactor
Refactor existing Go code toward a behavior-first, invariant-protecting domain model. Use when business rules live in handlers or repositories, shared structs couple DB and API models, entities expose setters or mutable public fields, or a service needs domain methods, constructors, private state, repository update closures, and focused domain tests.
12golang-ddd
Entry-point router for Go architecture and refactoring tasks focused on DDD-style services. Use when working on a Go service and you want one skill to decide whether the task is primarily about architecture boundaries, domain-first refactoring, pragmatic CQRS, or delivery and test support. This skill should select one or more companion skills and apply them in the right order.
10golang-ddd-infrastructure
Support Go services by keeping infrastructure, security boundaries, and automated tests aligned with the application architecture. Use when working on Terraform, Cloud Run, Cloud Build or CI, docker-compose environments, integration or component test setup, repository authorization boundaries, service-to-service authentication, or secure internal operations.
10