Skip to main content

txt-copy

Copy generated text content to clipboard. Use when user asks to "copy this", "copy to clipboard", "save to clipboard", or after creating emails, messages, letters, or other text content that needs to be shared.

跳到安装

来源信息

仓库
umputun/cc-thingz
最近来源活动
2026年2月18日 03:12
检测到的 SKILL.md 语言
英语
星标
473
分支
52

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
txt-copy
description
Copy generated text content to clipboard. Use when user asks to "copy this", "copy to clipboard", "save to clipboard", or after creating emails, messages, letters, or other text content that needs to be shared.
allowed-tools
Bash
# Copy Text to Clipboard Copy generated text content to clipboard via a timestamped temp file. ## Activation Triggers - "copy this", "copy to clipboard", "save to clipboard" - "copy the email", "copy the message", "copy the letter" - After generating text content when user indicates they want to use it - "I need to paste this", "put it in clipboard" ## Workflow 1. Identify the text content to copy (from recent generation or user-specified) 2. Write to timestamped temp file: ```bash tmpfile="/tmp/claude-txt-copy-$(date +%s).txt" cat > "$tmpfile" << 'EOF' <content here> EOF ``` 3. Copy to clipboard and remove temp file: ```bash if [[ "$OSTYPE" == "darwin"* ]]; then pbcopy < "$tmpfile" elif command -v xclip &> /dev/null; then xclip -selection clipboard < "$tmpfile" elif command -v xsel &> /dev/null; then xsel --clipboard --input < "$tmpfile" else echo "No clipboard tool found" >&2 fi rm -f "$tmpfile" ``` 4. Confirm to user: "Copied to clipboard (N characters)" ## Notes - Use `cat` with heredoc and single-quoted EOF to preserve exact content - Temp file uses timestamp to avoid collisions across invocations - Temp file is removed after clipboard copy
在 GitHub 查看