⧉ ctrl-clip
Put text on the user's clipboard so it pastes cleanly. The built-in /copy copies
the raw markdown of the last response — blockquotes turn into >/│ pipes and the
commentary comes along. This skill copies only the content meant to be pasted,
reformatted for its destination.
1. Decide WHAT to copy
Arguments: $ARGUMENTS
- If the arguments describe the content ("the Slack reply", "the PR description",
"the second draft"), copy that.
- Otherwise copy the most recent drafted message in the conversation (a Slack
reply, comment, email, PR text). If the last response had no draft, copy the whole
last response.
- Copy only the draft — never your own framing ("Here's a draft:", "Let me know
if…", labels, explanations).
- Keep the wording verbatim. Reformat, don't rewrite. Don't translate.
2. Format for the target
First word of the arguments selects the format; default is slack.
slack (default — also Teams, WhatsApp, chat)
- No blockquotes (
>), no headings (#), no tables, no horizontal rules.
- Tables → one line per row:
Label: value, value.
- Bold:
*text* (single asterisks). Italic: _text_. Keep inline `code` and
fenced blocks.
- Bullets with
- ; blank line between paragraphs.
- Links as bare URLs.
md (PR descriptions, Azure DevOps / GitHub comments, docs)
- Keep standard Markdown (headings,
**bold**, lists, tables, code fences).
- Still no blockquotes unless the content genuinely quotes someone.
plain (email body, forms, anything without markup)
- No markup at all: strip
*, _, backticks, #. Bullets become - .
- Tables →
Label: value lines.
3. Copy
- Write the formatted text with the Write tool to
clip.txt in the session
scratchpad directory (fall back to /tmp/claude-clip.txt if there is none). Using
a file avoids every shell quoting problem with $, backticks and quotes.
- Run:
${CLAUDE_SKILL_DIR}/clip.sh <that file>
The script strips leftover >/│/⏺ markers and trailing whitespace, then copies
via wl-copy, xclip, xsel, pbcopy, or OSC 52 (in that order).
4. Confirm
Reply with a single line: the script's ⧉ Copied … output plus the format used,
e.g. ⧉ Copied 6 lines / 412 chars (slack). Do not echo the copied text again.
If the script fails, show its error line.
Inline ⧉ copy link (whenever you draft a message to paste)
Every draft the user will paste somewhere gets a clickable copy icon (⧉, two
overlapping squares) labeled ctrl + click, as a reminder of how to trigger it.
<CLIP_DIR> below is the absolute path of ~/.cache/claude-clip, for example
/home/alice/.cache/claude-clip. The "Drafts to paste" rule loaded at session start
spells it out. If that rule is not in your context, run
${CLAUDE_SKILL_DIR}/clip-setup.sh once: it registers the Ctrl+click handler if needed
and prints CLIP_DIR=…. Never write ~ or $HOME into a path or link — neither is
expanded.
- Write the formatted text (section 2, no blockquote markers) with the Write tool
to
<CLIP_DIR>/<id>.claudeclip. <id> is a short unique slug matching
[A-Za-z0-9_-]{1,64}, e.g. slack-33247-review.
- In the response, show the draft as a blockquote — every line prefixed with
> ,
blank lines as >. The bar is how the user sees exactly what gets copied; nothing
else goes inside it.
- Right under the blockquote, on its own line:
[⧉ ctrl + click](file://<CLIP_DIR>/<id>.claudeclip)
The user Ctrl+clicks the link (a plain click does nothing). If copying breaks, check
<CLIP_DIR>/handler.log first — no entry means the click never reached the handler.
Why file://: Claude Code's fullscreen TUI refuses clicks on non-allowlisted schemes
(custom claude-clip:// links are never dispatched), but it opens local file://
links with xdg-open. *.claudeclip is registered as application/x-claude-clip,
whose default app is clip-url-handler.sh: it copies the file via clip.sh and shows
a desktop notification.
1---2name: ctrl-clip3description: ⧉ Copy a message to the system clipboard cleanly formatted — no blockquote pipes, no terminal bars, no Claude commentary. Use whenever you draft a message the user will paste (Slack, Teams, PR comment, email) to add a clickable "⧉ ctrl + click" copy link under it, and when the user says "/ctrl-clip", "copy that", "put it on the clipboard" (in any language). Optional argument picks the target format: slack (default), md, plain.4license: MIT5---67# ⧉ ctrl-clip89Put text on the user's clipboard so it pastes cleanly. The built-in `/copy` copies10the raw markdown of the last response — blockquotes turn into `>`/`│` pipes and the11commentary comes along. This skill copies **only the content meant to be pasted**,12reformatted for its destination.1314## 1. Decide WHAT to copy1516Arguments: `$ARGUMENTS`1718- If the arguments describe the content ("the Slack reply", "the PR description",19 "the second draft"), copy that.20- Otherwise copy the **most recent drafted message** in the conversation (a Slack21 reply, comment, email, PR text). If the last response had no draft, copy the whole22 last response.23- Copy **only the draft** — never your own framing ("Here's a draft:", "Let me know24 if…", labels, explanations).25- Keep the wording **verbatim**. Reformat, don't rewrite. Don't translate.2627## 2. Format for the target2829First word of the arguments selects the format; default is `slack`.3031**slack** (default — also Teams, WhatsApp, chat)32- No blockquotes (`>`), no headings (`#`), no tables, no horizontal rules.33- Tables → one line per row: `Label: value, value`.34- Bold: `*text*` (single asterisks). Italic: `_text_`. Keep inline `` `code` `` and35 ``` fenced blocks ```.36- Bullets with `- `; blank line between paragraphs.37- Links as bare URLs.3839**md** (PR descriptions, Azure DevOps / GitHub comments, docs)40- Keep standard Markdown (headings, `**bold**`, lists, tables, code fences).41- Still no blockquotes unless the content genuinely quotes someone.4243**plain** (email body, forms, anything without markup)44- No markup at all: strip `*`, `_`, backticks, `#`. Bullets become `- `.45- Tables → `Label: value` lines.4647## 3. Copy48491. Write the formatted text with the **Write** tool to `clip.txt` in the session50 scratchpad directory (fall back to `/tmp/claude-clip.txt` if there is none). Using51 a file avoids every shell quoting problem with `$`, backticks and quotes.522. Run:53 ```54 ${CLAUDE_SKILL_DIR}/clip.sh <that file>55 ```56 The script strips leftover `>`/`│`/`⏺` markers and trailing whitespace, then copies57 via wl-copy, xclip, xsel, pbcopy, or OSC 52 (in that order).5859## 4. Confirm6061Reply with a single line: the script's `⧉ Copied …` output plus the format used,62e.g. `⧉ Copied 6 lines / 412 chars (slack)`. Do **not** echo the copied text again.63If the script fails, show its error line.6465## Inline ⧉ copy link (whenever you draft a message to paste)6667Every draft the user will paste somewhere gets a clickable copy icon (`⧉`, two68overlapping squares) labeled `ctrl + click`, as a reminder of how to trigger it.6970`<CLIP_DIR>` below is the **absolute** path of `~/.cache/claude-clip`, for example71`/home/alice/.cache/claude-clip`. The "Drafts to paste" rule loaded at session start72spells it out. If that rule is not in your context, run73`${CLAUDE_SKILL_DIR}/clip-setup.sh` once: it registers the Ctrl+click handler if needed74and prints `CLIP_DIR=…`. Never write `~` or `$HOME` into a path or link — neither is75expanded.76771. Write the formatted text (section 2, no blockquote markers) with the **Write** tool78 to `<CLIP_DIR>/<id>.claudeclip`. `<id>` is a short unique slug matching79 `[A-Za-z0-9_-]{1,64}`, e.g. `slack-33247-review`.802. In the response, show the draft as a **blockquote** — every line prefixed with `> `,81 blank lines as `>`. The bar is how the user sees exactly what gets copied; nothing82 else goes inside it.833. Right under the blockquote, on its own line:84 `[⧉ ctrl + click](file://<CLIP_DIR>/<id>.claudeclip)`8586The user **Ctrl+clicks** the link (a plain click does nothing). If copying breaks, check87`<CLIP_DIR>/handler.log` first — no entry means the click never reached the handler.8889Why `file://`: Claude Code's fullscreen TUI refuses clicks on non-allowlisted schemes90(custom `claude-clip://` links are never dispatched), but it opens local `file://`91links with xdg-open. `*.claudeclip` is registered as `application/x-claude-clip`,92whose default app is `clip-url-handler.sh`: it copies the file via `clip.sh` and shows93a desktop notification.