documenting-domains

Generate domain understanding documentation from codebase analysis. Extracts entities, business logic, domain terms, and concept relationships. Triggers: domain understanding, glossary, entities, business logic, domain model, ER diagram, use cases.

⭐5stars🔀1forks📁View on GitHub🕐Updated Jan 11, 2026⬇️2downloads

When & Why to Use This Skill

This Claude skill automates the generation of comprehensive domain understanding documentation by performing deep codebase analysis. It extracts critical entities, business logic, and domain terminology to produce structured reports, including Mermaid-based ER diagrams and use case maps, ensuring that technical documentation remains synchronized with the actual implementation.

Use Cases

  • Developer Onboarding: Rapidly familiarize new team members with a project by generating a clear domain glossary and entity relationship map directly from the source code.
  • Legacy Codebase Discovery: Automatically map out hidden business logic and complex data structures in undocumented legacy systems to facilitate refactoring or migration.
  • Continuous Documentation: Maintain an up-to-date domain model and technical reference that evolves alongside the codebase, reducing the manual overhead of documentation maintenance.
  • Architectural Alignment: Generate visual ER diagrams and use case summaries to validate that the current code implementation aligns with the intended business requirements and architectural design.
namedocumenting-domains
description>
トリガーdomain understanding, glossary, entities, business logic,
allowed-toolsRead, Write, Grep, Glob, Bash, Task

docs:domain - ドメイン理解生成

コードベース分析からドメインドキュメントを自動生成。

検出項目

カテゴリ 対象
エンティティ/モデル class, interface, dataclass, Pydantic, Prisma, TypeORM, SQLAlchemy
ドメイン用語 クラス/関数名、コメント、JSDoc、docstrings
関係 エンティティ参照、継承、インポート分析
ユースケース Service/UseCaseクラス、Handler/Controller関数

分析スクリプト

スクリプト 目的
scripts/extract-entities.sh エンティティ名、フィールド、関係
scripts/extract-glossary.sh 用語、頻度、コンテキスト
scripts/generate-er-diagram.sh Mermaid ER図

生成構造

# ドメイン理解ドキュメント

## エンティティ一覧
### User
- id: string
- name: string
関連: Order, Profile

## 概念関係図
(Mermaid ER図)

## ドメイン用語集
| 用語 | 説明 | 関連 |

## ユースケース一覧
| ユースケース | 説明 | エンティティ |

使用方法

/docs:domain              # ドメインドキュメント生成
"Generate domain glossary" # 自然言語

Markdownバリデーション

生成後、出力を検証:

~/.claude/skills/scripts/validate-markdown.sh {output-file}

ブロッキングなし(警告のみ) - スタイル問題はドキュメント作成をブロックしない。

参照

  • 関連: documenting-architecture, documenting-apis, setting-up-docs