ddd-context-mapping

Identify context pairs and document relationship directions with mapping patterns.

1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/caobingsheng/skills --skill ddd-context-mapping-caobingsheng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd-context-mapping
Source: https://github.com/caobingsheng/skills/tree/main/ddd/ddd-context-mapping
Command: npx skills add https://github.com/caobingsheng/skills --skill ddd-context-mapping-caobingsheng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Maps relationships between bounded contexts and defines robust integration contracts to minimize domain leakage during migrations.

Core Features & Use Cases

  • Context mapping patterns to relate upstream and downstream contexts and choose applicable relationship types (for example Anti-Corruption Layer, Open Host Service, Published Language, or Customer-Supplier).
  • Contract ownership & translation rules to document ownership boundaries and data/term translations across boundaries.
  • Real-world use case: When migrating from monoliths to microservices, map Billing → Checkout and define ACLs to prevent domain leakage.

Quick Start

List all context pairs, assign a relationship pattern, and document ownership boundaries.

Frequently Asked Questions about ddd-context-mapping

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define context mapping patterns for bounded contexts to prevent domain leakage?

To define context mapping patterns, identify upstream and downstream context pairs and apply relationships like Anti-Corruption Layer or Open Host Service. This establishes clear ownership boundaries and integration contracts to prevent domain leakage.

When do I need an Anti-Corruption Layer during a monolith to microservices migration?

You need an Anti-Corruption Layer when migrating from monoliths to microservices to isolate downstream contexts. It prevents domain leakage by translating terms and enforcing ownership boundaries between paired contexts like Billing and Checkout.

What is the best way to document integration contracts and translation rules across bounded contexts?

The best way to document integration contracts is to map all context pairs, assign a relationship pattern, and capture translation rules. This creates a clear ownership matrix that defines data translations and versioning policies across boundaries.

How do I apply DDD context mapping to manage ownership boundaries and failure modes?

Apply DDD context mapping by identifying relationship directions between context pairs and choosing patterns like Conformist or Customer-Supplier. This documents ownership boundaries while capturing failure modes and versioning policies for risk mitigation.

Can I use an Open Host Service with a Published Language to define upstream integration contracts?

Yes, using an Open Host Service with a Published Language defines integration contracts for upstream contexts. This mapping pattern establishes a standardized communication protocol and clear ownership matrix for downstream consumers.