Skill: clipboard
When to Use
Use this skill when the user asks to:
- Copy text to the clipboard
- Read/get/paste clipboard contents
- Set the clipboard to a specific value
- Check what's currently on the clipboard
- Transfer text via clipboard
Input Parameters
| Parameter | Required | Description | Example |
|---|---|---|---|
action | Yes | Either read or write | read |
text | For write | The text to copy to clipboard | Hello World |
Procedure
-
Determine whether the user wants to read or write the clipboard
-
Run the bundled script:
# Read clipboard contents bash skills/clipboard/scripts/clip.sh read # Write text to clipboard bash skills/clipboard/scripts/clip.sh write "text to copy" -
Report the result to the user
Bundled Scripts
| Script | Type | Description |
|---|---|---|
scripts/clip.sh | SH | Read from or write to system clipboard |
Script Usage
# Read clipboard
bash scripts/clip.sh read
# Write text to clipboard
bash scripts/clip.sh write "Hello World"
# Pipe content to clipboard
echo "piped content" | bash scripts/clip.sh write
Example
copy "hello world" to the clipboard
what's on my clipboard?
paste the clipboard contents
set clipboard to the current date
read the clipboard