一键导入
clipboard
Copy text to clipboard with optional rich formatting. Triggers on "copy to clipboard", "copy that", "pbcopy", "copy formatted", "copy rich text".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Copy text to clipboard with optional rich formatting. Triggers on "copy to clipboard", "copy that", "pbcopy", "copy formatted", "copy rich text".
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | clipboard |
| description | Copy text to clipboard with optional rich formatting. Triggers on "copy to clipboard", "copy that", "pbcopy", "copy formatted", "copy rich text". |
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):
cat <<'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:
cat <<'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:
cat <<'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:
swift -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:
rm -f /tmp/_clipboard_rich.html /tmp/_clipboard_rich.txt
'CLIPBOARD', 'CLIPBOARD_HTML', 'CLIPBOARD_TEXT') to prevent shell expansion<b>, <i>, <code>, <table>, <ul>/<li>, <h1>-<h6>, <pre>, etc.)