Communityコーディング&開発github.com

mattpocock/domain-modeling

プロジェクトのドメインモデルを構築・洗練します。ユーザーがドメイン用語やユビキタス言語を確定したいとき、アーキテクチャ上の決定を記録したいとき、または他のスキルがドメインモデルを維持する必要があるときに使用します。

domain-modeling とは?

このスキルは、ソフトウェアプロジェクトのドメインモデルを能動的に構築・改善するためのものです。用語の矛盾を指摘し、あいまいな表現を精密な用語に置き換え、具体シナリオで境界を検証し、コードとの整合性を確認します。これにより、CONTEXT.md(用語集)とADR(アーキテクチャ決定記録)をリアルタイムで更新し、プロジェクトのユビキタス言語を強固にします。単一コンテキストと複数コンテキストの両方に対応し、ファイルは必要なときだけ作成するレイジーなアプローチをとります。Claude Code、Coder、その他のAIエージェントと連携可能で、ドメイン駆動設計(DDD)やアーキテクチャの明確化を促進します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mattpocock/skills/tree/main/skills/engineering/domain-modeling

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ドメインモデリング

設計の過程でプロジェクトのドメインモデルを能動的に構築・洗練します。これは能動的な手法です—用語に挑戦し、エッジケースとなるシナリオを考案し、用語集や決定事項が固まったその瞬間に書き留めます。(CONTEXT.md を語彙のためだけに読むことはこのスキルではありません—それはどのスキルでもできる単一行の習慣です。このスキルはモデルを変更するときのものであり、単に消費するだけではありません。)

ファイル構造

ほとんどのリポジトリは単一のコンテキストを持ちます:

/
├── CONTEXT.md
├── docs/
│   └── adr/
│       ├── 0001-event-sourced-orders.md
│       └── 0002-postgres-for-write-model.md
└── src/

ルートに CONTEXT-MAP.md が存在する場合、リポジトリは複数のコンテキストを持ちます。マップは各コンテキストがどこにあるかを示します:

/
├── CONTEXT-MAP.md
├── docs/
│   └── adr/                          ← システム全体の決定
├── src/
│   ├── ordering/
│   │   ├── CONTEXT.md
│   │   └── docs/adr/                 ← コンテキスト固有の決定
│   └── billing/
│       ├── CONTEXT.md
│       └── docs/adr/

ファイルはレイジーに作成します—書くべき内容がある場合のみです。CONTEXT.md が存在しない場合は、最初の用語が解決されたときに作成します。docs/adr/ が存在しない場合は、最初のADRが必要になったときに作成します。

セッション中に

用語集に対して挑戦する

ユーザーが CONTEXT.md の既存の言語と矛盾する用語を使用した場合、すぐに指摘します。「用語集では'キャンセル'をXと定義していますが、あなたはYを意味しているようです—どちらですか?」

あいまいな言語を洗練する

ユーザーが曖昧または過負荷な用語を使用した場合、正確な標準用語を提案します。「'アカウント'と言っていますが—顧客とユーザーのどちらを意味しますか?それらは別のものです。」

具体的なシナリオについて議論する

ドメインの関係について議論するとき、具体的なシナリオでストレステストを行います。エッジケースを探り、概念間の境界を正確に定義するようユーザーに促すシナリオを考案します。

コードと相互参照する

ユーザーが何かの動作を述べたとき、コードが一致するか確認します。矛盾を見つけた場合は表面化させます:「コードは注文全体をキャンセルしていますが、あなたは部分キャンセルが可能だと言いました—どちらが正しいですか?」

CONTEXT.md をインラインで更新する

用語が解決されたら、その場で CONTEXT.md を更新します。これらをまとめてバッチ処理しないでください—発生したらすぐにキャプチャします。CONTEXT-FORMAT.md の形式を使用してください。

CONTEXT.md は実装の詳細を完全に含まないようにしてください。CONTEXT.md を仕様書、スクラッチパッド、または実装上の決定のリポジトリとして扱わないでください。これは用語集であり、それ以外の何物でもありません。

ADRは控えめに提案する

以下がすべて真である場合にのみ、ADRの作成を提案します:

  1. 元に戻すのが難しい — 後で考えを変えるコストが大きい
  2. 文脈なしでは驚くべき — 将来の読者が「なぜこうしたのか?」と疑問に思う
  3. 実際のトレードオフの結果 — 真の代替案があり、特定の理由で1つを選んだ

3つのうち1つでも欠けている場合は、ADRをスキップします。ADR-FORMAT.md の形式を使用してください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

mattpocock/ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

mattpocock/caveman

Ultra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman.

mattpocock/claude-handoff

Hand the current conversation off to a fresh background agent that picks up the work immediately.

mattpocock/codebase-design

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

mattpocock/design-an-interface

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

mattpocock/diagnose

Disciplined diagnosis loop for hard bugs and performance regressions. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression.

mattpocock/diagnosing-bugs

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

mattpocock/edit-article

Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.

mattpocock/git-guardrails-claude-code

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

mattpocock/grilling

Grill the user relentlessly about a plan or design. Use when the user wants to stress-test a plan before building, or uses any 'grill' trigger phrases.

mattpocock/grill-me

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".

mattpocock/grill-with-docs

Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.

mattpocock/handoff

Compact the current conversation into a handoff document for another agent to pick up.

mattpocock/implement

Implement a piece of work based on a PRD or set of issues.

mattpocock/implement-spec

Implement a specification in code.

mattpocock/improve-codebase-architecture

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

mattpocock/loop-me

Grill me about specs for the workflows I want to build, within this workspace.

mattpocock/migrate-to-shoehorn

Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.

mattpocock/obsidian-vault

Search, create, and manage notes in the Obsidian vault with wikilinks and index notes. Use when user wants to find, create, or organize notes in Obsidian.

mattpocock/prototype

Build a throwaway prototype to flesh out a design — a runnable terminal app for state/business-logic questions, or several radically different UI variations toggleable from one route.

関連スキル