IT-BAER/claude-forge/tree/main/mods/file-explorer
file-explorer
一个 VS Code 风格的 Claude Code 文件浏览器。它打开一个面板,显示 session 工作目录的文件树,支持预览、编辑和保存文件,无需离开 session。
关于这个 mod
这是 Claude Code 的 VS Code 风格文件浏览器插件。打开面板后会显示工作目录的文件树,可以预览文件,也能在不离开 session 的情况下编辑和保存文件。支持 /files 命令、Git 状态标记、Markdown 和图片预览、语法高亮编辑器、查找和替换,以及多种安装方式。
安装
请先查看作者 README 确认 marketplace 和插件名称;命令可能随仓库结构改变。
claude plugin marketplace add IT-BAER/claude-forge claude plugin install file-explorer
原文 / README
file-explorer
A VS Code style file explorer for Claude Code. It opens a pane with the file tree of your session's working directory, previews files, and lets you edit and save them without leaving the session.
<img src="screenshots/file-tree.png" alt="File tree of a project folder" width="330">The pane on a project folder. Folders come first, ignored entries such as node_modules are dimmed, and the search box, refresh and collapse buttons sit at the top.
Install
Pick one way. All three need a new Claude Code session afterwards.
1. Plugin marketplace (recommended)
Run this in Claude Code:
/plugin marketplace add IT-BAER/claude-forge
/plugin install file-explorer@claude-forge
Or from a normal terminal:
claude plugin marketplace add IT-BAER/claude-forge
claude plugin install file-explorer@claude-forge
2. Copy the folder
git clone https://github.com/IT-BAER/claude-forge.git
mkdir -p ~/.claude/skills
rm -rf ~/.claude/skills/file-explorer
cp -r claude-forge/mods/file-explorer ~/.claude/skills/file-explorer
PowerShell:
git clone https://github.com/IT-BAER/claude-forge.git
Remove-Item "$HOME\.claude\skills\file-explorer" -Recurse -Force -ErrorAction SilentlyContinue
Copy-Item claude-forge\mods\file-explorer "$HOME\.claude\skills\file-explorer" -Recurse
Claude Code loads any plugin folder inside ~/.claude/skills/ at the next session start. The first command line removes an older copy, so run the pair again to update. Without it, a second copy ends up inside the first.
3. Try it for one session
claude --plugin-dir path/to/claude-forge/mods/file-explorer
Use it
Type /files to open the pane. Type it again to close it.
| Command | What it does |
| --- | --- |
| /files | Open or close the pane |
| /files on | Open the pane at every session start |
| /files off | Stop opening it at session start |
| /files <path> | Show another folder instead of the working directory |
| /files reset | Go back to the working directory |
Requirements
- Claude Code 2.1.x with the mod API, in the desktop app (Code tab) or the terminal.
- Windows. The preview, save and image scripts run with
powershell.exe. giton the PATH for git status colours (optional).
Features
File tree
- Folders open and close with a click. Git status shows as a coloured letter: M modified, U untracked, A added, R renamed, D deleted. Ignored files are dimmed.
- The search box matches file and folder names in all subfolders, also collapsed ones. Each result shows its parent folder. It skips
.gitandnode_modulesand stops at 20,000 entries. - Hover the icons at the top right: refresh the tree, or collapse all folders.
- Click a file to select it. Double-click opens the preview. Ctrl+click adds an
@pathmention to your prompt. - Click the … at the end of a row for a popup menu (a click outside the pane hides it): Open, Add to prompt, Rename, Duplicate, Delete (to the Recycle Bin, after a confirm), Copy path, Copy relative path, Reveal in File Explorer. Folders also offer New file and New folder.
The … menu of a row. Open and Add to prompt come first, then Rename, Duplicate and Delete, then the copy and reveal actions.
Preview
- Markdown files render with headings, tables, links and code blocks. A Source button shows the raw text with syntax colours.
- PNG, JPG, GIF and BMP images (up to 20 MiB) are scaled to fit the pane.
- Text files up to 2 MiB open. Binary files show a short notice instead.
Editor
<img src="screenshots/file-editor.png" alt="Editor with syntax colours" width="560">Editing CHANGELOG.md. The status line shows the caret position, encoding and line ending. Headings, links and inline code have their own colours, and wrapped list lines keep an indent guide.
Press Edit in the preview. Changes stay a draft until you press Save or Ctrl+S. Back asks before it discards a draft. If the file changed on disk in the meantime, the save is refused and your draft stays.
- In Claude Desktop the editor draws text in a monospace font on the pane's cell grid, so a click puts the caret exactly on the letter you clicked.
- Encoding (UTF-8, UTF-8 with BOM, UTF-16) and line endings are kept as they were.
- Syntax colours for TypeScript, JavaScript, C-like languages, Python, PowerShell, shell, JSON, YAML, TOML, SQL, CSS, HTML and Markdown (with fenced code in its own language).
- Soft wrap is on for Markdown and text files, off for code. The Wrap button switches it.
- The bracket next to the caret and its partner are highlighted. Leading indentation shows guides, trailing spaces and tabs show as dim marks.
- Files over 30,000 characters, with mixed line endings or with control characters open read-only.
| Keys | Action | | --- | --- | | Ctrl+S | Save | | Ctrl+Z, Ctrl+Y | Undo, redo | | Ctrl+A, Ctrl+C, Ctrl+X, Ctrl+V | Select all, copy, cut, paste | | Ctrl+Left, Ctrl+Right | Move by word | | Ctrl+Backspace, Ctrl+Delete | Delete a word | | Ctrl+D, Ctrl+K, Ctrl+L | Duplicate, delete, select the line | | Ctrl+/ | Comment or uncomment the selected lines | | Tab, Shift+Tab | Indent, outdent the selected lines | | Home | First non-blank character, then column 0 | | Double-click, triple-click | Select a word, a line |
Find and replace
Ctrl+F finds as you type and marks every match. Ctrl+H adds a replace field. The bar shows in the status line under the prompt.
| Keys | Action | | --- | --- | | Enter, Shift+Enter | Next, previous match | | Tab | Switch between the find and replace field (Ctrl+H) | | Enter in the replace field | Replace this match, go to the next | | Ctrl+Enter | Replace all matches (one undo step) | | Ctrl+F or Ctrl+H again | Close the bar |
Matching ignores case.
Settings
None are needed. An optional theme.json next to .claude-plugin/ tunes the look, for example { "radius": 4, "bgHover": "#262729", "bgPicked": "#343638", "rowH": 26.5, "searchCells": 22 }. The pane picks up changes within a few seconds.
Editor keys: cellW is the CSS width of one cell (default 7.92, measured on Claude Desktop at default zoom), codeFont the font size, codeBase the text baseline. "editorMono": false falls back to the proportional font, where clicks are less exact.
Limits
- The tree shows the first 800 rows of the current view.
- Edits are limited to 30,000 characters per file.
- The pane needs Claude Code's mod API, which changes between releases. After an upgrade the mod can need an update.
License
MIT, see the repository root.
其他同名作品
- file-explorertak-kam · ★ 0