analyze-system
システム分析エージェント - ユビキタス言語、アクター、ロール、権限、ドメイン-コード対応表を抽出。/analyze-system [対象パス] で呼び出し。
Best use case
analyze-system is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
システム分析エージェント - ユビキタス言語、アクター、ロール、権限、ドメイン-コード対応表を抽出。/analyze-system [対象パス] で呼び出し。
Teams using analyze-system should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/analyze-system/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How analyze-system Compares
| Feature / Agent | analyze-system | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
システム分析エージェント - ユビキタス言語、アクター、ロール、権限、ドメイン-コード対応表を抽出。/analyze-system [対象パス] で呼び出し。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# System Analyzer Agent
既存システムの設計書とコードを分析し、ドメイン理解のための基礎情報を抽出するエージェントです。
## 目的
このエージェントは以下の中間ファイルを生成します:
1. **ユビキタス言語集** - ビジネスドメインで使用される用語の定義
2. **アクター・ロール・権限** - システムに関わる人・役割・権限の整理
3. **ドメイン-コード対応表** - 設計書の概念とコードの紐付け
4. **現行システム概要** - 技術スタック、アーキテクチャの概要
## 出力先ディレクトリ
解析結果は `reports/01_analysis/` に出力します。
**重要**: 各ステップ完了時に即座にファイルを出力してください(最後にまとめて出力しない)。
```
reports/
├── 00_summary/
│ └── project_metadata.json # Step 1完了時
└── 01_analysis/
├── system-overview.md # Step 3完了時
├── ubiquitous-language.md # Step 4完了時
├── actors-roles-permissions.md # Step 5完了時
└── domain-code-mapping.md # Step 6完了時
```
## 実行プロンプト
あなたは既存システムを分析する専門家エージェントです。以下の手順で分析を実行してください。
### Step 1: 入力情報の収集と初期化
まず、出力ディレクトリを作成し、対象ディレクトリの構造を把握します。
```bash
# 出力ディレクトリの作成
mkdir -p reports/{00_summary,01_analysis,02_evaluation,03_design,04_stories,graph/data,99_appendix}
```
```
# Serenaツールを使用
mcp__serena__list_dir で対象ディレクトリをスキャン
mcp__serena__find_file で設計書ファイルを特定(*.md, *.docx, *.xlsx)
```
**このステップ完了時に出力**: `reports/00_summary/project_metadata.json`
```json
{
"project": { "name": "", "version": "", "created_at": "", "updated_at": "" },
"source": { "path": "", "type": "", "languages": [], "frameworks": [] },
"analysis": { "status": "in_progress", "modules_count": 0 }
}
```
### Step 2: 設計書の解析
設計書が存在する場合:
- ドキュメントを読み取り
- ビジネス用語を抽出
- アクターとロールを特定
- 機能要件と非機能要件を整理
### Step 3: コードベースの解析
```
# Serenaツールを使用してコード構造を把握
mcp__serena__get_symbols_overview で主要ファイルのシンボル一覧を取得
mcp__serena__find_symbol で重要なクラス/関数を特定
```
以下の観点でコードを分析:
- **ディレクトリ構造** - モジュール分割の方針
- **名前空間/パッケージ** - ドメイン境界の手がかり
- **クラス/インターフェース** - ドメインモデルの候補
- **外部依存** - 使用ライブラリ、フレームワーク
**このステップ完了時に出力**: `reports/01_analysis/system-overview.md`
- 技術スタック、アーキテクチャ概要、モジュール構成を記載
### Step 4: ユビキタス言語の抽出
以下のソースからビジネス用語を収集:
1. **設計書から**
- 要件定義書の用語
- ER図のエンティティ名
- ユースケース記述の名詞
2. **コードから**
- クラス名、インターフェース名
- メソッド名(特にビジネスロジック)
- 定数、Enum値
- コメント内のドメイン用語
**このステップ完了時に出力**: `reports/01_analysis/ubiquitous-language.md`
### Step 5: アクター・ロール・権限の整理
| カテゴリ | 抽出元 |
|---------|--------|
| アクター | ユースケース図、認証コード、ロール定義 |
| ロール | 権限設定、ミドルウェア、デコレータ |
| 権限 | 認可ロジック、ポリシー定義 |
**このステップ完了時に出力**: `reports/01_analysis/actors-roles-permissions.md`
### Step 6: ドメイン-コード対応表の作成
設計書の概念とコードの対応を以下の形式で整理:
```markdown
| 設計書の概念 | コード上の表現 | ファイルパス | 備考 |
|-------------|---------------|-------------|------|
| 注文 | Order class | src/domain/order.ts | 集約ルート |
| 顧客 | Customer class | src/domain/customer.ts | エンティティ |
```
**このステップ完了時に出力**: `reports/01_analysis/domain-code-mapping.md`
### Step 7: メタデータの最終更新
すべての解析完了後、`reports/00_summary/project_metadata.json` を更新:
- `analysis.status` を `"completed"` に変更
- 各カウントを実際の値で更新
## 出力フォーマット
### 1. ubiquitous_language.md
```markdown
# ユビキタス言語集
## 概要
[プロジェクトの概要説明]
## 用語定義
### コアドメイン
| 用語(日本語) | 用語(英語) | 定義 | 使用箇所 |
|--------------|------------|------|---------|
| 注文 | Order | 顧客が商品を購入する単位 | Order.ts, 注文画面 |
### サブドメイン
[サブドメインごとに同様の表を作成]
## 略語・頭字語
| 略語 | 正式名称 | 説明 |
|-----|---------|------|
## 同義語・類義語マッピング
| 用語A | 用語B | 推奨用語 | 理由 |
|------|------|---------|------|
```
### 2. actors_roles_permissions.md
```markdown
# アクター・ロール・権限
## アクター一覧
### 人間アクター
| アクター | 説明 | 主な操作 |
|---------|------|---------|
### システムアクター
| システム | 説明 | 連携方法 |
|---------|------|---------|
## ロール定義
| ロール | 説明 | 権限セット | コード参照 |
|-------|------|-----------|-----------|
## 権限マトリックス
| 権限 | 管理者 | 一般ユーザー | ゲスト | 対象リソース |
|------|--------|------------|--------|------------|
## 認証・認可フロー
```mermaid
sequenceDiagram
[認証フローの図]
```
```
### 3. domain_code_mapping.md
```markdown
# ドメイン-コード対応表
## マッピング概要
[全体的なマッピング方針の説明]
## ドメイン別マッピング
### [ドメイン名1]
| 概念カテゴリ | 設計書での名称 | コード上の実装 | ファイルパス | 実装パターン |
|------------|--------------|--------------|-------------|-------------|
| エンティティ | 注文 | Order | src/domain/order.ts | DDD Entity |
| 値オブジェクト | 金額 | Money | src/domain/money.ts | Value Object |
| リポジトリ | 注文保存 | OrderRepository | src/repo/order.ts | Repository |
### [ドメイン名2]
[同様の構造]
## 未マッピング項目
### 設計書にあるがコードにない
| 概念 | 設計書での記載箇所 | 考えられる理由 |
|-----|------------------|--------------|
### コードにあるが設計書にない
| クラス/関数 | ファイルパス | 推測されるドメイン |
|------------|-------------|------------------|
```
### 4. current_system_overview.md
```markdown
# 現行システム概要
## 技術スタック
### フロントエンド
| 技術 | バージョン | 用途 |
|-----|----------|------|
### バックエンド
| 技術 | バージョン | 用途 |
|-----|----------|------|
### データベース
| 技術 | バージョン | 用途 |
|-----|----------|------|
### インフラ
| 技術 | 用途 |
|-----|------|
## アーキテクチャ概要
```mermaid
graph TD
[システム構成図]
```
## モジュール構成
| モジュール | 責務 | 依存関係 | ファイル数 |
|----------|------|---------|----------|
## 外部連携
| 連携先 | 連携方式 | 用途 | 実装箇所 |
|-------|---------|------|---------|
## 課題・技術的負債
| 課題 | 深刻度 | 影響範囲 | 推奨対応 |
|-----|-------|---------|---------|
```
## ツール使用ガイドライン
### 優先順位
1. **Serenaツール** - シンボリック解析に最適
- `get_symbols_overview` - ファイル構造把握
- `find_symbol` - 特定シンボル検索
- `find_referencing_symbols` - 参照関係分析
2. **Glob/Grep** - パターンマッチング
- ファイル検索
- 文字列パターン検索
3. **Read** - 詳細確認
- 特定ファイルの内容確認
- 設計書の読み取り
### 効率的な分析のコツ
- 全ファイルを読まず、まずシンボル概要を取得
- 重要なクラス/関数のみ詳細を確認
- 設計書があれば先に読み、コードの目星をつける
- 並列で複数ファイルを分析可能
## エラーハンドリング
- 設計書が見つからない場合 → コードのみから推論(精度低下を警告)
- コードが解析不能な場合 → 対応言語を確認、手動解析を提案
- 大規模コードベースの場合 → サンプリング分析を提案Related Skills
awareness-analyzer
Diagnose audience awareness level and market sophistication using Eugene Schwartz's Breakthrough Advertising framework
ast-analyzer
Deep Abstract Syntax Tree analysis for understanding code structure, dependencies, impact analysis, and pattern detection at the structural level across multiple programming languages
appconfig-system
Expert guidance for working with the AppConfig runtime configuration system in squareone. Use this skill when implementing configuration loading, working with YAML config files, setting up new pages that need configuration, troubleshooting config hydration issues, or migrating from next/config patterns. Covers server-side loadAppConfig(), client-side useAppConfig(), MDX content loading, Sentry configuration injection, and Kubernetes ConfigMap patterns.
anysystem-design
LLM Agent Skill for AnySystem Design React component library
anti-cheat-systems
Guide for understanding anti-cheat systems and bypass techniques. Use this skill when researching game protection systems (EAC, BattlEye, Vanguard), anti-cheat architecture, detection methods, or bypass strategies.
analyzer-architecture-review
analyzerアプリケーションのアーキテクチャレビュー。Port&Adapterアーキテクチャ(ヘキサゴナルアーキテクチャ)のルールに従っているかをチェックします。新しいPort/Adapter/Usecase/Model追加時、PRレビュー時、またはアーキテクチャ違反の検出が必要な時に使用します。Port層の関数型定義、依存関係の方向、New*関数パターン、レイヤー分離などを検証します。
analyze-code
外部ライブラリや他言語で書かれたコードの実装を分析して知見を得る
analyze-yii2-project
Use this when user provides a Yii2 codebase for analysis or migration planning. Provides 6-phase workflow: scan, capability extraction, dependency analysis, requirements extraction, semantic indexing, and migration roadmap. Apply when user mentions Yii2, PHP legacy modernization, or framework migration to NestJS
analyze-wast
Analyze WebAssembly test (WAST) files to debug compilation issues and create regression tests. Use when the user asks to debug or analyze WAST test failures, investigate compilation bugs in wasmoon, or when encountering test failures in spec/*.wast files. Triggers include "analyze wast", "debug wast", "wast bug", or references to specific .wast test files.
analyze
Deep analysis mode - thorough multi-phase investigation with expert consultation for complex problems requiring careful examination
analyze-size
Analyze codebase size and language distribution using cloc. Use when user wants to understand codebase scale, primary languages, code composition, or assess project complexity. Provides total LOC, size category, language breakdown percentages, and key insights.
analyze-rust-optimizations
This skill performs thorough analysis of Rust libraries to find optimization opportunities. It should be used when reviewing Rust code for performance improvements, memory efficiency, or when profiling indicates bottlenecks. Focuses on runtime performance and memory usage through dynamic profiling tools and static code analysis.