Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Copy text to clipboard with optional rich formatting. Triggers on "copy to clipboard", "copy that", "pbcopy", "copy formatted", "copy rich text".
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -30% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 64% | 0% |
| case-19 | ✗→✓ | ▲ Improved | -40% | 0% |
| case-20 | ✗→✓ | ▲ Improved | -9% | 0% |
Copy the most recent relevant text block from the conversation to the macOS system clipboard.
Use a heredoc to safely handle special characters (quotes, apostrophes, backticks, dollar signs):
bashcat <<'CLIPBOARD' | pbcopy <text to copy> CLIPBOARD
Use when the user wants formatting preserved for pasting into Slack, Word, Google Docs, Notion, etc. Sets both HTML and plain text on the clipboard via Swift, so the receiving app picks the richest format it supports.
Step 1: Write the HTML content to a temp file:
bashcat <<'CLIPBOARD_HTML' > /tmp/_clipboard_rich.html <html><body> <h2>Title</h2> <p>Paragraph with <b>bold</b> and <i>italic</i>.</p> <ul><li>Item one</li><li>Item two</li></ul> </body></html> CLIPBOARD_HTML
Step 2: Write the plain text fallback to a temp file:
bashcat <<'CLIPBOARD_TEXT' > /tmp/_clipboard_rich.txt Title Paragraph with bold and italic. - Item one - Item two CLIPBOARD_TEXT
Step 3: Set clipboard with both HTML and plain text using Swift:
bashswift -e ' import AppKit let html = try Data(contentsOf: URL(fileURLWithPath: "/tmp/_clipboard_rich.html")) let text = try String(contentsOfFile: "/tmp/_clipboard_rich.txt", encoding: .utf8) let pb = NSPasteboard.general pb.clearContents() pb.setData(html, forType: .html) pb.setString(text, forType: .string) '
Step 4: Clean up temp files:
bashrm -f /tmp/_clipboard_rich.html /tmp/_clipboard_rich.txt
<table> tags. Tables pasted into Slack appear as a broken mess of text. Instead of <table>, present tabular data as plain-text lines (e.g. Label: value per line, or use <pre> for aligned columns). This also applies to LinkedIn and most chat apps.'CLIPBOARD', 'CLIPBOARD_HTML', 'CLIPBOARD_TEXT') to prevent shell expansion<b>, <i>, <code>, <ul>/<li>, <h1>-<h6>, <pre>, etc.). Do NOT use <table> for Slack/chat targets — use line-per-row text instead.Other measured skills in the registry, with their headline benchmark lift.