← 返回 Skills 市场
tristanmanchester

Clipboard Memory

作者 Tristan Manchester · GitHub ↗ · v1.3.3 · MIT-0
darwin ✓ 安全检测通过
175
总下载
0
收藏
1
当前安装
8
版本数
在 OpenClaw 中安装
/install clipboard-memory
功能描述
Recall what the user copied on this Mac via the local clipmem archive — text, commands, URLs, file paths, HTML, images, PDFs. Triggers on requests like "what...
使用说明 (SKILL.md)

Recall what the user copied on this Mac before reaching for generic search. clipmem maintains a local, privacy-preserving SQLite archive of every clipboard state macOS emits, and exposes a JSON-first CLI built for agents. This package is installed by clipmem agents openclaw install-skill; the canonical cross-agent source lives under skills/clipboard-memory/.

Use this skill when

The user asks things like:

  • "what was that command I copied?"
  • "show me the URL I copied from Safari earlier"
  • "find that snippet, path, note, or link I copied yesterday"
  • "give me the exact text I copied, not a summary"
  • "what did I copy before I restarted?"
  • "paste me back that SQL I was looking at"
  • "get the PDF I copied last week"
  • "show me everything I copied from Xcode today"

Do not use this skill for

  • web search or current-events lookups
  • searching the repository or local files the user never copied
  • content the user typed but never copied to the clipboard
  • anything on a non-macOS machine (clipmem captures NSPasteboard only)

Prerequisites

Before querying, confirm the setup is healthy — otherwise empty results may be a stale watcher, not a true miss:

  1. Background capture must be running. clipmem setup is the canonical fix; Homebrew users can also use brew services start clipmem.
  2. The binary clipmem must be on PATH with write access to ~/Library/Application Support/clipmem/clipmem.sqlite3.
  3. Run scripts/check-setup.sh once per session when results look wrong. It exits 0 on a healthy host, 1 if the watcher is stale, 2 if the binary is missing, 3 if clipmem doctor fails. The prose equivalent is in references/setup-check.md.
  4. If OpenClaw cannot see the binary, run clipmem agents openclaw doctor and follow its remediation lines.

Command ladder

Always pick the narrowest command that answers the question, and always pass --format json (or --format toon for plain enumeration) so you can parse the response deterministically.

  1. clipmem recall — best-first ranked answer with alternatives. Start here for almost every request.
  2. clipmem timeline — chronological capture events (one row per copy), including repeated copies of the same content. Use for "today", "yesterday", "in order", or "every time".
  3. clipmem search — direct lexical / FTS matching. Use when you need precise substring hits or the user gave you an exact phrase.
  4. clipmem get \x3Csnapshot_id> — nested item/representation detail for a single snapshot already in hand.
  5. clipmem export \x3Csnapshot_id> --item \x3Cn> --uti \x3Cuti> --out \x3Cpath> [--force] — raw bytes. Use when the stored content is binary/image/PDF and best_text is empty or partial. Prefer a fresh output path; use --force only to replace an existing regular file.
  6. clipmem ocr candidates, clipmem ocr get, clipmem ocr clear, and clipmem storage image-candidates — inspect queued OCR or image optimization work before running batch workflows, or clear one stale OCR result.
  7. clipmem settings reset --format json — reset capture policy and ignored apps when the user explicitly asks to restore defaults.
  8. clipmem service providers --format json — inspect service provider state without starting or stopping capture.
  9. clipmem service revision --format json — inspect archive revision counters without probing service providers.
  10. clipmem app settings, clipmem app launch-at-login, clipmem app update-check run, or clipmem app quit with --format json — inspect or change menu bar app preferences and app-owned state when the user asks about app defaults, update checks, or quitting the app.
  11. clipmem agents context --format json — compact health, settings, app state, recent activity, revision, stats, privacy, and capability context before multi-step work.

Primitive command taxonomy

Primitive commands expose one bounded read or mutation that can be composed directly. Convenience workflows such as recall, setup, purge, ocr run, and storage optimize-images remain useful, but verify uncertain results with search, recent, timeline, or get, and preview broad mutations with candidate or dry-run commands when available.

The full flag reference, JSON envelope, and kind values live in references/commands.md, references/json-schema.md, and references/examples.md.

Critical behaviour rules

  • Before answering from a stale, empty, or ambiguous archive, run clipmem agents context --format json and use generated_at, health, settings, app state, recent activity, revision, stats, privacy, and capability fields to decide whether to broaden search or diagnose setup.
  • Always use --format json when you will parse the response. --format toon is for token-efficient enumeration only. --format jsonl is for streaming many rows into a pipeline. Never parse md or text.
  • Treat recall as a convenience ranking helper, not an authority. For uncertain cases, compose primitive commands in this order: search, recent, timeline, get, then OS follow-through such as pbcopy, open, or open -R.
  • Never claim "nothing found" until you have broadened the search once and checked truncated / next_cursor.
  • When best_match_confidence is "low" or there are several plausible hits, present the top candidates instead of pretending certainty.
  • For exact-text requests, quote best_text verbatim. Do not paraphrase commands, SQL, code, URLs, or file paths unless the user asked for a summary.

Capability map

The repo-side agent-native action parity contract lives in docs/action-parity.md. Use it when you need the maintained map from user-visible outcomes to agent-accessible commands, entity CRUD expectations, and derived-cache boundaries.

Output format rule

  • --format json — structured output. Retrieval envelopes are stable within schema_version: 2; management and inspection commands use command-specific JSON shapes, so parse documented keys directly.
  • --format toon — flat, token-efficient list. Prefer for high-cardinality enumeration (timeline, search, recent, recall) when you only need the top fields. Note: get does not support toon.
  • --format jsonl — newline-delimited records. Use when streaming many rows into a pipeline.
  • --format md / --format text — human-readable previews only; never parse these.

--json is an alias for --format json on search, recent, timeline, get, service revision, capture-once, and doctor.

Which command for which intent

User intent First command
"what was that thing I copied" (no time cue) recall "\x3Cquery>" --format json
"what did I copy today / yesterday / in order" timeline --hours \x3CN> --format json
"recent unique things I copied" recent --hours \x3CN> --format json
exact substring or punctuation-heavy query search --mode literal "\x3Cquery>" --format json
already have a snapshot id get \x3Cid> --format json
need raw image / PDF bytes get \x3Cid> then export \x3Cid> --item \x3Cn> --uti \x3Cuti> --out \x3Cpath>

recall vs recent vs timeline:

  • recall ranks across the archive and returns a best candidate plus alternatives.
  • recent deduplicates by snapshot — identical copies collapse into one row.
  • timeline is event-centric — every capture event is its own row, even if the content repeats.

Quick examples

# best-first answer
clipmem recall "that command I copied" --format json --limit 5

# Safari today, token-efficient
clipmem recall --prefer-recent --app safari --hours 24 --format toon

# exact URL yesterday
clipmem recall "url" --has-url --hours 48 --format json

# chronological sweep, paginated
clipmem timeline --hours 24 --limit 25 --format json
clipmem timeline --hours 24 --limit 25 --cursor "\x3Cnext_cursor>" --format json

# recover an image
clipmem get 42 --format json
clipmem export 42 --item 0 --uti public.png --out ./clipboard.png
clipmem export 42 --item 0 --uti public.png --out ./clipboard.png --force

Reading the response

Read these JSON fields first; walk nested items[].representations[] only after a get call:

  • best_candidate.best_text — the flattened primary text.
  • best_candidate.urls — URL array (empty when none).
  • best_candidate.file_paths — file-URL array.
  • why_selected, best_match_confidence, alternatives (only on recall).
  • next_cursor, truncated — pagination state.
  • schema_version — pin to 2 for stability.

Full schema in references/json-schema.md.

Troubleshooting

If recall looks empty or weak, widen --hours, drop source filters, or switch to timeline / search. For setup issues, sandbox PATH problems, or binary-only snapshots, see references/troubleshooting.md.

Exit codes

0 success · 1 uncategorized runtime · 2 invalid args · 3 not found · 4 unsupported format · 5 database error · 6 platform error.

安全使用建议
This skill appears to do what it says: it drives a local macOS CLI (clipmem) to read and export your clipboard archive. Before installing, consider: (1) clipmem records everything you copy — including passwords, tokens, and other sensitive data — into a local SQLite file; confirm you want a background watcher to capture clipboard history. (2) The Homebrew install points to a third‑party tap (tristanmanchester/tap); review the formula or build from source if you don't trust that tap. (3) The skill can export raw clipboard bytes to arbitrary filesystem paths — ensure the agent won't auto-export or leak clipboard contents off the machine. (4) Run the included scripts/check-setup.sh and `clipmem doctor` after installation to verify DB health and service status. If you want stronger assurance, inspect the brew formula and the clipmem binary source before installing, or prefer installing via cargo/build-from-source so you can audit the code.
功能分析
Type: OpenClaw Skill Name: clipboard-memory Version: 1.3.3 The clipboard-memory skill provides a structured interface for the 'clipmem' CLI tool to archive and search macOS clipboard history. The bundle includes comprehensive documentation (SKILL.md, references/), a health-check script (scripts/check-setup.sh), and clear instructions for the AI agent to handle sensitive clipboard data locally. While the tool manages highly sensitive information and includes a background service for persistence, its behavior is transparently documented, lacks any evidence of data exfiltration or malicious intent, and includes safety constraints for the agent.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
Name/description promise (recall clipboard history on macOS) maps directly to the only runtime dependency: the local `clipmem` CLI and its SQLite archive; required binaries and commands are coherent with the stated purpose.
Instruction Scope
SKILL.md instructs only local `clipmem` commands (recall, timeline, search, get, export, restore, doctor, etc.) and local checks (scripts/check-setup.sh). There are legitimate operations that write raw clipboard bytes to disk (clipmem export) and that can restore items to the pasteboard; this is expected for the feature but means clipboard contents (potentially highly sensitive) can be written to the filesystem if the agent runs an export. No network endpoints or unrelated system paths are referenced. Recommend ensuring the agent does not auto-export or transmit data off-host without explicit consent.
Install Mechanism
Install uses Homebrew (formula `clipmem`) and the SKILL.md metadata also mentions `cargo` as an alternate. The brew formula specifies a non-core tap (`tristanmanchester/tap`) instead of the main Homebrew/core; installing from a personal/third-party tap is common but carries more trust risk than an official core formula. No arbitrary URL downloads or extracted archives are present in the packaged files.
Credentials
The skill requests no environment variables or external credentials. It relies on local file access to the user's clipboard DB (~/Library/Application Support/clipmem/clipmem.sqlite3) — this is consistent with its purpose but is sensitive by nature.
Persistence & Privilege
Flags show normal privileges: not always-on, user-invocable, and allows autonomous invocation (platform default). The skill does not request to modify other skills or system-wide settings. The bundled script and instructions manage only the clipmem service and its own checks.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install clipboard-memory
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /clipboard-memory 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.3.3
Updated the ClawHub clipboard-memory skill package to 1.3.3 so the revised command and setup-check references can publish cleanly Improved OpenClaw and Hermes skill validation by deduplicating referenced Markdown files with borrowed-path tracking instead of allocating a path for every repeated link. In a 25,000-reference agent skill benchmark, median reference extraction time dropped from 5.483 ms to 3.875 ms
v1.3.2
Updated the ClawHub clipboard-memory skill package to 1.3.2 so the revised command and setup-check references can publish cleanly
v1.3.1
Republish the current skill package with schema_version 2 guidance, recent command coverage, export --force guidance, and OpenClaw metadata version 1.3.1.
v1.3.0
Add opt-in local OCR retrieval fields, OCR commands, and JSON schema_version 2 guidance.
v1.2.1
Bump skill version to match newer package content already present in the repo.
v1.2.0
Adds first-class `clipmem setup` and `clipmem service` onboarding, Homebrew-aware service checks, and updated troubleshooting/setup guidance for Cargo and Homebrew installs.
v1.1.1
Normalize the skill identity around clipboard-memory, add a canonical repo-root package for skills.sh discovery, and align OpenClaw packaging, docs, and install paths.
v1.1.0
Initial public release of the clipmem-powered clipboard recovery skill, including setup checks, examples, JSON schema docs, and stricter OpenClaw doctor guidance.
元数据
Slug clipboard-memory
版本 1.3.3
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 8
常见问题

Clipboard Memory 是什么?

Recall what the user copied on this Mac via the local clipmem archive — text, commands, URLs, file paths, HTML, images, PDFs. Triggers on requests like "what... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 175 次。

如何安装 Clipboard Memory?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install clipboard-memory」即可一键安装,无需额外配置。

Clipboard Memory 是免费的吗?

是的,Clipboard Memory 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Clipboard Memory 支持哪些平台?

Clipboard Memory 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin)。

谁开发了 Clipboard Memory?

由 Tristan Manchester(@tristanmanchester)开发并维护,当前版本 v1.3.3。

💬 留言讨论