Generate a structured knowledge graph analysis report for the entire vault in one go. Combine multiple query templates from obsidian-graph-query to produce four analysis modules + data summary.
Prerequisites
This skill depends on the obsidian-graph-query skill. Before execution:
- Confirm that the
obsidian-graph-queryskill is installed (check whether the sibling../obsidian-graph-query/SKILL.mdexists) - Read
../obsidian-graph-query/references/vault-config.mdto obtain the CLI path, vault name, and excluded folders - Query templates are in
../obsidian-graph-query/references/query-templates.md - The execution method follows the "Execution Mode" section of obsidian-graph-query (read template → substitute parameters → write temporary file → CLI eval)
Applicable Scenarios
- "Analyze my knowledge base structure"
- "Generate a knowledge graph report for my vault"
- "Is my note library healthy?"
- "Compare it with last year's analysis report"
Report Framework (4 Modules + Data Summary)
| Module | Content | Main Data Sources |
|---|---|---|
| One: Vault Panoramic Overview | Scale, orphan rate, connectivity, folder distribution | vault-stats |
| Two: Activity Trends | Monthly output, peak activity months | vault-stats (monthlyCreation) |
| Three: Knowledge Focus and Structure | Hub Top 10, domain density, cross-domain links, orphan distribution | vault-stats + hubs + orphans-rich |
| Four: Knowledge Value and Risks | Most cited, outbound-only, Bridge risks | hubs + bridges + vault-stats |
| Data Summary | Structured tables (for visualization tools) | All of the above |
Execution Flow
步驟 1. vault-stats(query-templates.md §8,無參數)
→ 模組一:totalNotes, totalLinks, avgLinksPerNote, orphanCount/Ratio,
componentCount, largestComponent/Ratio, folderStats
→ 模組二:monthlyCreation
→ 模組三:crossFolderLinks/Ratio
→ 模組四:outOnlyCount/Notes
步驟 2. hubs(TOP_N=10)(query-templates.md §5)
→ 模組三:Hub 筆記 Top 10
→ 模組四:被引用最多的筆記(同一結果按 inDegree 排序)
步驟 3. hubs(FOLDER_FILTER=X) × 主要資料夾
→ 從步驟 1 的 folderStats 取筆記數前 5 大的資料夾
→ 每個資料夾跑一次 hubs(TOP_N=5, FOLDER_FILTER='資料夾/')
→ 模組三:各領域連結密度比較(密度 = 該領域總連結 / 該領域筆記數)
步驟 4. orphans-rich(query-templates.md §6,無 FOLDER_FILTER)
→ 模組三:孤島分布(按資料夾統計)
步驟 5. bridges(query-templates.md §4,無參數)
→ 模組四:articulationPoints 前 10 + bridgesByFolder
步驟 6. Agent 彙整上述 JSON → 產出 Markdown 報告
Steps 1-2 can be executed simultaneously (no dependency); Step 3 depends on the results of Step 1.
Report Output Format
# Vault 知識圖譜報告
> 產出時間:YYYY-MM-DD | Vault:<vault-name> | 筆記數:X
## 一、Vault 全景概覽
| 指標 | 數值 |
|------|------|
| 筆記總數 | X |
| 連結總數 | X |
| 平均每篇連結數 | X.XX |
| 孤島數量 | X(佔 XX.X%) |
| 連通分量數 | X |
| 最大分量涵蓋率 | XX.X% |
### 資料夾分布
| 資料夾 | 筆記數 | 連結數 | 孤島數 | 密度 |
|--------|--------|--------|--------|------|
| ... | ... | ... | ... | X.XX |
## 二、活躍度趨勢
| 月份 | 新增筆記數 |
|------|-----------|
| YYYY-MM | X |
活躍高峰月:YYYY-MM(X 篇)
## 三、知識重心與結構
### Hub 筆記 Top 10
| 排名 | 筆記 | 入度 | 出度 | 總連結 |
|------|------|------|------|--------|
| 1 | ... | ... | ... | ... |
### 各領域連結密度
| 領域 | 筆記數 | 連結數 | 密度 |
|------|--------|--------|------|
| ... | ... | ... | X.XX |
### 跨領域連結
跨資料夾連結數:X(佔總連結 XX.X%)
### 孤島分布
| 資料夾 | 孤島數 | 佔該資料夾 % |
|--------|--------|-------------|
| ... | ... | XX.X% |
## 四、知識價值與風險
### 被引用最多的筆記
(hubs 按 inDegree 排序前 10)
### 只出不進的筆記
outDegree > 0、inDegree = 0 的筆記共 X 篇
### Bridge 關鍵節點
(bridges articulationPoints 前 10,含 degree)
### Bridge 風險分布
| 資料夾 | Bridge 邊數 |
|--------|------------|
| ... | ... |
## 數據匯總
(前四模組的核心數據整理成 CSV-ready 表格,方便丟給視覺化工具)
Extended Usage: Cross-Validation with Qualitative Reports
After generating the report, it can be cross-validated with existing qualitative analysis reports (such as a NotebookLM annual review):
| Test | Method |
|---|---|
| A: Cross-Domain Link Validation | vault-stats crossFolderLinks → path (§2) find cross-domain paths → LLM reads notes to determine semantic relationships |
| B: Hub Semantic Understanding | hubs Top 10 → LLM reads hub note content → explains the role it plays in the knowledge system |
| C: Bridge Risk Interpretation | bridges find key nodes → LLM reads bridge + neighbors on both sides → explains "what would happen if removed" |
| D: Orphan Association Reasoning | orphans-rich find orphans → neighbors (§1) find nearest connected → LLM determines "whether it should be connected" |