home / skills / partme-ai / full-stack-skills / ddd-microservices
This skill guides designers and developers in applying domain-driven design to microservices, defining bounded contexts, service boundaries, and event-driven
npx playbooks add skill partme-ai/full-stack-skills --skill ddd-microservicesReview the files below or copy the command above to add this skill to your agents.
---
name: ddd-microservices
description: Provides comprehensive guidance for DDD in microservices including bounded contexts, service boundaries, event-driven architecture, and microservice patterns. Use when the user asks about DDD microservices, needs to design microservices with DDD, or implement microservice architectures.
license: Complete terms in LICENSE.txt
---
## When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
## How to use this skill
[待完善:根据具体工具添加使用指南]
## Best Practices
[待完善:根据具体工具添加最佳实践]
## Keywords
[待完善:根据具体工具添加关键词]
This skill provides practical, implementation-focused guidance for applying Domain-Driven Design (DDD) to microservice architectures. It covers identifying bounded contexts, defining service boundaries, designing domain events, and choosing appropriate microservice patterns. The guidance emphasizes maintainability, explicit APIs, and reliable event-driven integration across services.
The skill analyzes domain requirements and suggests bounded contexts and service boundaries aligned with single business responsibilities. It recommends patterns for communication (synchronous APIs, asynchronous events), data ownership, and consistency strategies (sagas, eventual consistency). It also provides practical implementation advice, such as event schema design, versioning, and deployment concerns for Python-based services.
How do I choose between synchronous and asynchronous communication?
Use synchronous calls for low-latency request/response needs and where strong consistency matters. Use asynchronous events to decouple services, improve resilience, and scale independently; handle eventual consistency with sagas or compensations.
When should I create a new microservice for a feature?
Create a new service when the feature represents a distinct business capability, has independent scaling or deployment needs, or would reduce cognitive load by isolating domain logic.
How do I manage data consistency across services?
Embrace eventual consistency. Use domain events to propagate state changes and adopt sagas or compensating actions for cross-service transactions. Ensure idempotency and durable retry for event handlers.