From wsl-clipboard-fix
Guide the user through setting up WSL2 clipboard image paste fix - dependency installation, verification, and keybinding configuration
npx claudepluginhub zate/cc-plugins --plugin wsl-clipboard-fixThis skill uses the workspace's default tool permissions.
Use this skill when the user asks to set up, configure, or troubleshoot WSL2 image pasting in Claude Code.
Sets up WSL2 dev environment on Windows with shell config, Git, SSH keys, Node.js, Python, and cross-platform paths. Use for new Windows dev machines, first WSL2 configs, or adding tools.
Implements copy/paste operations using WPF Clipboard API for text (Unicode, RTF, HTML), images, file drops, and custom data formats in C# apps.
Create, start, stop, restart, or SSH into a headless Windows 11 VM running in Docker with KVM acceleration. Use for Windows tasks on Linux hosts without GUI.
Share bugs, ideas, or general feedback.
Use this skill when the user asks to set up, configure, or troubleshoot WSL2 image pasting in Claude Code.
Check that the user is running WSL2:
# Should show Microsoft in version string
grep -qi microsoft /proc/version && echo "WSL detected" || echo "Not WSL"
# Should show WSLInterop
ls /proc/sys/fs/binfmt_misc/WSLInterop* 2>/dev/null && echo "WSL2 confirmed" || echo "WSL1 or not WSL"
Two packages are required:
sudo apt update && sudo apt install -y wl-clipboard imagemagick
Verify:
wl-paste --version
convert --version | head -1
If wl-paste cannot connect to Wayland, ensure WSLg is working:
echo $WAYLAND_DISPLAY # Should show "wayland-0" or similar
ls /mnt/wslg/runtime-dir/wayland-0 2>/dev/null && echo "WSLg OK" || echo "WSLg not available"
The plugin automatically starts the clip2png watcher on session start. Verify it works:
# Test manual conversion
"${CLAUDE_PLUGIN_ROOT}/scripts/clip2png" --once
# Check daemon status
"${CLAUDE_PLUGIN_ROOT}/scripts/clip2png" --status
Windows Terminal intercepts Ctrl+V for text paste. To paste images in Claude Code, bind Alt+V:
Create or edit ~/.claude/keybindings.json:
{
"bindings": [
{
"context": "Chat",
"bindings": {
"alt+v": "chat:imagePaste"
}
}
]
}
Important: The file must have an object with a bindings array at the top level, NOT a bare array.
| Issue | Solution |
|---|---|
wl-paste not found | sudo apt install wl-clipboard |
convert not found | sudo apt install imagemagick |
| Wayland not available | Update to Windows 11 with WSLg support, or run wsl --update |
| Daemon not starting | Check cat /tmp/clip2png.log for errors |
| Image still not pasting | Run wl-paste -l to check clipboard formats; run clip2png --once manually |
| Alt+V not working | Check ~/.claude/keybindings.json format (must be object with bindings array) |