From wsl-clipboard-fix
Guides WSL2 users through fixing clipboard image pasting in Claude Code: installs wl-clipboard and imagemagick, verifies WSLg and environment, sets up Alt+V keybinding, and provides troubleshooting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/wsl-clipboard-fix:setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when the user asks to set up, configure, or troubleshoot WSL2 image pasting in Claude Code.
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) |
npx claudepluginhub zate/cc-plugins --plugin wsl-clipboard-fixSets up a complete WSL2 development environment with shell config, essential tools, Git, SSH, Node.js, Python, and cross-platform path management for Windows development.
Implements copy/paste operations using WPF Clipboard API for text (Unicode, RTF, HTML), images, file drops, and custom data formats in C# apps.
Creates, manages, and connects to a headless Windows 11 VM in Docker with SSH access. Use for spinning up, stopping, restarting, or SSH-ing into a Windows VM.