本文へスキップ
Skillpedia
APIとサーバー(バックエンド)81k · #1615

ddd-context

できること

このスキルは、境界づけられたコンテキスト(コードベース内の独立した業務領域)のための標準的なフォルダー構造を作成します。大きなアプリを明確な部品に分ける開発者向けです。

使う場面

  • ✓コードベースで新しい業務領域を始めるとき。
  • ✓大きなアプリケーションを、明確な境界を持つ別々の部品に分けるとき。
  • ✓新しいモジュールに、同じドメイン、アプリケーション、インフラストラクチャの構成を使いたいとき。

スキルのリンク

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ddd/skills/ddd-context/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ddd/skills/ddd-context/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“コードベースに新しい請求の領域を、標準のフォルダーで設定してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

スキルは名前がケバブケースであり、まだ使われていないことを確認してから、ドメイン、アプリケーション、インフラストラクチャの各層のフォルダーとインデックスファイルを作成します。また、新しい領域をドメインモデルのストアに記録します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Create a bounded context directory structure for the given context name.

Parse $ARGUMENTS as the context name (kebab-case). If empty, list existing contexts.

Steps

  1. Validate name: Ensure the context name is kebab-case and does not already exist under src/.

  2. Create directory structure:

    src/<context-name>/
      domain/
        entities/
        value-objects/
        events/
        services/
        repositories/
      application/
      infrastructure/
    
  3. Generate index files:

    • src/<context-name>/domain/entities/index.ts -- barrel export for entities
    • src/<context-name>/domain/value-objects/index.ts -- barrel export for value objects
    • src/<context-name>/domain/events/index.ts -- barrel export for domain events
    • src/<context-name>/domain/services/index.ts -- barrel export for domain services
    • src/<context-name>/domain/repositories/index.ts -- barrel export for repository interfaces
    • src/<context-name>/domain/index.ts -- re-export all domain submodules
    • src/<context-name>/application/index.ts -- barrel export for application services
    • src/<context-name>/infrastructure/index.ts -- barrel export for infrastructure implementations
    • src/<context-name>/index.ts -- public API of the bounded context (re-exports domain and application only, NOT infrastructure)
  4. Store in domain model graph:

    mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store({ key: "domain/context-<context-name>", value: "Bounded context <context-name> (parent: domain)", tier: "semantic" })
    mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge({ sourceId: "entity:domain", targetId: "entity:context-<context-name>", relation: "contains" })
    mcp__plugin_ruflo-core_ruflo__memory_store({ key: "ddd-context-<context-name>", value: "Created bounded context", namespace: "tasks" })
    
  5. Report: Confirm the context was created and list the generated files.

よくある質問

どの名前の形式を使えばよいですか?

billing-invoices のようなケバブケースを使い、同じ名前のフォルダーがまだ存在しないことを確認してください。

公開のインデックスは何を公開しますか?

ドメイン層とアプリケーション層だけを再エクスポートし、インフラストラクチャは公開しません。

名前を指定せずに実行するとどうなりますか?

新しいコンテキストを作る代わりに、既存のコンテキストを一覧表示します。

詳細

作者による元の説明

Create and manage a DDD bounded context with standard directory structure. Use when starting a new subdomain, splitting a monolith into bounded contexts, or scaffolding the domain/application/infrastructure layout for a fresh module.

repo: ruvnet/ruflo

人気

GitHubのスター
81k
ランキング
#1615
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル