ddd-context-mapping
Map relationships between bounded contexts and define integration contracts using DDD context mapping patterns.
About this skill
This skill enables an AI agent to apply Domain-Driven Design (DDD) principles to effectively map relationships between different bounded contexts within a software system. It helps define clear integration contracts and communication strategies based on established DDD context mapping patterns like Conformist, Customer-Supplier, Shared Kernel, and Anti-Corruption Layers. By leveraging this skill, developers and architects can ensure proper domain separation, prevent domain leakage across service boundaries, and strategically plan for complex integrations or system migrations. Part of the 'antigravity-awesome-skills' collection, it enhances an agent's ability to facilitate architectural design discussions and document strategic DDD patterns.
Best use case
Defining integration patterns between distinct software components or microservices (bounded contexts). Preventing unwanted data or concept leakage across service boundaries to maintain domain integrity. Strategically planning for system migrations or integrations by identifying the need for Anti-Corruption Layers. Clarifying ownership and responsibilities for data and communication contracts between upstream and downstream services. Documenting existing or planned architectural relationships in a DDD-compliant manner.
Map relationships between bounded contexts and define integration contracts using DDD context mapping patterns.
A clear mapping of bounded contexts, illustrating their relationships (e.g., Customer-Supplier, Conformist, Shared Kernel, Anti-Corruption Layer). Defined integration contracts and communication strategies between contexts. Recommendations for applying specific DDD context mapping patterns to resolve integration challenges. Documentation that clarifies ownership, dependencies, and responsibilities across service boundaries.
Practical example
Example input
Map the following bounded contexts: Order Management, Customer Service, Inventory, Shipping. Order Management depends on Customer Service and Inventory. Shipping depends on Order Management. Identify appropriate DDD context mapping patterns for each interaction.
Example output
**Bounded Context Map Analysis:**
* **Order Management <-> Customer Service:**
* Relationship: Customer-Supplier (Customer Service is upstream, Order Management is downstream)
* Integration Contract: Shared customer ID, customer status. Order Management conforms to Customer Service's customer data model.
* Pattern Rationale: Customer Service is the authoritative source for customer data.
* **Order Management <-> Inventory:**
* Relationship: Conformist (Order Management conforms to Inventory's product data)
* Integration Contract: Product ID, quantity, availability. Order Management uses Inventory's API directly.
* Pattern Rationale: Inventory owns product availability; Order Management adapts.
* **Order Management <-> Shipping:**
* Relationship: Upstream-Downstream (Shipping is downstream, Order Management is upstream)
* Integration Contract: Shipment request details (order ID, address, items). Shipping provides status updates.
* Pattern Rationale: Shipping consumes fulfilled order information from Order Management. An Anti-Corruption Layer might be considered in Shipping to translate Order Management's complex order objects into simpler shipment requests.
* **Overall Recommendation:** Consider a Published Language pattern for core entities like 'Order' or 'Customer' if multiple downstream systems integrate.When to use this skill
- Defining integration patterns between bounded contexts.
- Preventing domain leakage across service boundaries.
- Planning anti-corruption layers during migration.
- Clarifying upstream and downstream ownership for contracts.
When not to use this skill
- You are working on a monolithic system with no external integrations or distinct bounded contexts.
- Your primary need is for internal class or module design within a single bounded context.
- You are selecting or evaluating cloud infrastructure tools (e.g., databases, message queues) without a focus on the logical domain relationships.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ddd-context-mapping/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ddd-context-mapping Compares
| Feature / Agent | ddd-context-mapping | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Map relationships between bounded contexts and define integration contracts using DDD context mapping patterns.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
SKILL.md Source
# DDD Context Mapping ## Use this skill when - Defining integration patterns between bounded contexts. - Preventing domain leakage across service boundaries. - Planning anti-corruption layers during migration. - Clarifying upstream and downstream ownership for contracts. ## Do not use this skill when - You have a single-context system with no integrations. - You only need internal class design. - You are selecting cloud infrastructure tooling. ## Instructions 1. List all context pairs and dependency direction. 2. Choose relationship patterns per pair. 3. Define translation rules and ownership boundaries. 4. Add failure modes, fallback behavior, and versioning policy. If detailed mapping structures are needed, open `references/context-map-patterns.md`. ## Output requirements - Relationship map for all context pairs - Contract ownership matrix - Translation and anti-corruption decisions - Known coupling risks and mitigation plan ## Examples ```text Use @ddd-context-mapping to define how Checkout integrates with Billing, Inventory, and Fraud contexts, including ACL and contract ownership. ``` ## Limitations - This skill does not replace API-level schema design. - It does not guarantee organizational alignment by itself. - It should be revisited when team ownership changes.
Related Skills
context7-auto-research
Automatically fetch latest library/framework documentation for Claude Code via Context7 API. Use when you need up-to-date documentation for libraries and frameworks or asking about React, Next.js, Prisma, or any other popular library.
n8n-expression-syntax
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
mermaid-expert
Create Mermaid diagrams for flowcharts, sequences, ERDs, and architectures. Masters syntax for all diagram types and styling.
mcp-builder-ms
Use this skill when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
makepad-deployment
CRITICAL: Use for Makepad packaging and deployment. Triggers on: deploy, package, APK, IPA, 打包, 部署, cargo-packager, cargo-makepad, WASM, Android, iOS, distribution, installer, .deb, .dmg, .nsis, GitHub Actions, CI, action, marketplace
macos-menubar-tuist-app
Build, refactor, or review SwiftUI macOS menubar apps that use Tuist.
kaizen
Guide for continuous improvement, error proofing, and standardization. Use this skill when the user wants to improve code quality, refactor, or discuss process improvements.
issues
Interact with GitHub issues - create, list, and view issues.
hugging-face-tool-builder
Your purpose is now is to create reusable command line scripts and utilities for using the Hugging Face API, allowing chaining, piping and intermediate processing where helpful. You can access the API directly, as well as use the hf command line tool.
git-pushing
Stage all changes, create a conventional commit, and push to the remote branch. Use when explicitly asks to push changes ("push this", "commit and push"), mentions saving work to remote ("save to github", "push to remote"), or completes a feature and wants to share it.
git-hooks-automation
Master Git hooks setup with Husky, lint-staged, pre-commit framework, and commitlint. Automate code quality gates, formatting, linting, and commit message enforcement before code reaches CI.
gh-review-requests
Fetch unread GitHub notifications for open PRs where review is requested from a specified team or opened by a team member. Use when asked to "find PRs I need to review", "show my review requests", "what needs my review", "fetch GitHub review requests", or "check team review queue".