Ddd Domain Interactions logo

Ddd Domain Interactions

Organization
ForceInjection
ddd-domain-interactions

设计构造块间的协作机制:领域事件、领域服务、仓储接口与工厂。

Overview

PublisherForceInjection
Repositorydomain-driven-design-skills
Skill nameddd-domain-interactions
Stars
99
Forks
16
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ForceInjection on GitHub. Read the source before you install it.

Installation

Install the Ddd Domain Interactions AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ForceInjection/domain-driven-design-skills/tree/main/skills/ddd-domain-interactions
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ForceInjection/domain-driven-design-skills.git /tmp/domain-driven-design-skills
mkdir -p .claude/skills
cp -r /tmp/domain-driven-design-skills/skills/ddd-domain-interactions .claude/skills/ddd-domain-interactions
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ddd Domain Interactions in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ddd Domain Interactions on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ddd Domain Interactions is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

DDD Domain Interactions

🌐 English version: English

使用时机

  • 聚合边界已设计完毕,需要定义聚合之间、聚合与外部之间的协作机制。
  • 需要回答"聚合如何通信、谁编排跨聚合流程、持久化契约是什么"。
  • 作为战术建模的最后一步,补全所有"连接组织"。

输入要求

  • 必需:聚合目录与不变量表(来自 ddd-aggregates)、事件候选清单(来自 ddd-discover)。
  • 可选:上下文映射与契约信息(来自 ddd-context-map)、上下文目录与词汇表(来自 ddd-contexts,用于区分领域事件与集成事件的边界)。

流程

  1. 事件规范化:统一事件命名规则(过去时、业务可读、无技术词);为每个事件定义触发条件、源聚合、关键字段、排序要求。
  2. 区分范围:区分领域事件(上下文内)与集成事件(跨上下文/对外发布)。
  3. 可靠性策略:为每个事件定义幂等键、重放策略、去重窗口、死信处理。
  4. 领域服务:识别不属于任何单一聚合但承载领域逻辑的操作,定义为领域服务——明确输入、输出、使用的聚合与事件。
  5. 仓储接口:为每个聚合定义仓储的语义接口(加载、持久化、查询)——仅定义契约,不涉及实现。
  6. 工厂:识别复杂的聚合创建逻辑,定义工厂方法——明确创建条件、验证规则与初始状态。
  7. 订阅者与副作用:明确每个事件的消费者、触发的动作、补偿策略、监控指标。

输出

工件结构要求
领域事件目录表格:事件名、源聚合、触发条件、关键字段、范围(Domain/Integration)
集成事件契约表格:事件名、发布者、消费者、契约 Owner、版本策略、兼容窗口
幂等与重放策略表格:事件、幂等键、去重窗口、重放规则、异常处理
领域服务定义表格:服务名、职责、输入、输出、依赖的聚合/事件、不应包含的逻辑
仓储接口清单表格:聚合、方法签名(语义)、语义说明、查询边界
工厂清单表格:工厂名/方法、创建目标、创建条件、验证规则、初始状态
订阅者与副作用表格:事件、订阅者、触发动作、补偿策略、监控指标

校验清单

  • 所有事件命名使用过去时,无技术词污染
  • 跨上下文发布的事件有版本策略与兼容窗口
  • 关键事件提供幂等键与重放策略
  • 领域服务不包含本应属于聚合的业务逻辑(避免贫血模型)
  • 仓储接口仅定义语义契约,不包含实现细节(SQL、ORM)
  • 每个复杂创建逻辑都有对应工厂(不在应用层裸 new)

回溯触发

  • 事件需携带另一聚合的私有数据(无法设计干净的 event schema) → 回溯至 ddd-aggregates(聚合边界需调整以保证事件自包含)。

示例

text
@ddd-domain-interactions
基于以下聚合设计,帮我设计领域交互层:
- 聚合:Booking(根:Booking,VO:TimeSlot, BookingStatus)
- 聚合:RoomSchedule(根:RoomSchedule,VO:TimeSlotOccupancy)
- 事件候选:BookingConfirmed, BookingCancelled, CheckInRecorded
请输出领域事件目录、领域服务、仓储接口与订阅者清单。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ddd Domain Interactions AI skill do?

设计构造块间的协作机制:领域事件、领域服务、仓储接口与工厂。

Why use Ddd Domain Interactions on TypingMind?

Because you install it once and use it with any model. Ddd Domain Interactions is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ddd Domain Interactions in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ForceInjection/domain-driven-design-skills/tree/main/skills/ddd-domain-interactions. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ddd Domain Interactions?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ddd Domain Interactions?

As many as you like. As long as a model supports skills, you can use Ddd Domain Interactions with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ddd Domain Interactions AI skill free?

Yes. It is published on GitHub by ForceInjection under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇