К основному содержанию
скилл CX Codex

paste — скилл для Claude Code: очистка текста для вставки

Скилл paste очищает вывод терминала от ANSI-кодов, псевдографики и артефактов командной строки, форматирует под Slack, Notion, Twitter, LinkedIn, email, GitHub или plain text.

MIT 380 установок ★ 932 обновлён 2026-10-22

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add coreyhaines31/makerskills --skill paste -a claude-code
Открыть на GitHub

Что делает paste

Скилл читает системный буфер обмена (или текст из промпта), удаляет escape-последовательности цвета, символы рамок (╭─╮│╰╯), приглашения шелла ($, ❯), переносы каретки и лишние пробелы. Вызывается командой /paste или /paste [destination]; умолчание — plain. Для каждой платформы назначения применяет свои правила: в Slack превращает **bold** в *bold*, для Twitter и LinkedIn считает символы и предупреждает о превышении лимита (280 и 400 знаков), для email rich и HTML рендерит и открывает в браузере.

Перед копированием сканирует содержимое на утечку секретов: ключи API, токены, значения из .env. Если находит — останавливается, маскирует значение (первые 4 + последние 4 символа) и спрашивает, что делать: продолжить, заменить на [REDACTED] или отменить. Запись в буфер идёт через временный файл, чтобы избежать переносов строк и отступов, которые вносят heredoc-конструкции в шелле; после записи скилл читает буфер обратно, сверяет с файлом и показывает в чате именно то, что скопировалось. Если round-trip не совпал — сообщает и выводит текст в code fence. Для Twitter и LinkedIn отдельно выносит URL и напоминает, что ссылки ставятся в первый комментарий или реплай, не в тело поста.

Какие задачи решает

  • очистить логи терминала от цветовых кодов и псевдографики перед вставкой в Slack
  • отформатировать вывод команды для публикации в GitHub issue или Twitter
  • обнаружить API-ключи и токены в буфере перед копированием в публичный канал
  • подогнать текст под лимит символов LinkedIn (400) или Twitter (280) с предупреждением
  • сохранить форматирование при рендере markdown-таблицы в HTML для вставки в Notion

Примеры запросов агенту

  • /paste slack — очисти буфер и переформатируй для Slack
  • /paste twitter — проверь на секреты, удали ANSI, покажи счётчик символов и скопируй
  • Сделай из этого лога paste-ready plain text

Как установить paste

1Через Skills CLI (Vercel)

npx skills add coreyhaines31/makerskills --skill paste -a claude-code

2Вручную: положить файлы

~/.claude/skills/paste/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/paste/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о paste

Как установить paste в Claude Code?

Выполни npx skills add coreyhaines31/makerskills --skill paste -a claude-code, инструкция окажется в ~/.claude/skills/paste/SKILL.md.

Что делает paste?

Читает буфер обмена или текст из промпта, удаляет ANSI-коды, символы рамок, приглашения шелла и форматирует под выбранную платформу (Slack, Notion, Twitter, LinkedIn, email, GitHub, plain text). Перед копированием проверяет содержимое на утечку секретов.

Почему paste записывает через временный файл, а не через echo?

Heredoc и echo в некоторых окружениях агентов переносят длинные строки на ~70 символов и добавляют отступы, из-за чего скопированный текст ломается, хотя в чате выглядит нормально. Запись через файл и обратное чтение из буфера гарантируют, что preview совпадает с тем, что реально скопировалось.

Исходный текст

SKILL.md · MIT
---
name: paste
description: 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.
metadata:
  version: 0.2.0
---

# /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 me trim" — don't refuse or auto-truncate.

- **Twitter/X**: warn if >280 chars. Note the overage.
- **LinkedIn**: warn if >400 chars (comfort line, not hard limit).
- Other destinations: no length warning.

## URL handling for social destinations

If the content has URLs and destination is **twitter** or **linkedin**:
- Surface the URLs separately (don't include them in the body)
- Remind the user: links go in a first comment (LinkedIn) or reply (X), not the body
- See `makerskills:jab-hook` and `feedback_social_link_placement.md` in your memory store (your agent's memory, or `${MAKERSKILLS_MEMORY:-${MAKERSKILLS_CONFIG:-$HOME/.config/makerskills}/memory}/`)

## Examples

```
/paste slack
```
→ Reads clipboard, strips ANSI, converts `**bold**` to `*bold*`, copies to clipboard, shows preview.

```
/paste twitter
[pasted error log]
```
→ Uses pasted content (ignores clipboard), strips everything, warns at 412/280 chars, copies, asks if the user wants to trim or pick a different destination.

```
/paste html
[pasted markdown table]
```
→ Renders table as HTML, opens in browser. the user selects + copies into Notion/email with formatting preserved.

```
/paste
[pasted output with sk-anthropic-key in it]
```
→ Stops. *"Spotted what looks like an Anthropic API key: `sk-an...3kf9`. Continue, redact, or abort?"*

## Composes with

- `jab-hook` — clean output for pasting into Typefully drafts when the MCP path doesn't fit; also enforces the link-placement rule for X/LinkedIn destinations
- `social-fetch` — clean a fetched post before quoting it in a draft or newsletter
- `second-brain` — `paste` output can be captured cleanly into `raw/note-<slug>.md` for future compilation
- `watch-video` — transcript / summary output often flows through `paste` for platform-specific reformatting

## Notes on quality

- **The clipboard write procedure is not optional.** File → copy from file → read back and compare → preview from the read-back. Origin: 2026-07-31, a heredoc-piped copy shipped hard-wrapped and indented while the chat preview looked clean; the user caught it, not the verification.
- **Secret detection runs first, always.** Before any formatting or destination logic, `paste` scans for `sk-*`, `AKIA*`, `xoxb-*`, JWT-shaped strings, and long-hex tokens. Prompts before proceeding on any hit. Better to false-positive occasionally than to leak a real key.
- **Destination-aware transforms, not one-size-fits-all.** Slack wants `*bold*`; LinkedIn wants unicode-styled bold; email wants HTML. Same input, 9 different valid outputs. The destination flag is not optional.
- **ANSI codes get stripped for every destination.** Terminal escapes (`\033[31m` etc.) render as garbage everywhere except the source terminal.
- **Character limits are enforced, not warnings.** X at 280, LinkedIn at 3000, Twitter at 25000 — paste refuses to copy over-limit output and offers a trim strategy.
- **Links go in first comments for social destinations** — not the body. Enforced when destination is `twitter` or `linkedin`. Documented in `feedback_social_link_placement.md` in your memory store.
- **HTML destination opens in a browser tab, not the clipboard.** Formatted tables + code blocks need a rendered surface to select-and-copy from with formatting preserved. Copying raw HTML to the clipboard produces garbage in Notion/email.

© coreyhaines31 · MIT · coreyhaines31/makerskills

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

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
connect-apps Composio Плагин connect-apps для Claude Code, который подключает к 500+ приложениям: Gmail, Slack, GitHub, Notion и другим. Выполняет действия прямо из кода — отправляет письма, создаёт задачи, постит сообщения. ★ 2 003звёзд репо ops-comms Lifecycle Innovations Limited Скилл ops-comms для Claude Code и Cursor читает и отправляет сообщения через WhatsApp, email, Slack, Telegram, Discord и Notion. Обращается к контакту или находит переписку напрямую из Claude Code. CX Codex +1 ★ 3 785звёзд репо ops-inbox Lifecycle Innovations Limited Скилл ops-inbox сканирует входящие сообщения во всех подключённых каналах и помогает разобрать переписки до нуля. CX Codex +1 ★ 3 785звёзд репо foundation-stakeholder-update product-on-purpose Скилл foundation-stakeholder-update для Claude Code превращает итоги встречи в сообщение для заинтересованных сторон. Он выделяет призыв к действию и адаптирует текст под аудиторию и канал. CX Codex +1 786установок local-mcp LMCP Плагин local-mcp для Claude Code и Codex запускает локальный MCP-сервер и даёт ассистенту доступ к почте, календарю, мессенджерам и файлам на Mac или Windows. Позволяет обращаться к данным из нескольких приложений. CX Codex ★ 1 596звёзд репо Clippy neilberkman Clippy — MCP-сервер для Claude Code: передаёт файлы, текст и Markdown в буфер macOS для вставки в GUI-приложения и письма. CX Codex +1 ★ 253звёзд репо

Из того же набора20

Весь набор →
slide-deck Скилл slide-deck собирает презентации в React/Next.js: черновик по брифу, правки существующей колоды, конвертация PPTX и экспорт в HTML, PDF или на Vercel. CX Codex +1 392установок maker-council Скилл maker-council собирает симулированный совет из девяти известных фаундеров и операторов для разбора бизнес-решений о деньгах, найме, ценах и закрытии проектов. CX Codex +1 384установок skillify Скилл skillify для Claude Code, Codex и Cursor переводит рабочие процессы в файлы инструкций для агентов, адаптирует чужие наработки и тестирует готовые навыки. CX Codex +1 384установок loopify Скилл loopify помогает превратить «эту задачу надо гонять регулярно» в рабочий цикл: выбирает ритм, следит за идемпотентностью и ставит условие выхода. CX Codex +1 383установок toolify Скилл toolify для Claude Code: расспрашивает про инструмент, собирает файлы, переменные окружения и обработчик вебхуков. Подключает Stripe, Supabase или MCP-сервер к проекту. CX Codex +1 380установок pm Скилл pm для Claude Code и Codex ведёт канбан по каждому проекту или бизнесу и сортирует задачи по матрице Эйзенхауэра. Держит несколько досок и выбирает, за что браться следующим. CX Codex +1 365установок unstuck Скилл unstuck, который включается, когда задача упёрлась в «невозможно»: классифицирует тип стены и прогоняет её через набор приёмов латерального мышления, пока не появятся рабочие обходы. CX Codex +1 332установок ingest Превращает расшифровки звонков, сообщения и заметки встреч в список решений и задач. По команде /ingest он также может создать GitHub issues и подготовить черновик ответа. CX Codex +1 134установок

Ещё в каталоге

Спонсоры проекта

Компании, которые помогают держать аналитику открытой