Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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:

  1. If the user included content in the prompt (pasted, or referenced from earlier in the conversation), use that.
  2. Else, read the clipboard (commands below).
  3. 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 twitter
/paste linkedin or /paste li linkedin
/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:

  1. Stop. Don't copy yet.
  2. Report what was detected with the value masked (first 4 + last 4 chars only — e.g. sk-12...wxyz).
  3. Ask: "Spotted [type] in the content. Continue, redact (replace with [REDACTED]), or abort?"
  4. 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 \n or 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):

  1. 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 or echo: agent harnesses can hard-wrap heredocs (~70 chars) and indent every line, so the paste comes out broken while the chat looks fine.
  2. Copy from the file with the write command from Step 1.
  3. 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.
  4. 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.
  5. 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

Полный SKILL.md на GitHub

Установить paste в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/destinations.mdreferences/secret-patterns.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить paste с