home / skills / aidotnet / moyucode / clipboard-manager

clipboard-manager skill

/skills/tools/clipboard-manager

This skill helps you manage clipboard content by copying and pasting text or files with history and format conversion.

npx playbooks add skill aidotnet/moyucode --skill clipboard-manager

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
944 B
---
name: clipboard-manager
description: 复制和粘贴文本/文件到剪贴板,支持历史记录和格式转换。
metadata:
  short-description: 剪贴板操作
source:
  repository: https://github.com/asweigart/pyperclip
  license: BSD-3-Clause
---

# Clipboard Manager Tool

## Description
Copy and paste text and files to system clipboard with history tracking and format conversion.

## Trigger
- `/clipboard` command
- User needs clipboard operations
- User wants to copy/paste programmatically

## Usage

```bash
# Copy text to clipboard
python scripts/clipboard_manager.py copy "Hello World"

# Copy file content
python scripts/clipboard_manager.py copy --file document.txt

# Paste from clipboard
python scripts/clipboard_manager.py paste

# Paste to file
python scripts/clipboard_manager.py paste --output output.txt
```

## Tags
`clipboard`, `copy`, `paste`, `text`, `utility`

## Compatibility
- Codex: ✅
- Claude Code: ✅

Overview

This skill manages system clipboard operations: copy and paste text or files with a searchable history and optional format conversion. It exposes a simple command interface for programmatic clipboard control and supports redirecting clipboard content to or from files. It is lightweight and designed for automation and scripting workflows.

How this skill works

The tool provides commands to copy text or file contents into the system clipboard and to paste clipboard contents back to stdout or into a file. Each copy action is recorded in a local history store, allowing retrieval of previous entries. Built-in format conversion simplifies switching between plain text and common encodings when copying or pasting.

When to use it

  • Automating copy/paste tasks in scripts or CI jobs
  • Saving repeated clipboard snippets or templates for later retrieval
  • Copying file contents into the clipboard for quick sharing
  • Pasting clipboard contents into files from a headless or remote session
  • Converting clipboard formats during data exchange between tools

Best practices

  • Use history search to avoid overwriting frequently used snippets
  • Prefer file-based copy/paste for large or binary content to reduce memory use
  • Secure the history store if it may contain sensitive data
  • Use specific flags when copying binary versus text to preserve encoding
  • Script visually confirm paste targets in automation to prevent accidental data loss

Example use cases

  • Copy a short template into the clipboard for pasting into multiple documents
  • Capture a file's content into the clipboard for quick sharing via chat or email
  • Automate pasting configuration snippets into remote machines during deployment
  • Maintain a history of copied database queries or code snippets for reuse
  • Convert clipboard text encoding before pasting into an application that requires a different charset

FAQ

How do I copy a file into the clipboard?

Use the copy command with the file option to load file contents into the clipboard (example: copy --file document.txt).

Can I paste the current clipboard contents to a file?

Yes — use the paste command with an output path to write clipboard contents to a file (example: paste --output output.txt).