---
name: hammerspoon-clipboard
description: Use when you need to access, list, search, or retrieve items from the user's clipboard history managed by Hammerspoon's ClipboardTool spoon
---

# Hammerspoon Clipboard

Access the user's clipboard history (managed by Hammerspoon's ClipboardTool spoon) from the command line.

## Helper Script

`~/.claude/skills/hammerspoon-clipboard/clipboard.py` supports three commands:

```bash
# List recent items (numbered with previews)
python3 ~/.claude/skills/hammerspoon-clipboard/clipboard.py list -n 10

# Get full content of a specific item by index
python3 ~/.claude/skills/hammerspoon-clipboard/clipboard.py get 3

# Search clipboard history by keyword (case-insensitive)
python3 ~/.claude/skills/hammerspoon-clipboard/clipboard.py search "tailscale"
```

## Usage

When the user says things like:
- "paste from my clipboard" / "what did I copy?" → `list -n 5`, then `get` the relevant index
- "find that URL I copied" → `search` with a keyword
- "use my 3rd clipboard item" → `get 2` (0-indexed)

Items are ordered newest-first (index 0 = most recent copy).

## How It Works

Reads `ClipboardTool.items` from macOS preferences (`defaults export org.hammerspoon.Hammerspoon`), parsed via Python's `plistlib`. No IPC or `hs.ipc` module required — works as long as Hammerspoon is running with ClipboardTool loaded.
