跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

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.

文档与办公849skills/paste/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/coreyhaines31/makerskills/paste/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

/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):

PlatformReadWrite
macOSpbpastepbcopy < "$f"
Linux (Wayland)wl-paste -nwl-copy < "$f"
Linux (X11)xclip -selection clipboard -oxclip -selection clipboard < "$f"
Windowspowershell Get-Clipboard -Rawpowershell "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

InvocationDestination
/pasteplain (default)
/paste plainplain
/paste slackslack
/paste notionnotion
/paste twitter or /paste xtwitter
/paste linkedin or /paste lilinkedin
/paste emailemail (plain)
/paste email rich or /paste email htmlemail (rich/HTML)
/paste github or /paste ghgithub
/paste markdown or /paste mdmarkdown render
/paste htmlrender 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.
DestinationOutput 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 richRender 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).
markdownRender 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.
htmlRender 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.

相似的 Skill

pdf
anthropics/skills180k

pdf

Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

文档与办公

discernment-nudge
anthropics/skills180k

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

文档与办公

doc-coauthoring
anthropics/skills180k

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

文档与办公

docx
anthropics/skills180k

docx

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

文档与办公

pptx
anthropics/skills180k

pptx

Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.

文档与办公

canvas-design
anthropics/skills180k

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

文档与办公