Add clipboard-history skill for querying Maccy on macOS

This commit is contained in:
Connor Rhodes 2026-05-22 13:17:10 -05:00
parent c556d5fecd
commit fdcc687364
2 changed files with 56 additions and 0 deletions

View file

@ -44,6 +44,7 @@ description: Master index of all skills in your robot assistant system. Your ass
| "transcribe this video," "get the subtitles," "what does this video say," "summarize this YouTube video," "YouTube transcript" | **youtube-transcript** | | "transcribe this video," "get the subtitles," "what does this video say," "summarize this YouTube video," "YouTube transcript" | **youtube-transcript** |
| "upload to s2," "s2," "s2 storage," "upload a file," "store this file" | **s2-storage** | | "upload to s2," "s2," "s2 storage," "upload a file," "store this file" | **s2-storage** |
| "make a query," "show all pages tagged," "build a filter," "list tasks in," "show recent notes," "create a silverbullet view," "make a live widget" | **silverbullet-query** | | "make a query," "show all pages tagged," "build a filter," "list tasks in," "show recent notes," "create a silverbullet view," "make a live widget" | **silverbullet-query** |
| "clipboard history," "from maccy," "what was on my clipboard," "get the last link I copied" | **clipboard-history** |
--- ---
@ -235,6 +236,12 @@ description: Master index of all skills in your robot assistant system. Your ass
**File:** `skills/silverbullet-query/SKILL.md` **File:** `skills/silverbullet-query/SKILL.md`
**Dependencies:** SilverBullet running with Space Lua enabled **Dependencies:** SilverBullet running with Space Lua enabled
### Clipboard History
**Purpose:** Retrieve items from clipboard history using Maccy on macOS. Query the Maccy SQLite database to find recently copied text, URLs, or search for specific content. macOS only.
**Triggers:** "clipboard history," "from maccy," "what was on my clipboard," "get the last link I copied"
**File:** `skills/clipboard-history/SKILL.md`
**Dependencies:** Maccy (`brew install --cask maccy`), macOS
--- ---
## Adding New Skills ## Adding New Skills

View file

@ -0,0 +1,49 @@
---
name: clipboard-history
description: |
Retrieve items from clipboard history using Maccy on macOS.
Triggers when user mentions:
- "clipboard history"
- "from maccy"
- "what was on my clipboard"
- "get the last link I copied"
---
## Quick Usage (Already Configured)
### Query clipboard history
Maccy stores history in a Core Data SQLite database inside its app sandbox. Query it directly:
```bash
# All recent clipboard items containing a URL
sqlite3 ~/Library/Containers/org.p0deje.Maccy/Data/Library/Application\ Support/Maccy/Storage.sqlite \
"SELECT h.ZTITLE, c.ZVALUE, datetime(h.ZLASTCOPIEDAT, 'unixepoch', 'localtime') FROM ZHISTORYITEM h JOIN ZHISTORYITEMCONTENT c ON c.ZITEM = h.Z_PK WHERE c.ZTYPE = 'public.utf8-plain-text' AND c.ZVALUE LIKE '%http%' ORDER BY h.ZLASTCOPIEDAT DESC LIMIT 10;"
```
```bash
# Last N clipboard items (any content type)
sqlite3 ~/Library/Containers/org.p0deje.Maccy/Data/Library/Application\ Support/Maccy/Storage.sqlite \
"SELECT c.ZVALUE, datetime(h.ZLASTCOPIEDAT, 'unixepoch', 'localtime'), h.ZAPPLICATION FROM ZHISTORYITEM h JOIN ZHISTORYITEMCONTENT c ON c.ZITEM = h.Z_PK WHERE c.ZTYPE = 'public.utf8-plain-text' ORDER BY h.ZLASTCOPIEDAT DESC LIMIT N;"
```
```bash
# Search clipboard history for specific text
sqlite3 ~/Library/Containers/org.p0deje.Maccy/Data/Library/Application\ Support/Maccy/Storage.sqlite \
"SELECT c.ZVALUE, datetime(h.ZLASTCOPIEDAT, 'unixepoch', 'localtime') FROM ZHISTORYITEM h JOIN ZHISTORYITEMCONTENT c ON c.ZITEM = h.Z_PK WHERE c.ZTYPE = 'public.utf8-plain-text' AND c.ZVALUE LIKE '%search_term%' ORDER BY h.ZLASTCOPIEDAT DESC LIMIT 10;"
```
## Important Notes
- This skill is macOS only. If the platform is not macOS, do not attempt to use it.
- The database is Core Data format with Z-prefixed tables: `ZHISTORYITEM` and `ZHISTORYITEMCONTENT`.
- Content types are stored in `ZTYPE`. The most common is `public.utf8-plain-text`. Other types include `public.png`, `public.file-url`, etc.
- The `ZVALUE` column is a BLOB but can be read as text for plain text entries.
- Timestamps are stored as Unix epoch in `ZLASTCOPIEDAT`.
- Maccy must be installed and running for this to work. Install via: `brew install --cask maccy`
## Database Schema Reference
- `ZHISTORYITEM`: main table with metadata (title, timestamps, source application)
- `ZHISTORYITEMCONTENT`: actual clipboard content, linked via `ZITEM = Z_PK`