agentleFS
shaunandrewsshaunandrews/agent-skills/skills/copy-to-clipboard/SKILL.md

copy-to-clipboard

Skill8 starsChanged 3 months agoMITView on GitHub

Copy exact text to the user's macOS clipboard. Use when the user asks to copy something to the clipboard, put something in their clipboard, copy the previous answer, copy "this" or "that", or otherwise make text immediately pasteable on macOS via pbcopy.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. magnusrodseth/dotfiles★ 3same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user says "this", "that", "it", or "the above", infer the target from the immediate conversation context.

    line 11
  2. Distinctive:

    If the target is ambiguous, ask one concise clarification before copying.

    line 12
  3. Very specific:

    Prefer a direct pbcopy invocation when possible.

    line 16
  4. Very specific:

    If pbcopy fails because pasteboard access is blocked by the sandbox, immediately retry the same copy operation with sandbox_permissions: …

    line 21
  5. Distinctive:

    Do not ask separately before the escalation request.

    line 22
  6. Distinctive:

    Do not repeat the copied text unless the user asks.

    line 26
  7. Distinctive:

    Do not modify files or create artifacts for clipboard-only requests.

    line 31
  8. Distinctive:

    Do not use the clipboard for secrets unless the user explicitly provided the secret and asked to copy it.

    line 32
  9. Distinctive:

    If the user asks to copy command output, run or summarize the requested command first only when needed, then copy the requested output.

    line 33

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Copy To Clipboard

Workflow

  1. Resolve the exact text to copy.
    • If the user says "this", "that", "it", or "the above", infer the target from the immediate conversation context.
    • If the target is ambiguous, ask one concise clarification before copying.
    • Preserve line breaks, bullets, code fences, URLs, and punctuation exactly unless the user asks for cleanup.
  2. Copy with macOS pbcopy.
    • Prefer a direct pbcopy invocation when possible.
    • For short text, a shell-safe command such as printf '%s' $'escaped text' | pbcopy is acceptable.
    • For long or quoting-sensitive text, start pbcopy in an interactive command session, send the text to stdin, then send EOF.
  3. Handle sandbox restrictions.
    • If pbcopy fails because pasteboard access is blocked by the sandbox, immediately retry the same copy operation with sandbox_permissions: "require_escalated" and a short justification such as "Do you want to allow writing this text to your macOS clipboard?"
    • Do not ask separately before the escalation request; the tool approval prompt is the confirmation.
  4. Confirm briefly.
    • Final response should be short, for example: "Copied it to your clipboard."
    • Do not repeat the copied text unless the user asks.

Guardrails

  • Copy only the content the user asked to copy.
  • Do not modify files or create artifacts for clipboard-only requests.
  • Do not use the clipboard for secrets unless the user explicitly provided the secret and asked to copy it.
  • If the user asks to copy command output, run or summarize the requested command first only when needed, then copy the requested output.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.