paste
БесплатноБез исполняемых скриптовНе проверенWhen you want to clean and reformat content (usually from your terminal) for pasting into Slack, Notion, Twitter/X, LinkedIn, email, GitHub, or plain text…
от coreyhaines31★ 965 звёзд на GitHubОб этом скилле
/paste — Clean content for any destination
Cleans terminal output (ANSI, box-drawing, prompt artifacts, etc.) and reformats per destination rules. Reads clipboard by default, writes back to clipboard + previews in chat.
Step 1 — Get the content
In order:
- If the user included content in the prompt (pasted, or referenced from earlier in the conversation), use that.
- Else, read the clipboard (commands below).
- If both empty, ask the user what to paste.
Clipboard commands by platform (read / write):
| Platform | Read | Write |
|---|---|---|
| macOS | pbpaste |
pbcopy < "$f" |
| Linux (Wayland) | wl-paste -n |
wl-copy < "$f" |
| Linux (X11) | xclip -selection clipboard -o |
xclip -selection clipboard < "$f" |
| Windows | powershell Get-Clipboard -Raw |
powershell "Get-Content -Raw '$f' | Set-Clipboard" |
$f is the temp file from the write procedure in Step 6. Always copy from a file, never from a heredoc or echo.
No clipboard (a remote, headless, or chat-bot agent): skip the clipboard, take content from the prompt, and return the cleaned text in a code fence.
Step 2 — Parse destination
| Invocation | Destination |
|---|---|
/paste |
plain (default) |
/paste plain |
plain |
/paste slack |
slack |
/paste notion |
notion |
/paste twitter or /paste x |
|
/paste linkedin or /paste li |
|
/paste email |
email (plain) |
/paste email rich or /paste email html |
email (rich/HTML) |
/paste github or /paste gh |
github |
/paste markdown or /paste md |
markdown render |
/paste html |
render to HTML file + open in browser |
If ambiguous, ask. Per-destination rules live in references/destinations.md.
Step 3 — Scan for secrets
Before any cleaning or copying, scan against patterns in references/secret-patterns.md.
If any match:
- Stop. Don't copy yet.
- Report what was detected with the value masked (first 4 + last 4 chars only — e.g.
sk-12...wxyz). - Ask: "Spotted [type] in the content. Continue, redact (replace with
[REDACTED]), or abort?" - Default to abort if no clear answer.
Step 4 — Universal cleaning
Strip from the content:
- ANSI escape codes —
\x1b\[[0-9;]*[a-zA-Z]and related (color codes, cursor movement, screen control) - Box-drawing chars —
╭ ─ ╮ │ ╰ ╯ ╞ ╡ ╤ ╧ ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ ━ ┃ ┏ ┓ ┗ ┛etc. Replace with simpler equivalents (-,|) or remove entirely depending on context. - Terminal prompt artifacts — leading
$,>,❯,%,#(when first non-whitespace on a line that looks like a shell prompt) - Carriage returns (
\r) — replace with\nor delete - Trailing whitespace per line
- Excess blank lines — collapse 3+ consecutive blank lines to 2
Step 5 — Apply destination rules
Read references/destinations.md and apply the relevant transform.
Step 6 — Output
Clipboard write procedure (every destination that writes to the clipboard):
- Write the cleaned content to a temp file with your agent's file-write tool, e.g.
/tmp/paste-<slug>.txt. Never pipe it through a shell heredoc orecho: agent harnesses can hard-wrap heredocs (~70 chars) and indent every line, so the paste comes out broken while the chat looks fine. - Copy from the file with the write command from Step 1.
- Verify the round trip. Read the clipboard back and compare it to the file, e.g.
pbpaste | cmp -s - "$f" && echo match(swap in the platform's read command; on Windows,powershell "(Get-Clipboard -Raw) -eq (Get-Content -Raw '$f')"). On a mismatch, report it and fall back to showing the text in a code fence. - Build the chat preview from what you read back, not from what you meant to copy. A preview from memory is how a mangled copy ships looking clean.
- Delete the temp file once verified. It can hold anything the user copied, including text the secret scan let through.
| Destination | Output behavior |
|---|---|
| plain / slack / notion / twitter / linkedin / email / github | (a) Show preview in a code fence in chat. (b) Clipboard write procedure above; preview comes from the read-back. |
| email rich | Render to HTML, write to /tmp/paste-<timestamp>.html, open it in the browser (open on macOS, xdg-open on Linux, start on Windows). Skip clipboard (the user copies from browser to preserve rich text). |
| markdown | Render the cleaned markdown directly in chat (most agent UIs render it). Also copy raw markdown to the clipboard via the write procedure. Offer: "Open as HTML too?" — if yes, write and open. |
| html | Render to HTML, write to /tmp/paste-<timestamp>.html, open it in the browser. Skip clipboard. |
After output, report a one-line summary of what was cleaned (e.g., "Stripped 12 ANSI codes, 4 box-drawing chars, 1 prompt artifact. Character count: 248 / 280 (X). Clipboard round-trip verified.").
Length warnings
Twitter and LinkedIn have practical limits. the user said "let m
Установить paste в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл paste?
When you want to clean and reformat content (usually from your terminal) for pasting into Slack, Notion, Twitter/X, LinkedIn, email, GitHub, or plain text. Strips ANSI codes, box-drawing chars, terminal prompt artifacts, and applies destination-specific formatting. Default input is the system clipboard; default output is both the clipboard and a chat preview. Triggers on "/paste", "/paste [destination]", "clean this for X," "format for slack/notion/twitter/linkedin/email/github," "render as markdown," "paste-ready," "strip formatting," "make this copy-pastable." Default destination is plain. Also scans for secrets (API keys, tokens, .env values) and warns before copying anything sensitive.
Как установить скилл paste?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл paste запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic