
我做了一個支援多儲存庫、感知工作樹的 diff 檢視器作為 Claude Code mod,因為 /diff 總是漏掉變更
名為 Repo(MIT)的 Claude Code mod,加入 /multi-diff 面板,可跨多個儲存庫和工作樹檢視 diff,提供五種比較模式、工作階段開始時的 git 快照,以及檔案樹和高亮 diff 檢視器。

關於這個 mod
作者發現 /diff 會漏掉 Python 或 shell 指令碼產生的變更,在非 git 資料夾中也什麼都不顯示,因此製作了支援多儲存庫、感知工作樹的 diff 檢視器作為 Claude Code mod。
功能:
- /multi-diff 會開啟面板,顯示以 Git 為基礎的 diff,並在工作階段開始時(或執行 /clear 時)擷取每個儲存庫的快照,因此 "changes since session started" 涵蓋所有工具,即使重新啟動或恢復也能持續,不會碰觸檔案、分支或暫存區。
- 自動偵測開啟資料夾內直接包含的每個儲存庫。
- 每個儲存庫都有工作樹選擇器;除非主動要求,否則隱藏 detached scratch checkout。
- 五種比較模式:未提交 vs HEAD、未暫存 vs 已暫存、已暫存 vs HEAD、分支 vs base(PR 檢視),以及工作階段開始以來的變更。
- 顯示變更與字詞醒目的檔案樹和 diff,支援淺色與深色主題。
安裝:複製 https://github.com/nvsravank/multirepo-diff-mod 接著執行 claude --plugin-dir /path/to/multirepo-diff-mod 和 /multi-diff。對 Desktop 應用程式,將資料夾加入 ~/.claude/settings.json env 區塊中的 CLAUDE_CODE_PLUGIN_DIRS。在 macOS 上測試過;Windows 尚未測試。
給 mod 作者的備註(Desktop 應用程式,engine 2.1.286):format 'diff' 程式碼區塊在 Desktop 上會以純文字顯示;超過約 300 列的大面板可能凍結按鈕或下拉選單(以 150 列分頁可避開);程式碼區塊上限為 10,000 個字元,因此大型 diff 必須拆開;面板以單一頁面捲動,沒有獨立捲動區域或固定標頭;mod 無法讀取應用程式主題,因此面板使用手動淺色/深色切換。希望提供的 API 功能:可捲動區域、固定頂部區域,以及主題公開功能。
安裝
安裝方式請查看原始來源。
原文 / README
Claude Code Mod for Diffs I kept VS Code open just to check diffs, and /diff didn't fix it for me: it misses changes Claude makes with Python or shell scripts, and it shows nothing when the folder I open isn't a git repo. I keep backend and frontend repos side by side in one project folder. So I built a mod. /multi-diff opens a pane with: Git-based diffs. A git snapshot of every repo when the session starts (or on /clear ), so "changes since this session started" shows everything, by Claude or anyone, by any tool, and survives a restart and resume. Your files, branches and staging area are never touched. Automatic repo detection. Every repo in the folders directly inside the one you open. Worktrees. Each repo's worktrees in a picker; detached scratch checkouts are hidden until you ask. Five compare modes. Uncommitted vs HEAD, unstaged vs staged, staged vs HEAD, branch vs base (the PR view, without opening a PR), and changes since the session started. A file tree and a diff with change and word highlighting, in light and dark themes. All the ways to see Diffs Repo (MIT): https://github.com/nvsravank/multirepo-diff-mod To try it: clone it, then claude --plugin-dir /path/to/multirepo-diff-mod and run /multi-diff . For the Desktop app, add the folder to CLAUDE_CODE_PLUGIN_DIRS in the env block of ~/.claude/settings.json . Tested on macOS; Windows should work but is untested, so reports are welcome. Things I ran into, if you're building mods (Desktop app on engine 2.1.286): Code with format: 'diff' draws as plain text on Desktop. It's fine in the terminal. Reported as anthropics/claude-code#99535 . I draw my own rows on Desktop. Large panes go dead on Desktop. Past about 300 rows in one drawing, buttons and dropdowns stop working, with only ui_press not handled in ~/Library/Logs/Claude/main.log . Paging (150 rows) fixed it. Code blocks hold at most 10,000 characters , so big diffs need splitting into valid hunks. Panes scroll as one page. No independent scroll areas, and no fixed header. Mods aren't told the app's theme , so the pane has a light/dark toggle. What I'd like to see in the mods API: scrollable areas inside a pane, a fixed area at the top, and the app's theme exposed to mods. Bug reports and ideas welcome as GitHub issues. submitted by /u/Weary-Net1650 [link] [comments]
