Skip to content
Back to skills

Clipboard

ASecurity

Copy last output, draft, snippet, or handoff prompt to system clipboard (/clipboard) via pbcopy/wl-copy/xclip.

  • 14 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 4, 2026
ai-agentspythongoshellbashgitbackenddocumentation

Works with

  • terminal
  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add fmind/dot --skill clipboard --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clipboard?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clipboard
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fmind-clipboard/badge)](https://www.skillsdirectory.com/skills/fmind-clipboard)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: clipboard
description: "Copy last output, draft, snippet, or handoff prompt to system clipboard (/clipboard) via pbcopy/wl-copy/xclip."
license: MIT
metadata:
  kind: task
  author: Médéric HURIER (Fmind)
  source: github.com/fmind/dot/tree/main/skills/clipboard
  created: "2026-10-03"
  updated: "2026-11-28"
---

# Clipboard

`/clipboard` copies the latest requested deliverable; optional arguments select a specific output or format.

## Workflow

1. **Select the deliverable verbatim**: draft, prompt, command, snippet, table, or test output—without assistant preambles, tool logs, or surrounding code fences (unless Markdown was requested). Never regenerate or guess missing context; ask if multiple outputs fit.
1. **Pipe UTF-8 stdin to [scripts/copy.py](scripts/copy.py)** via `python3 -I` and structured stdin or a single-quoted heredoc (never shell interpolation or argv). Pipe from a `0600` scratch file (`< "$file"`) if the payload contains `CLIPBOARD_PAYLOAD` or exceeds 1 MiB (which belongs in a file anyway); pass `--keep-final-newline` when a trailing newline is part of the deliverable:

   ```bash
   python3 -I ~/.agents/skills/clipboard/scripts/copy.py <<'CLIPBOARD_PAYLOAD'
   The selected deliverable goes here, unchanged.
   CLIPBOARD_PAYLOAD
   ```

1. **Confirm without repeating the payload**: `copy.py` verifies the clipboard byte-for-byte across macOS (`pbcopy`) and Linux (`wl-copy`/`xclip`, 5s timeout). On failure, report the native diagnostic without retrying or claiming success.

## Boundaries

- **Install backends only with consent**: `xclip` or `wl-clipboard` matching the session; never `sudo`.
- **No OSC 52 in tool output**: captured stdout may never reach the user's terminal.
- **Copy ≠ paste**: replacing the clipboard never authorizes pasting or sending elsewhere.

## Documentation

- [xclip](https://github.com/astrand/xclip) · [wl-clipboard](https://github.com/bugaevc/wl-clipboard) · Releases: [xclip](https://github.com/astrand/xclip/releases), [wl-clipboard](https://github.com/bugaevc/wl-clipboard/releases)
- Companions: [task-prompts](../agent-harnesses/references/task-prompts/GUIDE.md), [write/mail](../write/references/mail/GUIDE.md).

Files in this skill

  • SKILL.md2.5 KB
  • references/platforms.md1006 B
  • scripts/copy.py4.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.