
複数リポジトリと worktree に対応した diff ビューアーを Claude Code mod として作った。/diff が変更を見落とし続けたから
Repo(MIT)という Claude Code mod。複数のリポジトリと worktree をまたいで diff を確認する /multi-diff ペイン、5 種類の比較モード、セッション開始時の git スナップショット、ファイルツリーと強調表示付き diff ビューアーを追加します。

この mod について
作者は、Python や shell スクリプトによる変更を /diff が見落とし、非 git フォルダーでは何も表示しないことに気づき、複数リポジトリと worktree に対応した diff ビューアーを Claude Code mod として作りました。
機能:
- /multi-diff は Git ベースの diff と、セッション開始時(または /clear 時)に取得した全リポジトリのスナップショットを表示します。そのため "changes since session started" はすべてのツールを対象にし、ファイル、ブランチ、ステージングに触れずに再起動や再開後も維持されます。
- 開いたフォルダーの直下にあるすべてのリポジトリを自動検出します。
- リポジトリごとに worktree ピッカーを表示し、要求されない限り detached scratch checkout は隠します。
- 5 つの比較モード:uncommitted vs HEAD、unstaged vs staged、staged vs HEAD、branch vs base(PR ビュー)、セッション開始以降の変更。
- 変更と単語を強調表示するファイルツリーと diff、ライト・ダークテーマ。
インストール:https://github.com/nvsravank/multirepo-diff-mod を clone し、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):Desktop では format 'diff' コードブロックがプレーンテキストとして描画されます。約 300 行を超える大きなペインではボタンやドロップダウンが固まることがあります(150 行のページングで回避できました)。コードブロックの上限は 10,000 文字なので、大きな diff は分割する必要があります。ペインは独立したスクロール領域や固定ヘッダーのない 1 ページとしてスクロールします。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]
