{
  "markdown": "# Claude-Paste\n\n**Paste clipboard screenshots into Claude Code automatically.** Take a screenshot, type your message, and Claude sees it — no dragging files, no extra commands.\n\nBuilt for [Claude Code](https://claude.ai/claude-code), but the architecture is open and adaptable to any terminal-based AI tool (OpenCode, Gemini CLI, etc.).\n\n## How it works\n\n1. **Take one or more screenshots** (`Win+Shift+S`, `Cmd+Shift+4`, `Print Screen`, or any tool)\n2. **Type your message** in Claude Code and press Enter\n3. **Claude sees all your screenshots** — automatically attached in order, no extra steps\n\nThat's it. No `/paste` command, no dragging files from a folder, no file paths. Just screenshot → type → done.\n\n### Multiple screenshots\n\nTake as many screenshots as you need — Claude-Paste captures each one the moment it appears on your clipboard. They're all sent together when you type your message.\n\n### Smart freshness detection\n\nClaude-Paste only sends **fresh** screenshots. If you took a screenshot an hour ago to send to a friend, it won't accidentally get sent to Claude. The plugin tracks clipboard changes in real-time and only attaches images placed on the clipboard within the last 90 seconds.\n\n| Scenario | Result |\n|---|---|\n| Screenshot → type message immediately | ✅ Sent |\n| 5 screenshots in a row → type message | ✅ All 5 sent in order |\n| Screenshot → send to friend → Claude 10 min later | ⏭️ Skipped (stale) |\n| Old screenshot from hours ago | ⏭️ Skipped |\n| Explicit \"paste my clipboard\" | ✅ MCP tool works always |\n\n### How it works under the hood\n\n- **Background watcher** starts with your Claude session, monitors clipboard changes using OS-native APIs (Windows: `GetClipboardSequenceNumber`, macOS: `clipboard info`, Linux: `xclip`/`wl-paste`). Each new screenshot is saved to a queue directory immediately.\n- **Prompt hook** fires on every message — collects all fresh images from the queue, sends them to Claude in chronological order, then clears the clipboard\n- **MCP tool** (`paste_screenshot`) available as explicit fallback for when you want to paste regardless of freshness\n\n## Installation\n\n### One-command install\n\nIn Claude Code, run these two commands:\n\n```\n/plugin marketplace add VibeWithPhil/Claude-Paste\n/plugin install claude-paste@claude-paste-marketplace\n```\n\nThat's it. Restart Claude Code and you're ready to paste screenshots.\n\n### Enable auto-updates\n\nTo automatically receive new features and fixes when you start Claude Code, add `autoUpdate` to your marketplace config. Open `~/.claude/settings.json` and set:\n\n```json\n{\n  \"extraKnownMarketplaces\": {\n    \"claude-paste-marketplace\": {\n      \"source\": {\n        \"source\": \"github\",\n        \"repo\": \"VibeWithPhil/Claude-Paste\"\n      },\n      \"autoUpdate\": true\n    }\n  }\n}\n```\n\nOr manually update anytime with: `/plugin update claude-paste@claude-paste-marketplace`\n\n### Alternative: load directly\n\n```bash\nclaude --plugin-dir /path/to/Claude-Paste\n```\n\n## Requirements\n\n- **Node.js** (any version supported by Claude Code)\n- **No npm dependencies** — zero-dependency, pure Node.js built-ins only\n- **OS support:**\n  - ✅ Windows (PowerShell + Win32 API — built-in, nothing to install)\n  - ✅ macOS (auto-installs `pngpaste` via Homebrew on first run)\n  - ✅ Linux (auto-installs `xclip` and/or `wl-clipboard` on first run)\n\n### Zero configuration\n\nAll platform dependencies are installed automatically on the first session start. The plugin detects your OS, display server, and package manager — then installs what's needed silently. Supports `apt`, `dnf`, `pacman`, `zypper`, and `apk`.\n\n> **Note**: Linux auto-install uses `sudo -n` (non-interactive sudo). If your system requires a password for sudo, install manually: `sudo apt install xclip` (Debian/Ubuntu) or the equivalent for your distro.\n\n## Plugin structure\n\n```\nClaude-Paste/\n├── .claude-plugin/\n│   ├── plugin.json              # Plugin manifest\n│   └── marketplace.json         # Marketplace manifest\n├── .mcp.json                    # MCP server config\n├── hooks/hooks.json             # Hook definitions\n├── lib/clipboard.js             # Cross-platform clipboard API\n├── scripts/\n│   ├── hook.js                  # Prompt hook (auto-paste)\n│   └── watcher.js               # Background clipboard monitor\n├── server/index.js              # Zero-dep MCP server\n├── skills/configure/SKILL.md    # /claude-paste:configure command\n├── package.json\n├── LICENSE\n└── README.md\n```\n\n## Adapting for other tools\n\nClaude-Paste is built for Claude Code's plugin system (hooks + MCP), but the core logic is tool-agnostic:\n\n- **`lib/clipboard.js`** — Cross-platform clipboard detection, image saving, and clearing. Works standalone.\n- **`scripts/watcher.js`** — Background clipboard monitor with timestamp tracking. Writes to a JSON state file that any tool can read.\n- **`server/index.js`** — Minimal MCP server (JSON-RPC over stdio). Can be adapted to any MCP-compatible client.\n\nIf you're building integration for another terminal AI tool (OpenCode, Gemini CLI, Aider, etc.), you can reuse `lib/clipboard.js` and `scripts/watcher.js` directly — they have zero dependencies on Claude Code.\n\n## Configuration\n\n### Freshness threshold\n\nThe freshness window (how recent a screenshot must be to auto-send) defaults to **90 seconds**. There are two ways to change it:\n\n**Option 1: Slash command (easiest)**\n\nType `/claude-paste:configure` in Claude Code and pick from presets:\n\n| Preset | Seconds | Best for |\n|--------|---------|----------|\n| Fast | 60s | Screenshot and type immediately |\n| Default | 90s | Good balance for most users |\n| Relaxed | 120s | Extra time to compose your message |\n| Extended | 180s | When you need to think before typing |\n| Custom | any | Enter your own value |\n\n**Option 2: Manual setting**\n\nAdd this to your settings (`~/.claude/settings.json`):\n\n```json\n{\n  \"env\": {\n    \"CLAUDE_PASTE_FRESHNESS\": \"120\"\n  }\n}\n```\n\nOr set it in your shell profile for system-wide effect:\n\n```bash\nexport CLAUDE_PASTE_FRESHNESS=120\n```\n\n## License\n\n[MIT](LICENSE) — do whatever you want with it.\n",
  "bytes": 6060,
  "sha": "5ec881e440bc1038e11c6d557490ac0ba7cbffb75a7964308eb6833e618aedee",
  "repo_slug": "mailfnguides-del/claude-paste",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_mailfnguides_del_claude_paste_claude_pas_1e071d24/readme"
}