A file attachment plugin for Claude Code CLI. Opens a native macOS Finder file picker to attach files to your conversation — similar to the attach button in the VS Code extension.
> /claude-attach:attach
[Finder file picker opens]
[Select one or more files]
[Claude reads and analyzes the files]
/claude-attach:attach— Slash command with autocomplete supportattach:— Inline hook for instant file picker (no LLM delay)- Native macOS Finder file picker dialog
- Multiple file selection (Cmd+Click)
- Works in both terminal CLI and VS Code extension
- macOS (uses
osascriptfor native file picker) - Claude Code CLI
jq(brew install jq)
In Claude Code, run:
/plugin → Add Marketplace → jdrodriguez/claudecode-file-attach-plugin
Then enable the claude-attach plugin when prompted. Both the slash command and the attach: hook are installed automatically.
git clone https://github.com/jdrodriguez/claudecode-file-attach-plugin.git
cd claudecode-file-attach-plugin
bash install.shThen restart your Claude Code session.
> /claude-attach:attach
> /claude-attach:attach analyze this code
> /claude-attach:attach summarize these docs
Type /claude-attach and select attach from the autocomplete menu. Claude opens the file picker, reads the selected files, and follows your instructions.
> attach: review this file
> attach:
Type attach: anywhere in your prompt for an instant file picker — no LLM processing delay. The hook runs before Claude sees your prompt.
| Method | Speed | Autocomplete |
|---|---|---|
/claude-attach:attach |
~2-3s (LLM processes skill first) | Yes |
attach: |
Instant (hook runs pre-prompt) | No |
- Registers as a Claude Code plugin skill via the marketplace
- When invoked, instructs Claude to run
osascriptto open Finder - Claude reads the selected file(s) with the Read tool
- Claude responds based on file contents and your instructions
- Registered automatically via the plugin's
hooks.json - Runs before Claude processes your prompt
- Opens Finder file picker via
osascript - Injects selected file paths as additional context
- Claude sees the paths and reads the files
In Claude Code, run /plugin and remove the claude-attach plugin.
cd claudecode-file-attach-plugin
bash uninstall.shclaudecode-file-attach-plugin/
├── .claude-plugin/
│ └── marketplace.json # Marketplace manifest
├── plugins/
│ └── claude-attach/
│ ├── .claude-plugin/
│ │ └── plugin.json # Plugin manifest
│ ├── skills/
│ │ └── attach/
│ │ └── SKILL.md # /claude-attach:attach command
│ └── hooks/
│ ├── hooks.json # Hook configuration
│ └── attach-hook.sh # attach: instant hook script
├── skill/
│ └── SKILL.md # Standalone skill (manual install)
├── hooks/
│ └── attach-hook.sh # Standalone hook (manual install)
├── install.sh # Manual installer
├── uninstall.sh # Manual uninstaller
├── LICENSE
└── README.md
- macOS only — uses
osascript/ AppleScript for the native file picker - Linux/Windows support would require platform-specific file picker alternatives (PRs welcome!)
- The slash command has a ~2-3s delay due to LLM processing; use
attach:for instant response
PRs welcome! Some ideas:
- Linux support via
zenityorkdialog - Windows support via PowerShell
OpenFileDialog - File type filtering (images, code, documents)
- Drag-and-drop integration
MIT