clip
Skill1 starsChanged 4 months agoMITView on GitHub
Take the most recent prior assistant message in this conversation, strip Claude Code's ⏺ bullet and 2-space indent, unwrap soft-wrapped paragraphs, and copy the result to the macOS clipboard in a target format (Markdown, Slack mrkdwn, plain text, or HTML). Use when the user says "/clip", "clip that", "copy that for Slack", "copy as plain text", "copy as html", or wants to grab Claude's prior output in paste-friendly form.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- OpenLAIR/dr-clawtheir own version, first seen Nov 8, 2026
- ashleysbrain/skillstheir own version, first seen Nov 8, 2026
- TakeOff-Team/claude-shortform-video-editortheir own version, first seen Oct 25, 2026
- jinhuang712/claude-code-cliptheir own version, first seen Oct 20, 2026
- youichi-uda/clip-claitheir own version, first seen Oct 15, 2026
- jmendozaf/clip-over-sshtheir own version, first seen Oct 11, 2026
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- OpenLAIR/dr-claw★ 1.2ksame name
- perso-ai/perso-dubbing-plugin★ 40same name
- TakeOff-Team/claude-shortform-video-editor★ 11same name
- ashleysbrain/skills★ 1same name
- Clay-HHK/claude-skills★ 1same name
- gitsang/skills★ 1same name
- mhiskall282/Securing-the-Digital-Mine-UNESCO-Project★ 1same name
- bloxy-studios/shorts-studio★ 0same name
- jinhuang712/claude-code-clip★ 0same name
- jmendozaf/clip-over-ssh★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- antipattern-detectorSkill
- architecture-reviewSkill
- assumption-challengerSkill
- cavemanSkill
- code-reviewerSkill
- diagnoseSkill
- feature-writerSkill
- gemini-advisorSkill
- gemini-reviewerSkill
- grill-meSkill
- image-generatorSkill
- issue-creatorSkill
- paper-bananaSkill
- pr-writerSkill
- publishSkill
- tddSkill
- teach-meSkill
- validatorSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 4 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
If /clip is invoked as the very first turn (no prior assistant message exists), tell the user there's nothing to clip and stop.
- Very specific: line 70
Use the quoted heredoc form (<<'CLIP_EOF') so $, backticks, and backslashes in the message stay literal.
- Very specific: line 71
If CLIP_EOF appears inside the message body, pick a different unique delimiter (e.g.
- Distinctive: line 85
Do not summarize or paraphrase the previous message.
- Distinctive: line 86
Do not edit the previous message before piping it.
- Distinctive: line 87
Do not attempt to do the Markdown→Slack/HTML/plain conversion in your head — always pipe through the CLI.
- Very specific: line 88
Do not include tool-call blocks, tool results, <system-reminder> content, or user messages in the clipped text.
- Distinctive: line 89
Do not re-print the cleaned result to the chat by default.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clip — Clean & Copy the Last Claude Message
Grabs the most recent prior assistant message in the current conversation,
runs it through the bundled reformatter (dist/clip/cli.js), and replaces the
macOS clipboard with the cleaned text in the requested format.
Designed for the case where the user wants to paste Claude's output somewhere
else (doc, email, Slack, Linear, a blog post) without the ⏺ bullet and
2-space indent that Claude Code applies to its rendered output.
Adapted from octavehq/claude-clip (MIT), reimplemented in TypeScript.
Modes
| Mode | What it does | Typical destination |
md | (default) Strip ⏺/indent, unwrap paragraphs, keep Markdown as-is | Linear, GitHub, Notion, docs |
slack | Convert Markdown → Slack mrkdwn (**bold**→*bold*, headers→bold, tables→aligned code blocks) | Slack messages, threads |
plain | Strip all Markdown syntax, keep the pure prose; links become label (url) | Email, SMS, plain-text notes |
html | Convert Markdown → HTML (paragraphs, lists, headers, tables, inline formatting) | CMS, blog editors, email HTML |
How to interpret user intent:
/clipor/clip md→md/clip slackor "copy that for Slack" or "Slack mrkdwn" →slack/clip plainor/clip emailor "plain text" or "strip formatting" →plain/clip htmlor "HTML version" →html
What "the last message" means
"The last message" = the most recent assistant (Claude) message in the
conversation immediately before the user invoked /clip. Not the user's
message. Not an earlier assistant message. The single most recent assistant
turn's full prose content.
If /clip is invoked as the very first turn (no prior assistant message
exists), tell the user there's nothing to clip and stop.
Requirements
- Platform: macOS (uses
pbcopy). On Linux/Windows the pipe target would need to change (e.g.xclip -selection clipboard). - Node.js on
PATHand the plugin built (dist/clip/cli.jsexists).
How to Execute
Pipe the prior message through the reformatter into the clipboard using a
single Bash call with a quoted heredoc so the message text is passed
verbatim without shell expansion. Pass the mode via -m:
cat <<'CLIP_EOF' | node {pluginDir}/dist/clip/cli.js -m <MODE> | pbcopy
<paste the full text of your previous assistant message here, verbatim>
CLIP_EOFReplace <MODE> with md, slack, plain, or html. If the user didn't
specify, use md.
Rules:
- Use the quoted heredoc form (
<<'CLIP_EOF') so$, backticks, and backslashes in the message stay literal. - If
CLIP_EOFappears inside the message body, pick a different unique delimiter (e.g.CLIP_EOF_7F3A). - Pass the message verbatim. Do not trim, summarize, rewrite, or otherwise modify the content — the CLI handles all whitespace and formatting normalization.
Then confirm with a single short line that includes the mode:
Clipped (slack). Paste with ⌘V.Nothing more. Do not echo the cleaned output back to the chat unless the user explicitly asks to see it.
What NOT to do
- Do not summarize or paraphrase the previous message.
- Do not edit the previous message before piping it.
- Do not attempt to do the Markdown→Slack/HTML/plain conversion in your head — always pipe through the CLI. The CLI is deterministic; ad-hoc LLM conversion is not.
- Do not include tool-call blocks, tool results,
<system-reminder>content, or user messages in the clipped text. - Do not re-print the cleaned result to the chat by default.
What the reformatter does
dist/clip/cli.js reads stdin and writes stdout (src/clip/reformat.ts):
- Normalize CRLF → LF
- Strip any leading
⏺marker from lines - Parse into typed blocks: paragraphs, fenced code, separators
- Dedent fenced code blocks by the fence's own indent (so Claude's 2-sp indent is removed from code)
- Unwrap soft-wrapped paragraph lines (join with spaces, but start a new logical line on list items, headers, table rows, blockquotes, and
**Label:**patterns) - Apply the mode-specific renderer (
md,slack,plain,html)
Example
User's prior assistant turn was:
⏺ What Else
# Key insight
The **qual-doctor** skill has a [hidden](https://x.com) duplicate of the
ads-resonance prediction card system, and neither one knows about the
other yet.
- First item that wraps across
multiple lines
- Second itemUser: /clip slack
Skill runs:
cat <<'CLIP_EOF' | node {pluginDir}/dist/clip/cli.js -m slack | pbcopy
⏺ What Else
# Key insight
The **qual-doctor** skill has a [hidden](https://x.com) duplicate of the
ads-resonance prediction card system, and neither one knows about the
other yet.
- First item that wraps across
multiple lines
- Second item
CLIP_EOFSkill replies: Clipped (slack). Paste with ⌘V.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

