A tiny Claude Code skill that copies text to your clipboard.
Claude Code doesn't have a built-in clipboard command (yet). This skill adds /yank so Claude can copy things for you—prompts, code snippets, formatted output—without you having to select and copy manually.
mkdir -p ~/.claude/skills/yank
curl -o ~/.claude/skills/yank/SKILL.md \
https://raw.githubusercontent.com/joelev/yank/main/SKILL.mdThen restart Claude Code or start a new session.
/yank Hello world # yanks "Hello world"
/yank # offers to yank recent context
Claude will also offer to yank when it generates something you might want to paste elsewhere.
Works on macOS, Linux (X11 & Wayland), and WSL. (Probably.) Claude Code provides platform info automatically—no detection scripts needed.
| Platform | Clipboard command |
|---|---|
| macOS | pbcopy |
| Linux (X11) | xclip -selection clipboard |
| Linux (Wayland) | wl-copy |
| WSL | clip.exe |
To skip permission prompts, add to ~/.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(echo * | pbcopy:*)",
"Bash(cat <<* | pbcopy:*)"
]
}
}Adjust for your platform's clipboard command.
MIT — do whatever you want with it.