| name | threadsmith |
|---|---|
| description | Work with Threadsmith local Messages thread links and the Threadsmith MCP/follower database. Use when a user asks an LLM agent to summarize, search, inspect, export, or reason about Threadsmith thread links, cached Threadsmith conversations, local Messages exports, or Threadsmith MCP tools. |
Use this as a portable agent skill for Claude, Codex, or another LLM agent that can read SKILL.md-style instructions.
- Treat Messages data and Contacts data as privacy-sensitive.
- Prefer Threadsmith MCP tools over manual database queries.
- Use the follower database at
~/Library/Application Support/Threadsmith/threadsmith.sqlitefor agent reads. - Treat the follower database as a local historical archive. Normal Threadsmith syncs should add or update cached rows, not delete messages just because they are missing from a later Messages read.
- Do not open
~/Library/Messages/chat.dbdirectly unless the user explicitly asks and the task cannot be completed from the follower database. - Keep Messages access read-only.
- Keep Contacts access read-only.
- Start with
threadsmith_statusto confirm the follower database exists, is readable, and has sync metadata. - For
threadsmith://thread/<id>, callthreadsmith_read_threadorthreadsmith_get_thread_slicewith the URI asidentifier. - For discovery, call
threadsmith_search_threadsfirst, then read or slice the selected thread by row id, URI, GUID, identifier, or exact display name. - For targeted questions, use
threadsmith_search_messagesinside a single thread before expanding to larger slices. - If a requested thread is not cached, open the URI through macOS with
open 'threadsmith://thread/<id>'so the Threadsmith app can fetch and upsert that single thread, then re-check the follower database. - If MCP tools are unavailable, query the follower database read-only.
- Summarize, extract open loops, or answer the user's question from bounded message slices. Avoid dumping entire private conversations unless the user explicitly asks for an export.
- Search/list threads newest-active first so the most recent context is easiest to find.
- Read, slice, and export messages oldest-first by default so shared context preserves the conversation chronology.
- Use
newestFirstonly when the user explicitly wants recent matching messages before earlier context.
Prefer these tools when available:
threadsmith_status: reports follower database path, readability, sync counts, and privacy status.threadsmith_search_threads: searches cached threads and returns newest-active thread summaries withthreadsmith://thread/<id>URIs.threadsmith_read_thread: reads one cached thread from the beginning, oldest-first, capped bymaxMessages.threadsmith_get_thread_slice: reads a bounded slice bylimit,offset, optional ISO-8601 date bounds, and optionalnewestFirst.threadsmith_search_messages: searches message text, subject, sender, GUIDs, and attachment filenames inside one cached thread.threadsmith_export_thread: writes one cached thread to Markdown, JSON, or a ZIP package at a localoutputPath.
Each tool accepts optional databasePath when the user explicitly wants another Threadsmith follower database. The MCP server reads Threadsmith's follower database only. It does not open ~/Library/Messages/chat.db.
Use sqlite3 -readonly "$HOME/Library/Application Support/Threadsmith/threadsmith.sqlite".
Useful tables:
threads: cached thread metadataparticipants: thread handlesmessages: cached message rowsattachments: attachment metadata onlysync_metadata: cache status
When querying dates manually, date_ms is milliseconds since Apple's 2001-01-01 reference date, not Unix epoch. Convert with:
datetime((date_ms / 1000) + 978307200, 'unixepoch', 'localtime')- Summarize private message content instead of quoting long passages.
- Do not include attachment contents. Only mention attachment names or counts when useful.
- If a cache is missing or stale, say that Threadsmith must be opened/refreshed rather than weakening privacy controls.
- If macOS blocks access to
~/Library/Messages/chat.db, report the Full Disk Access requirement instead of trying to bypass it.