Txt Copy
Productivitytxt-copyTxt Copy is an Agent Skill for productivity published in the umputun/cc-thingz repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
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.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/umputun/cc-thingz/blob/HEAD/plugins/workflow/skills/txt-copy/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/txt-copy, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
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
-
Identify the text content to copy (from recent generation or user-specified)
-
Write to timestamped temp file:
tmpfile="/tmp/claude-txt-copy-$(date +%s).txt"
cat > "$tmpfile" << 'EOF'
<content here>
EOF
- Copy to clipboard and remove temp file:
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"
- Confirm to user: "Copied to clipboard (N characters)"
Notes
- Use
catwith 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