alfred-clipboard
Access Alfred's clipboard history. Search recent copies, find text you copied earlier, and analyze clipboard patterns.
Best use case
alfred-clipboard is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Access Alfred's clipboard history. Search recent copies, find text you copied earlier, and analyze clipboard patterns.
Teams using alfred-clipboard should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/alfred-clipboard/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How alfred-clipboard Compares
| Feature / Agent | alfred-clipboard | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Access Alfred's clipboard history. Search recent copies, find text you copied earlier, and analyze clipboard patterns.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Alfred Clipboard History
This skill provides read-only access to Alfred's clipboard history via its SQLite database.
## Requirements
- Alfred Powerpack (clipboard history is a Powerpack feature)
- Clipboard history enabled in Alfred preferences
## Database Location
```
~/Library/Application Support/Alfred/Databases/clipboard.alfdb
```
To find it manually: Alfred Preferences → Advanced → "Reveal in Finder" → Databases folder
## When to Use
Use this skill when the user:
- Asks about something they copied earlier
- Wants to search their clipboard history
- Needs to find text they copied but lost
- Asks about recent clipboard items
- Mentions "clipboard" or "copied"
## Database Schema
```sql
CREATE TABLE clipboard(
item, -- The copied content (text)
ts decimal, -- Unix timestamp
app, -- Source application name
apppath, -- Path to source application
dataType integer, -- Type of data (0=text, 1=image, 2=file)
dataHash -- Hash of the content
);
```
## Important Warning
**This database is not intended to be user-serviceable.** Only run SELECT queries - never UPDATE, DELETE, or INSERT. Make a copy of the database before querying if you're concerned about corruption.
## Common Queries
### View Recent Clipboard Items
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, substr(item, 1, 100) as content, app
FROM clipboard
ORDER BY ts DESC
LIMIT 20;"
```
### Search Clipboard History
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, substr(item, 1, 200) as content, app
FROM clipboard
WHERE item LIKE '%search term%'
ORDER BY ts DESC
LIMIT 10;"
```
### Get Full Content of Recent Item
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT item FROM clipboard ORDER BY ts DESC LIMIT 1;"
```
### Items from Today
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, substr(item, 1, 100) as content, app
FROM clipboard
WHERE date(ts, 'unixepoch', 'localtime') = date('now', 'localtime')
ORDER BY ts DESC;"
```
### Items from Specific App
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, substr(item, 1, 100) as content
FROM clipboard
WHERE app = 'Google Chrome'
ORDER BY ts DESC
LIMIT 20;"
```
### Most Used Source Apps
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT app, count(*) as copies
FROM clipboard
GROUP BY app
ORDER BY copies DESC
LIMIT 10;"
```
### Text Items Only (exclude images/files)
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, substr(item, 1, 100) as content
FROM clipboard
WHERE dataType = 0
ORDER BY ts DESC
LIMIT 20;"
```
### Count Total Clipboard Items
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT count(*) FROM clipboard;"
```
### Items from Last Hour
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, substr(item, 1, 100) as content, app
FROM clipboard
WHERE ts > strftime('%s', 'now', '-1 hour')
ORDER BY ts DESC;"
```
## Data Types
- `0` - Text
- `1` - Image
- `2` - File reference
Note: Image and file content is stored differently; the `item` field for these may not be directly readable as text.
## Common Workflows
### "What did I copy earlier that had [keyword]?"
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, item, app
FROM clipboard
WHERE item LIKE '%keyword%'
ORDER BY ts DESC
LIMIT 5;"
```
### "Show me everything I copied from Slack today"
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, substr(item, 1, 150) as content
FROM clipboard
WHERE app = 'Slack'
AND date(ts, 'unixepoch', 'localtime') = date('now', 'localtime')
ORDER BY ts DESC;"
```
### "Find that URL I copied"
```bash
sqlite3 ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime') as time, item, app
FROM clipboard
WHERE item LIKE 'http%'
ORDER BY ts DESC
LIMIT 10;"
```
## Output Formatting
For JSON output:
```bash
sqlite3 -json ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT * FROM clipboard ORDER BY ts DESC LIMIT 5;"
```
For CSV output:
```bash
sqlite3 -csv ~/Library/Application\ Support/Alfred/Databases/clipboard.alfdb \
"SELECT datetime(ts, 'unixepoch', 'localtime'), item, app FROM clipboard ORDER BY ts DESC LIMIT 10;"
```
## Notes
- Alfred's clipboard history has a configurable retention period (default 24 hours, 7 days, 1 month, or 3 months)
- Very long items are truncated in the examples above using `substr()` for readability
- The database may be locked while Alfred is writing to it; retry if you get a lock error
- Consider copying the database to a temp location before querying for safety
## Sources
- [Searching Alfred's Clipboard History Programmatically](https://rmoff.net/2020/05/18/searching-alfreds-clipboard-history-programatically/)
- [Alfred Clipboard History Archive](https://github.com/April-June-August/alfred-clipboard-history-archive)Related Skills
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
mcp-create-declarative-agent
Skill converted from mcp-create-declarative-agent.prompt.md
MCP Architecture Expert
Design and implement Model Context Protocol servers for standardized AI-to-data integration with resources, tools, prompts, and security best practices
mathem-shopping
Automatiserar att logga in på Mathem.se, söka och lägga till varor från en lista eller recept, hantera ersättningar enligt policy och reservera leveranstid, men lämnar varukorgen redo för manuell checkout.
math-modeling
本技能应在用户要求"数学建模"、"建模比赛"、"数模论文"、"数学建模竞赛"、"建模分析"、"建模求解"或提及数学建模相关任务时使用。适用于全国大学生数学建模竞赛(CUMCM)、美国大学生数学建模竞赛(MCM/ICM)等各类数学建模比赛。
matchms
Mass spectrometry analysis. Process mzML/MGF/MSP, spectral similarity (cosine, modified cosine), metadata harmonization, compound ID, for metabolomics and MS data processing.
managing-traefik
Manages Traefik reverse proxy for local development. Use when routing domains to local services, configuring CORS, checking service health, or debugging connectivity issues.
managing-skills
Install, find, update, and manage agent skills. Use when the user wants to add a new skill, search for skills that do something, check if skills are up to date, or update existing skills. Triggers on: install skill, add skill, get skill, find skill, search skill, update skill, check skills, list skills.
manage-agents
Create, modify, and manage Claude Code subagents with specialized expertise. Use when you need to "work with agents", "create an agent", "modify an agent", "set up a specialist", "I need an agent for [task]", or "agent to handle [domain]". Covers agent file format, YAML frontmatter, system prompts, tool restrictions, MCP integration, model selection, and testing.
maintainx-automation
Automate Maintainx tasks via Rube MCP (Composio). Always search tools first for current schemas.
mailsoftly-automation
Automate Mailsoftly tasks via Rube MCP (Composio). Always search tools first for current schemas.
mails-so-automation
Automate Mails So tasks via Rube MCP (Composio). Always search tools first for current schemas.