高階 · 公開核心+會員工作紙 MIT · Egonex-AI

Understand-Anything:程式碼知識圖譜(教你看懂,而不是嚇你)

Egonex-AI · Claude Code/Cursor/Codex/Hermes · 聯絡 psyche@mail.grokbot.com

學習貼士

學習貼士

  • Graphs that teach > graphs that impress。
  • 先小 repo;monorepo 用子目錄。
  • 首跑 token 多→訂閱/Ollama;之後增量。
  • Codex=$understand;非贊助;跟官方 README。

課節進度

開始學習吧!勾選完成的課節。

0% 完成(0/12 課節)

  • 11. 是什麼/為什麼
  • 22. How-to:Claude Code
  • 33. How-to:多平台
  • 44. /understand 管線
  • 55. 指令族
  • 66. 四個實作範例
  • 77. 範例提問
  • 88. 平台表
  • 99. Token/成本/隱私
  • 1010. 分享圖譜+OPC
  • 1111. 官方來源
  • 1212. 練習清單

提示:滾動到課節會自動標記完成;點擊課節仍可標記/取消(存於本機)。

一句話:把 codebase/docs/wiki 變成可探索知識圖譜——教你看懂,而不是嚇你。

1. 是什麼/為什麼(公開)

  • 痛點:大 repo 新人無從入手。
  • 做法:Tree-sitter+LLM 混合;多 Agent 管線。
  • 功能:結構/domain/wiki 圖、tours、搜尋、diff、persona、分層。
  • 輸出:.ua/knowledge-graph.json。
  • 適合:onboarding、refactor 前、wiki 圖譜。
站主:非贊助;以官方 README/官網為準。

2. How-to:Claude Code(逐步)

目標:小專案跑通安裝→分析→儀表板→提問。

  1. 準備:Claude Code+小 repo。
  2. 加 marketplace:/plugin marketplace add Egonex-AI/Understand-Anything
  3. 安裝:/plugin install understand-anything
  4. 分析:/understand --language zh(或子目錄)。
  5. Dashboard:/understand-dashboard
  6. 提問:用 /understand-chat 問路徑/導覽/影響範圍。
  7. 核對:有 .ua/knowledge-graph.json。
首跑:token 可能很多→訂閱/Ollama;之後增量。

3. How-to:Cursor/Codex/Hermes(及其他)

A. 一行安裝腳本(macOS/Linux)

curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash
# 或指定平台(略過選單):
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s codex
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s hermes
curl -fsSL https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.sh | bash -s gemini

clone 到 ~/.understand-anything/repo;重啟 CLI/IDE。

B. Windows(PowerShell)

iwr -useb https://raw.githubusercontent.com/Egonex-AI/Understand-Anything/main/install.ps1 | iex

C. Cursor

  • clone 後可能自動發現 plugin。
  • 手動:Settings→Plugins 貼 GitHub URL。
  • 見 Cursor 入門課。

D. Codex 前綴注意

Codex=$understand;否則白話叫 skill。

E. 更新/卸载(摘要)

# 更新
./install.sh --update
# 卸载(指定平台)
./install.sh --uninstall codex

4. /understand 管線(混合架構)

層做什麼
Tree-sitter決定性結構+增量指紋
LLM白話摘要/層/domain/tours

多 Agent(README)

  • project-scanner · file-analyzer · architecture-analyzer · tour-builder · graph-reviewer(/understand)
  • domain-analyzer(/understand-domain)
  • article-analyzer(/understand-knowledge)

可並行;預設增量。

5. Dashboard/Chat/Diff/Domain/Knowledge

指令用途
/understand建圖/增量
/understand-dashboard儀表板
/understand-chat …問答
/understand-diffdiff 影響
/understand-explain path單點解釋
/understand-onboard新人導覽
/understand-domain業務域
/understand-knowledge pathwiki 圖譜

Codex:/→$。

6. 四個實作範例(公開 walkthrough)

範例 A|15 分鐘新人 onboarding

  1. 開 repo+已裝 plugin
  2. 小庫全掃/大庫子目錄
  3. 開 dashboard/tour
  4. onboard/chat 問入口
  5. 能口述入口/核心域/必讀檔

範例 B|Refactor 前看影響面

  1. 圖譜先保持新
  2. /understand-diff
  3. 記受影響模組
  4. 再問影響/測試缺口
  5. 大改仍要人審 PR

範例 C|Monorepo 業務域

  1. 先子目錄
  2. /understand-domain
  3. 對照 payment/auth 邊界
  4. 問耦合點

範例 D|文件/wiki 知識圖

  1. 準備 wiki(index.md+wikilinks)
  2. /understand-knowledge …
  3. 探索聚類/搜尋概念
  4. OPC:手冊變可問圖譜

7. 範例提問(可直接貼)

# Claude Code / 多數平台
/understand-chat 這個專案的請求路徑?
/understand-chat 改 auth 會影響哪些模組?
/understand-chat 給新人 5 分鐘導覽
/understand-chat Which parts handle payment retries?
/understand-chat 邊啲檔係 API 層?邊啲係 data 層?

# Codex
$understand-chat 這個專案的請求路徑?
$understand-chat 改 auth 會影響哪些模組?
$understand-chat 給新人 5 分鐘導覽

問題要具體;勿塞秘密。

8. 平台相容表(公開摘要)

平台安裝
Claude Codemarketplace
Cursorauto/手動 URL
VS Code + Copilotauto/vscode
Codexcodex+$
Hermes/OpenClaw/Gemini…install.sh

完整名單見官方 README。

9. Token/成本/隱私提示

  • 首跑貴→訂閱/Ollama;之後增量。
  • 用子目錄控範圍。
  • --language zh 等。
  • 敏感碼→本機;金鑰勿外洩。
  • 已提交圖譜可用 npx viewer(無 LLM)。

10. 分享圖譜+OPC 用法

commit 圖譜=隊友免重跑管線。

# .gitignore(保留圖譜,排除暫存)
.ua/intermediate/
.ua/diff-overlay.json
# 大檔(10MB+)可考慮 git-lfs:.ua/*.json
# 無 Claude/無 LLM 只睇圖(需 Node ≥18)
npx https://github.com/Egonex-AI/Understand-Anything/releases/latest/download/understand-anything-viewer.tgz /path/to/analyzed/project

OPC(一人公司)建議

  • 先理解再改碼。
  • 可開 auto-update hook。
  • 交付時附圖譜+viewer。

12. 練習清單(公開)

  • □ 三句:graphs that teach
  • □ Claude Code 跑通
  • □ Codex=$
  • □ chat+人工核對
  • □ gitignore 暫存

常見問題

Understand-Anything 是什麼?

MIT 知識圖譜工具;多 IDE/CLI。

Claude Code 點安裝?

marketplace add → install。

Codex 指令前綴?

Codex=$。

圖譜存在邊?

.ua/knowledge-graph.json。

點解首跑好貴?

首跑全庫;之後增量。

可以中文摘要嗎?

--language zh。

🔒 會員專屬:首跑檢查表・平台選擇・提問包・Monorepo・分享 Git

解鎖高階工作紙。會員 HK$50/月。

登入解鎖 開通會員

課程完成標記

登入會員後可將整門課標記完成並同步至儀表板。