clipboard-copy

Copy local file contents or piped text to the macOS clipboard.

5|1|Updated Jun 7, 2020
One-click install
npx skills add https://github.com/mseok/dot --skill clipboard-copy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clipboard-copy
Source: https://github.com/mseok/dot/tree/main/ai/codex/skills/clipboard-copy
Command: npx skills add https://github.com/mseok/dot --skill clipboard-copy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Copy local file contents or user-provided text to the macOS clipboard to enable fast transfer between tools and documents.

Core Features & Use Cases

  • Copy contents from a specified file by passing its path to the script, or rely on a default target when none is provided.
  • Copy generated text by piping it to the script's stdin for immediate clipboard-ready output.
  • Validate pbcopy availability and report precise success or error messages for troubleshooting.

Quick Start

Copy a file by passing its path to the script, or copy generated text by piping it to the script's stdin.

Frequently Asked Questions about clipboard-copy

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

FAQPage Schema
How do I copy a file to the clipboard in macOS?

To copy a file to the macOS clipboard, you pass the local file path to the script. The tool reads the file contents and uses pbcopy to make the text immediately available for pasting into other tools or documents.

Can I pipe text directly to the macOS clipboard from stdin?

Yes, you can pipe generated text directly to the script's stdin to copy it to the macOS clipboard. This enables immediate clipboard-ready output for fast text transfer between terminal commands and other applications.

Does the macOS clipboard copy tool work if I don't specify a file path?

Yes, the macOS clipboard copy tool works without a specified path by relying on a default fallback file target. If no target is provided, it automatically attempts to read from the default file to populate the clipboard.

Do I need pbcopy installed to copy text to the macOS clipboard?

Yes, you need pbcopy installed because the tool validates its availability before attempting to copy text. The script relies on this native macOS utility to transfer file contents or stdin input to the system clipboard.

What happens if the file path is invalid when copying to the clipboard?

If the file path is invalid, the script validates the target and returns specific error details instead of copying to the clipboard. This precise error reporting helps troubleshoot why the local file contents failed to load.