clipboard

Read and write macOS clipboard contents using pbpaste and pbcopy.

369|29|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/mikeyobrien/rho --skill clipboard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clipboard
Source: https://github.com/mikeyobrien/rho/tree/main/platforms/macos/skills/clipboard
Command: npx skills add https://github.com/mikeyobrien/rho --skill clipboard

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Read and write the macOS clipboard programmatically to streamline copy-paste tasks between apps, reducing manual dragging and typing.

Core Features & Use Cases

  • Read clipboard contents using pbpaste.
  • Write content to the clipboard using pbcopy.
  • Copy file contents to the clipboard with pbcopy < file.txt.
  • Copy the output of a command to the clipboard with a pipe to pbcopy, e.g., ls -la | pbcopy.
  • Use Case: Quickly capture terminal output or selected text for sharing in chats, emails, or documents.

Quick Start

Read from clipboard with: pbpaste Write to clipboard with: echo "text to copy" | pbcopy Copy a file's contents to the clipboard: pbcopy < file.txt Copy command output to the clipboard: ls -la | pbcopy

Frequently Asked Questions about clipboard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read and write to the macOS clipboard from the terminal?

Read clipboard contents with pbpaste and write to it with pbcopy. Use pbpaste to retrieve text, and pipe commands to pbcopy to send output to the clipboard, such as ls -la | pbcopy.

Can I copy a file's contents directly to the clipboard on macOS?

Yes, use pbcopy < file.txt to copy a file's contents to the clipboard without displaying it on screen. This works with any text file in your terminal workflow.

How do I automate copying command output to the clipboard?

Pipe your command directly to pbcopy, such as ls -la | pbcopy or grep pattern file.txt | pbcopy. The output goes to the clipboard instead of printing to the terminal.

Do I need to install additional software to use clipboard automation on macOS?

No, pbcopy and pbpaste are built into macOS and require only a standard shell environment. No external dependencies or installations are needed.

What's the fastest way to share terminal output without manual copy-paste?

Pipe your command to pbcopy to capture output directly to the clipboard in one step, eliminating manual selection and copying between terminal and applications.