domain-model-extractor

domain-model-extractor is a skill for Claude Code, Codex from j5ik2o/okite-ai. It costs 200 tokens per session (1,654 once invoked), scanned A, original, MIT.

A code-analysis skill that proposes a domain model: the business concepts, rules, and boundaries represented in an existing codebase. Domain-driven design, or DDD, is a way to structure software around the real-world problem it serves.

In plain words
What is it for?
Use it to inspect legacy code, identify business objects and rules, and draft a DDD redesign with pseudocode.
Why use it?
It helps turn code that lacks a clear business structure into a model with explicit concepts, relationships, and rules.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect legacy code, identify business objects and rules, and draft a DDD redesign with pseudocode.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j5ik2o/okite-ai/domain-model-extractor
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add j5ik2o/okite-ai --skill domain-model-extractor
Clone the repo
git clone --depth 1 https://github.com/j5ik2o/okite-ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for domain-model-extractor

README.md
[![agentmods](https://agentmods.dev/badge/skills/j5ik2o/okite-ai/domain-model-extractor/github.svg)](https://agentmods.dev/skills/j5ik2o/okite-ai/domain-model-extractor)
Your own site
<a href="https://agentmods.dev/skills/j5ik2o/okite-ai/domain-model-extractor"><img src="https://agentmods.dev/badge/skills/j5ik2o/okite-ai/domain-model-extractor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for domain-model-extractor

Your own site · 80×15
<a href="https://agentmods.dev/skills/j5ik2o/okite-ai/domain-model-extractor"><img src="https://agentmods.dev/badge/skills/j5ik2o/okite-ai/domain-model-extractor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 200 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,654 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00200 $0.01654
Opus 5 $0.00100 $0.00827
Sonnet 5 $0.00040 $0.00331
Haiku 4.5 $0.00020 $0.00165

Measured 9d ago against content hash 20bd6cde4177, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

domain-model-extractor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/domain-model-extractor/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Domain Model Extractor

既存の非DDDコードを分析し、DDDのビルディングブロック(集約・ローカルエンティティ・値オブジェクト・ドメインサービス)を擬似コード付きで提案する。

分析ワークフロー

Phase 1: スコープ確認

ユーザーに以下を確認する:

  • 分析対象のディレクトリ/ファイル範囲
  • ドメインの概要(何を扱うシステムか)
  • 特に関心のある領域(あれば)

Phase 2: 既存コードの探索

以下の順序で情報を収集する:

Step 1: 構造の把握

  • ディレクトリ構造を確認し、モジュール/パッケージの全体像を掴む
  • 主要なクラス/構造体/型を一覧化する

Step 2: データ構造の分析

  • DB スキーマ(マイグレーション、ORMモデル等)があれば確認
  • 主要なクラス/構造体のフィールド・プロパティを確認
  • データ間の参照関係(外部キー、IDフィールド等)を把握

Step 3: ビジネスロジックの所在特定

  • バリデーションロジックの散在箇所を特定
  • 条件分岐の多いメソッドを特定(ビジネスルールの候補)
  • 複数エンティティにまたがる操作を特定

Step 4: トランザクション境界の分析

  • 同一トランザクションで更新されるデータ群を特定
  • これが集約境界の最重要手がかりとなる

Phase 3: ドメインモデルの導出

収集した情報を基に、以下の順序でモデルを導出する。 詳細なヒューリスティクスは references/analysis-heuristics.md を参照。

導出順序:

  1. 値オブジェクト - プリミティブ型で表現されたドメイン概念、検証ロジックの散在箇所から
  2. 集約 - トランザクション境界、CRUDの単位、不変条件の範囲から
  3. ローカルエンティティ - 集約内部でのみ意味を持つ、IDを持つオブジェクト
  4. ドメインサービス - 複数集約にまたがる操作、特定オブジェクトに属さないルール

各モデルに含める情報:

  • プロパティ(型情報付き)
  • ファクトリメソッド(生成時の検証)
  • コマンドメソッド(状態変更操作、不変で新インスタンスを返す)
  • クエリメソッド(状態参照操作)
  • 不変条件(集約が常に満たすべきルール)

Phase 4: 提案ドキュメントの出力

references/output-template.md のテンプレートに従い、以下を含むMarkdownドキュメントを生成する:

  1. 概要(分析対象、発見したモデル数)
  2. 集約ごとのセクション(擬似コード付き)
  3. 値オブジェクト一覧(擬似コード付き)
  4. ドメインサービス一覧(擬似コード付き)
  5. 集約関連図(テキストベース)
  6. 既存コードとの対応表

出力例(抜粋)

以下は EC サイトの注文管理コードを分析した場合の出力イメージ(集約1つ分):

Aggregate Order {
  id: OrderId
  customerId: CustomerId        // 他集約へのID参照
  items: List<OrderItem>        // ローカルエンティティ
  status: OrderStatus           // 値オブジェクト
  shippingAddress: Address      // 値オブジェクト

  // Invariants: items は1件以上、合計金額は0より大きい

  static create(customerId, firstItem, address): Order
  addItem(item: OrderItem): Order       // returns 新しいインスタンス
  removeItem(itemId: OrderItemId): Order
  submit(): Order                        // status を Submitted に変更
  totalAmount(): Money
}

分類判断基準

判断ポイント 集約 ローカルエンティティ 値オブジェクト
独自のIDを持つか Yes(ルートID) Yes(ローカルID) No
単独で取得されるか Yes No(親経由) No
ライフサイクルがあるか Yes 親に従属 なし(不変)
同一性で比較するか Yes(ID) Yes(ID) No(値で比較)

Read the full file on GitHub · 120 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 120 lines · 200 tokens per session scan A 20bd6cde4177

Subscribe to this mod's changes

domain-model-extractor is a skill published in the GitHub repository j5ik2o/okite-ai (81 stars, last pushed 4mo ago), licensed MIT. It adds 200 tokens to every session and 1,654 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens