Screenshot To Devbox
Apps & Automationscreenshot-to-devboxScreenshot To Devbox is an Agent Skill for apps & automation published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use when you need to share a screenshot with Claude Code running on the devbox over SSH, since Ctrl+V image paste doesn't work remotely
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/screenshot-to-devbox/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/screenshot-to-devbox, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Screenshot to Devbox
Overview
Claude Code supports pasting images from the clipboard with Ctrl+V, but this only works when Claude Code can access the local OS clipboard. Over SSH, the remote Claude Code process can't see your Mac's clipboard.
Solution: Take a screenshot locally, upload it to the devbox, and reference the path.
Usage
From your Mac terminal (not inside SSH):
screenshot-to-devbox
Or use the alias:
ssdb
This will:
- Open macOS screenshot selection (crosshairs)
- Upload the selection to
~/.cache/claude-images/on devbox - Copy the remote path to your clipboard
Then in your SSH session with Claude Code:
Analyze this image: /home/dev/.cache/claude-images/screenshot-20240115-143022-12345-67890.png
Configuration
| Variable | Default | Description |
|---|---|---|
DEVBOX_HOST | devbox | SSH host alias |
SCREENSHOT_REMOTE_DIR | ~/.cache/claude-images | Remote directory for uploads |
How It Works
The script:
- Uses
screencapture -i -xto capture a selection silently - Generates a unique filename with timestamp and PID
- Creates the remote directory with 700 permissions
- Uploads via
scpand sets 600 permissions on the file - Copies the remote path to clipboard via
pbcopy
Troubleshooting
"Screenshot cancelled": You pressed Escape or clicked outside the selection. This is expected behavior.
SSH connection fails: Ensure your devbox host alias is configured in ~/.ssh/config and SSH keys are set up.
Permission denied on remote: The script creates directories with umask 077 and files with 600 permissions. If the parent directory has issues, check ~/.cache permissions.
Why Not Just Use iTerm2's it2ul?
iTerm2's it2ul upload tool can be flaky inside tmux (proprietary escape sequences don't always pass through cleanly for large files). This script uses standard scp which works reliably through any tmux session.
Related
- OSC 52 Clipboard - For text copy/paste over SSH