paste

$npx mdskill add coreyhaines31/makerskills/paste

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.

SKILL.md

.github/skills/pasteView on GitHub ↗
---
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.

More from coreyhaines31/makerskills

SkillDescription
business-brainstormWhen you want to pressure-test a potential new business, product, or side project against the serial-founder filter. Not \"marketing ideas for a product\" (that's marketing-skills:marketing-ideas) — this is \"should this business exist + can you win it.\" Runs the idea through a structured framework (problem, audience, wedge, monetization, moat, portfolio fit, distribution, energy fit, opportunity cost), checks domain availability via /domain, optionally triggers /deep-research for market validation, and outputs a viability brief: build / sleep on it / pass. Archives every idea to ~/.config/makerskills/business-brainstorm/archive/ so past work is searchable. Triggers on \"/business-brainstorm,\" \"/brainstorm,\" \"new business idea,\" \"should I build X,\" \"pressure test this idea,\" \"validate this idea,\" \"is X a good business,\" \"what about a [type] for [audience].\"
castmateWhen you want to pull in the right AI model for the right job: hand a task to another agent CLI (Codex, Claude, Gemini, Amp, OpenCode, Cursor, Kiro, Antigravity), or send one prompt to several at once for independent opinions, then synthesize. Delegate mode gives one castmate the job, optionally with write access ('have codex write the migration'). Fan-out mode runs read-only reviews in parallel. Rounds mode lets castmates build on and challenge each other's findings. Calls the official CLIs you already have installed and logged in (Gemini CLI needs an API key on personal accounts); no MCP. Triggers on '/castmate,' 'ask codex,' 'have gemini do this,' 'get a second opinion,' 'what would other models say,' 'fan this out,' 'cross-check this with another model,' 'delegate this to codex.' Advisor personas for founder questions go to maker-council. Personal models, casting rules, and run outputs live in ~/.config/makerskills/castmate/.
company-brainYour team's shared, AI-ready knowledge base — people, companies, meetings, SOPs, and decisions structured so an agent can answer on your team's behalf. Team-scope sibling to second-brain — personal notes go there, not here. Modes — capture, compile (wiki pages + INDEX.md), query (trust-weighted, saved to outputs/), review (verify / deprecate / supersede stale captures), lint, connect, search. Structured raw dirs (people/, companies/, meetings/, sops/, decisions/, customer-language/, sales-objections/). Every capture stamps author, timestamp, and trust status. Optional sync from call transcripts, Slack/email exports, CRM. Vault at ${COMPANY_BRAIN_VAULT:-$HOME/Documents/CompanyBrain}/. Triggers on "/company-brain," "/cb," "capture this into the team brain," "log this meeting," "save this SOP," "compile the company wiki," "query the team brain," "what does the team know about X," "review the company brain," "lint the company brain," "who's the internal expert on X."
company-cfoMonthly CFO workflow for a company or agency — pull raw data from bank + payment processor + payroll + expense management, categorize and reconcile, compute end-of-month cash via transaction-sum method, update a scenario projector for forward forecasting, write the monthly snapshot report, surface decisions to leadership. Modes — monthly (default; the standing report), weekly (thin cash pulse), scenario (ad-hoc modeling in the projector), pickup (resume where the prior run left off). Anonymized team-scope sibling to personal-cfo (which handles personal household finances). Composes with company-brain (report gets stored + wiki-indexed there), toolify (wire company-specific data sources), loopify (schedule the monthly + weekly runs). Triggers on "/company-cfo," "/cfo," "monthly cash report," "do the CFO snapshot," "CFO monthly," "let's run CFO," "cash projection," "runway forecast," "monthly financials," "cash pulse."
decideWhen you have a decision to make and want a structured workflow that picks the load-bearing questions, walks through them, reaches a call (or "wait"), and archives the rationale for future reference. Based on the 37signals Guide to Making Decisions (38 questions) plus house additions like Q39 opportunity cost ("what does saying yes displace?"). Triages to 6–8 relevant questions per decision instead of forcing the full set. Archives every decision to ~/.config/makerskills/decide/archive/ with a revisit date so you can check later whether the call was right. Triggers on "/decide," "help me decide," "should I [X]," "I need to make a decision about," "stuck on a decision," "deciding between," "go/no-go on," "what should I do about." This is both the decision-making workflow AND the decision log — making the decision is the act of logging it.
deep-researchWhen you want multi-source, multi-step research on a topic — competitor research before a sales call, market research for a new business idea, positioning angles, due diligence on a partnership or podcast guest, tech decision research (which DB, which auth), or any \"I need to actually understand X.\" Combines web search, URL fetch, agent-browser, last30days (Reddit/X/YouTube/HN/web recency), memory, and Notion. Outputs a structured brief with citations, contradictions, gaps, and recommended next steps. Archives every research run to ~/.config/makerskills/deep-research/archive/ so past work is searchable. Triggers on \"/deep-research,\" \"research X,\" \"investigate X,\" \"do a deep dive on X,\" \"look into X,\" \"what's actually happening with X,\" \"due diligence on X,\" \"validate this market.\" Differs from a one-shot web search: this is multi-pass with verification. Not for standing monitoring (radar) or pulling one post or video (social-fetch, watch-video).
domainWhen you want to brainstorm and check available .com domains for a new project — brand naming, aftermarket pricing (HugeDomains / Afternic / Sedo / Dan), USPTO trademark screening, and social handle availability. Built on Laura Roeder's \"work backwards from availability\" method. Combines Vercel CLI, whois, Domainr, Namecheap, and agent-browser, each for what it reliably does. Workflow: budget → brainstorm → availability check → whois cross-check → price → aftermarket sweep (plus liveness probe and drop-watch) → bucket → negotiate → trademark + socials → buy. Triggers on \"/domain,\" \"find a domain,\" \"check domain availability,\" \"brainstorm a domain,\" \"what .com is available for X,\" \"domain hunt,\" \"name my project,\" \"is X.com available,\" \"aftermarket price on X.com,\" \"trademark check for X.\"
ingestWhen you paste raw human input — a call transcript (Grain, Zoom, Granola, Fathom), a text or email from a client/partner/friend, a voice-memo dump, or meeting notes — and want it converted into structured work. Extracts decisions, action items (yours vs theirs), bugs/feature requests, and facts worth keeping; files GitHub issues in the right repo, captures to the second-brain vault, and drafts (never sends) the reply. Triggers on "/ingest", "ingest this", "here's my call with X," "here's the transcript," "this is from [person]," "[person] asked me this," "from [person]:", a pasted transcript with speaker labels, or a forwarded client message that clearly expects processing. Person→project routing lives in a private config; unknown senders get asked about once, then remembered.
jab-hookGary Vaynerchuk's jab-jab-jab-right-hook framework applied to a personal portfolio rotation on X and LinkedIn. Jabs = build-in-public + educational (value). Hooks = promo (the ask). Each property in the user's configured portfolio (see `~/.config/makerskills/jab-hook/properties.yaml`) gets a hook at least once every ~3 weeks; jabs fill the rest. Drafts go into the user's Typefully workspace via MCP. Modes — plan (7-day plan), pick-next (single post), audit (coverage report), draft (specific post). Triggers on "/jab-hook," "what should I post," "plan my socials," "next promo," "next jab," "next hook," "social rotation," "promote [property]," "BIP post," "audit my socials," "what haven't I posted about."
loopifyWhen you want to set up an agent loop, cron-scheduled task, or recurring workflow that runs autonomously. Judgment layer on top of Claude Code's ScheduleWakeup, CronCreate, and /loop — or, on other hosts, cron/GitHub Actions plus a headless agent CLI. Picks dynamic pacing, fixed cron, or a one-shot loop; designs idempotent loop bodies; sets bail-out conditions so loops don't run forever. Examples — weekly review pulse, daily brief, hourly metric monitor, periodic vault compile, upstream-check for an adapted skill. Triggers on "/loopify," "set up a loop," "schedule this task," "run this daily," "run this weekly," "cron this," "make this recurring," "automate this on a schedule," "keep this running until X." Part of the -ify trifecta (skillify / toolify / loopify). NOT for authoring a new skill — that's skillify. NOT for adding a tool/integration — that's toolify.