copylisted
Install: claude install-skill harleensahni/copy-to-clipboard-plugin
# Copy to clipboard
## Two modes
### Mode A — proactive (skill auto-applied while constructing a response)
Trigger: your response is about to include text the user will need to paste somewhere external. Examples:
- A PromQL / LogQL / SQL query for Grafana Explore
- A shell command they should run themselves (NOT via the Bash tool)
- A config snippet for a file they edit by hand
- A JavaScript snippet they'll paste into the browser devtools console
- A long URL or a curl invocation carrying credentials
Action:
1. Show the text inline first — code-fenced as usual — so they can read it before deciding.
2. After the response body, use `AskUserQuestion` with one short question:
> "Copy *\<one-line description\>* to clipboard?"
Options: `Yes` / `No thanks`. Single-select. No multiSelect, no preview.
3. On `Yes`, run via Bash (quoted heredoc — keeps `$variables` and `` `backticks` `` from shell-expanding):
```bash
cat <<'PBCOPY_EOF' | "${CLAUDE_SKILL_DIR}/scripts/copy.sh"
<verbatim content>
PBCOPY_EOF
```
4. Confirm afterwards in one short line: `Copied.` If the helper exited non-zero it
printed an install hint on stderr — relay that instead of claiming success.
5. On `No`, do nothing further. Don't re-ask this turn.
If a response has multiple distinct copyable blocks, batch into ONE AskUserQuestion: `Copy A` / `Copy B` / `Copy both` / `Copy none` — not one prompt per block.
### Mode B — user-invoked (the user typed `/clipboard:copy ...`)
Trigger: you