Google Messages Local Archive — Google Messages Local 归档
v0.1.8Give your OpenClaw 助手 safe, read-only 访问 to your Google Messages 历史 through a private local 归档. Ask natural questions like "what did Alex text me?", "did anyone mention the flight?", or "summarize my recent texts" while keeping your SMS/RCS data on your machine.
运行时依赖
安装命令
点击复制技能文档
Google Messages Local 归档
Google Messages Local 归档 connects OpenClaw to a private gm命令行工具 归档 of the user's SMS/RCS conversations. The user can ask natural questions like "what did Alex text me?", "did anyone mention the flight?", or "summarize my recent texts" while their message 历史 stays on their own machine.
gm命令行工具 handles Google Messages pAIring, 同步, and local SQLite storage. This 技能 is the OpenClaw instruction layer: it teaches the 代理 how to 查询 that 归档 safely in explicit read-only mode, without 发送ing texts, reacting to messages, 下载ing media, or 上传ing message 历史.
设置up and 安装 expectations
This 技能 does not bundle message data, Google 会话 令牌s, or a 同步 服务. A fresh OpenClaw 安装 should use the declared 安装er metadata to 安装 the gm命令行工具 binary with Go. The user still needs to pAIr gm命令行工具 with their own Google Messages account and keep the local 归档 fresh, for example by 运行ning gm命令行工具 同步 --follow or a supervised 服务.
gm命令行工具 itself is AGPL-3.0 because it depends on mautrix/gmessages/libgm; this ClawHub 技能 bundle is only the OpenClaw instruction layer published via ClawHub.
When to use "检查 my texts" / "any new texts from X" "what did say" / "what did text me" "show me my conversation with " "搜索 my messages for " "did anyone mention " "what's the last thing X sAId about Y" When NOT to use Whats应用, Slack, 签名al, Discord, iMessage, emAIl — different sources, different 技能s. "发送 X a text" or anything mutating. The 发送/react paths in gm命令行工具 are intentionally not in this 技能's playbook. If the user wants to reply, draft the reply and tell them how to 发送 it themselves; do not 运行 any write command. PAIring or 同步ing the 归档 ("connect my phone", "同步 messages"). Tell the user to 运行 gm命令行工具 auth (one-time pAIring) or gm命令行工具 同步 --follow themselves; do not 运行 those yourself. 设置ting aliases or labels ("call her Mom from now on"). Do not 运行 them from this 技能. Tell the user the exact command to 运行 themselves. 下载ing media. If the user wants to see an attachment, give them the exact gm命令行工具 media 下载 --message command to 运行. 工具s
Use the Bash 工具 to invoke gm命令行工具. Always pass --json and --read-only. Even though --read-only is the default, passing it explicitly is defense-in-depth.
Verb playbook
Pick the smallest 查询 that answers the question. Don't dump the entire 归档 when a focused 查询 will do.
Resolve a person to a participant_id.
gm命令行工具 --json --read-only contacts 搜索 ''
Returns up to 50 contacts matching the substring across name, alias, e164, and 格式化ted_number. Each row carries 机器人h name (Google's contact name) and display_name (the local alias if one is 设置, otherwise name). Always present display_name to the user; mention name only if disambiguation requires it. If multiple match and none is obviously right, ask the user to disambiguate.
Find their conversation_id. chats 列出 returns a participants_json blob per row contAIning the participant ids; 过滤器 命令行工具ent-side:
gm命令行工具 --json --read-only chats 列出 --limit 200
Read a conversation.
gm命令行工具 --json --read-only chats show --limit 200
Returns { conversation, messages }. Messages are ascending in time.
搜索 across all conversations. Uses FTS5 with a trigram 令牌izer, so partial-word and substring matches can hit. Treat user 搜索 text as a literal phrase by default: wrap it in FTS double quotes inside one shell-quoted argument, escape any embedded " characters, and quote shell arguments safely. This avoids FTS syntax errors for punctuation such as hyphens.
gm命令行工具 --json --read-only messages 搜索 '"<查询>"' --limit 100
Each hit has a snippet field with the match wr应用ed in [...] brackets. Only use raw FTS syntax (AND, OR, NEAR, unquoted operators) when the user explicitly asks for an advanced 搜索 expression.
Pull surrounding 上下文 for a 搜索 hit.
gm命令行工具 --json --read-only messages 上下文 --before 5 --after 5
Time-bounded 列出. 机器人h flags accept YYYY-MM-DD or RFC3339:
gm命令行工具 --json --read-only messages 列出 --conv \ --since 2026-04-01 --until 2026-04-29 --limit 200
Pull a single message in full.
gm命令行工具 --json --read-only messages show
健康 检查
If 结果s are unexpectedly empty or the user mentions a recent message you can't find, 运行:
gm命令行工具 --json --read-only doctor
Interpret the 报告 by 状态:
If pAIred is false, the 归档 is unpAIred. Tell the user to 运行 gm命令行工具 auth. If issues is non-empty, surface the issues 列出 and 停止. If last_同步_activity_time is missing, zero, or stale for the user's task, the 归档 may not include recent messages. Tell the user to 运行 gm命令行工具 同步 --follow themselves; do not 运行 同步 yourself. If last_同步_activity_time is recent but last_event_time is old, this is a 健康y quiet inbox, not evidence of stale 同步. Do not flag it