temp-output-clipboard
Installation
SKILL.md
Temp Output Clipboard
Follow this workflow whenever generating text output.
Workflow
- Determine format.
- Use Markdown (
md) by default. - If the user explicitly requests another format, use that format.
-
Generate the final text content.
-
Save the content to
/tmp, copy to clipboard, and get the file path:
cat <<'EOF' | <skill-dir>/scripts/save_output_and_copy.sh --format <format>
<generated text>
EOF
- Omit
--formatto keep default Markdown. - The script prints the created file path to stdout.
- Run this step in an environment that has real system clipboard access.
- Return the result.
- Include the generated text unless the user asks for path-only output.
- Include the file path returned by the script.
- If clipboard copy is unavailable, mention the warning and still provide the file path.
Execution Environment
- Execute scripts/save_output_and_copy.sh from a normal local shell session when clipboard behavior matters.
- Avoid restricted or isolated runtimes for clipboard verification (for example: sandboxes, CI runners, or locked-down containers), because clipboard commands may succeed without updating the host clipboard.
- If restricted execution is unavoidable, treat file creation as authoritative and report clipboard copy as best-effort.
Format Rules
- Default format:
md. - Map common requests to extensions:
markdown->mdtextorplain->txtyaml->ymlbashorshell->sh
- If the user provides a specific extension, use it directly.
Script
- Resolve the skill directory from the loaded skill path, then call scripts/save_output_and_copy.sh with an absolute path.
- Clipboard command priority:
pbcopywl-copyxclipxselclip.exepowershell.exewithSet-Clipboard