clipboard-copy

Transfer text from remote shells to the local clipboard via OSC52.

4|Updated Mar 6, 2014
One-click install
npx skills add https://github.com/arecarn/dotfiles --skill clipboard-copy-arecarn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clipboard-copy
Source: https://github.com/arecarn/dotfiles/tree/main/agents/.config/ai-skills/skills/clipboard-copy
Command: npx skills add https://github.com/arecarn/dotfiles --skill clipboard-copy-arecarn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the challenge of copying text to a local clipboard from within sandboxed, headless, or remote terminal environments where standard clipboard access is blocked or unavailable.

Core Features & Use Cases

  • OSC52 Integration: Uses terminal escape sequences to communicate directly with your terminal emulator for clipboard operations.
  • Tmux Awareness: Automatically detects if you are inside a tmux session and delegates the copy operation to tmux buffers for reliable performance.
  • Use Case: When working on a remote server via SSH, use this skill to copy generated code snippets or logs directly to your local machine's clipboard without needing to manually highlight and copy text from your terminal window.

Quick Start

Use the clipboard-copy skill to copy the contents of the file named output.txt to your local clipboard.

Frequently Asked Questions about clipboard-copy

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

FAQPage Schema
How do I copy text to my local clipboard from a remote SSH session?

To copy text to your local clipboard from a remote SSH session, the skill uses OSC52 escape sequences to transmit the text directly through the terminal emulator, bypassing standard TTY limitations in headless environments.

Does copying text to the clipboard work inside a tmux session over SSH?

Yes, copying text works inside tmux sessions by automatically detecting the environment and delegating the copy operation to tmux buffers, ensuring reliable data transmission across various terminal emulators.

What is OSC52 and how does it transfer text to the local system clipboard?

OSC52 is a terminal escape sequence protocol that communicates directly with your terminal emulator to perform clipboard operations, allowing text content to transfer from sandboxed or remote shell environments to your local system.

Can I copy file contents to my local machine without highlighting text in the terminal?

Yes, you can copy file contents directly without manual highlighting by using the skill to read the text and send it via OSC52 escape sequences to your local system clipboard.

Why does standard clipboard access fail in headless or sandboxed terminal environments?

Standard clipboard access fails in headless or sandboxed environments because standard TTY limitations block direct system clipboard interaction, requiring terminal escape sequences or tmux integration to bypass these restrictions.

Are there limitations when using OSC52 to copy text across different terminal emulators?

OSC52 clipboard operations depend on terminal emulator support for escape sequences and require proper detection of terminal PTYs or tmux integration to successfully bypass TTY limitations and transfer data.