
我一直在 Claude 改檔案時切去編輯器,於是做了一個直接在 Claude Code 裡面的檔案樹模組
一個 Claude Code 外掛,在對話旁停靠專案檔案樹,每列顯示 git 狀態,並標示本次工作階段的寫入。支援檔案預覽(Markdown、CSV、語法高亮的程式碼)、篩選、搜尋與 @提及插入。唯讀、不發出網路請求,可透過作者的市集以 /plugin install 安裝。

關於這個 mod
有件事一直困擾我:Claude 說「更新了 6 個檔案」,然後我要嘛盲目相信,要嘛得切到 bash 模式,或另開一個終端機或視窗來翻看那些檔案。所以我做了 /tree。它是一個模組(可以在 Claude Code 內繪製畫面的新型外掛),會在對話旁邊以檔案樹開啟你的專案。
它的功能:
- 每一列都有 git 狀態(M、A、?、ignored 等)。另外,本次工作階段中 Claude 寫入的檔案旁會有 ✻,讓你一眼看出實際改了什麼。
- 預覽你目前所在的檔案:Markdown 渲染、CSV 轉為表格、程式碼有語法著色。用方向鍵移動時預覽會跟著變;按 p 可釘住預覽,並在提示中加入所選檔案的 @提及。
- 現在只要按一個鍵就能指向正確的檔案:f 依名稱篩選樹狀結構,g 搜尋預覽檔案內的內容。
- /tree src/cli.ts 會直接開到該檔案。
- 會記住每個專案你開過哪些資料夾。
為了最佳體驗,請在全螢幕渲染模式下使用 Claude Code(/tui fullscreen)。此時面板停靠在對話旁,支援完整的滑鼠點擊與鍵盤操作。(若未使用全螢幕渲染,面板會顯示在提示列上方,只能用鍵盤操作。)
它刻意設計為唯讀:從不編輯檔案、不發出網路請求,唯一執行的指令是唯讀的 git。
安裝(需要 Claude Code 2.1.287 以上): /plugin install file-explorer --marketplace floheissler/cc-file-explorer
儲存庫:https://github.com/floheissler/cc-file-explorer(MIT,免費)
目前是 v0.1。CI 在 Linux、macOS 與 Windows 上執行,我在 WSL 中每天使用。歡迎回饋!
submitted by /u/Ape1108 [link] [comments]
安裝
安裝方式請查看原始來源。
原文 / README
Something that kept bugging me: Claude says "updated 6 files" and then I either trust it blindly or had to use bash mode or a second standalone terminal/pane to skim the files. So I built /tree. It's a mod (the new plugin type that can draw inside Claude Code) that opens your project as a file tree right next to the conversation. What it does: Git status on every row (M, A, ?, ignored...), plus a ✻ on files Claude wrote this session, so you can see at a glance what actually changed Preview of whatever file you're on: Markdown rendered, CSV as tables, code with syntax colors. The preview follows as you arrow through the tree, p pins it a drops an @mention of the selected file into your prompt. Pointing Claude at the right file is one key now f filters the tree by name, g searches inside the previewed file /tree src/cli.ts opens straight onto a file It remembers which folders you had open, per project For the best experience use claude code in fullscreen rendering (/tui fullscreen). It is docked next to the chat, full mouse click and keyboard support. (Without fullscreen rendering it opens above the prompt, keyboard only). It's read-only on purpose: never edits a file, no network calls, and the only thing it runs is git, read-only. Install (needs Claude Code 2.1.287+): /plugin install file-explorer --marketplace floheissler/cc-file-explorer Repo: https://github.com/floheissler/cc-file-explorer (MIT, free) It's v0.1. CI runs on Linux, macOS and Windows, and I use it daily in WSL. Love to hear your feedback! submitted by /u/Ape1108 [link] [comments]