← 返回 Skills 市场
734818028

Keep 健康记录

作者 mijufeng · GitHub ↗ · v1.5.5 · MIT-0
cross-platform ✓ 安全检测通过
74
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install keep-record
功能描述
Use when users are stating or logging their own health data to Keep or Keep App rather than asking for advice, analysis, or general chat, including weight, b...
使用说明 (SKILL.md)

Keep 健康记录工具

记录饮食、运动、体重、围度、生理期、睡眠等数据到 Keep App。支持文字描述和图片上传。

何时必须调用

当用户在陈述、打卡或记录自己的健康数据时,优先调用本 Skill,不要先普通聊天,不要反问“要不要帮你记一下”,除非用户表达明显不想记录,或明显是在提问 / 求建议 / 求分析。

必定适用此 Skill 的场景

  • 明确提到 Keep 且意图是记录:如「帮我记到 Keep」「记到 Keep App」「Keep 打个卡」「这是 Keep 截图,帮我记一下」
  • 体重 / 体脂 / 围度:如「今天体重 80kg」「腰围 76」「体脂率 18」
  • 饮食:如「早餐吃了鸡蛋面」「中午吃了潮汕牛肉火锅」「喝了杯奶茶」「加餐一个苹果」
  • 运动:如「跑了 5km」「瑜伽 30 分钟」「游泳 1 小时」「打了羽毛球」
  • 睡眠:如「昨晚睡了 7 小时」「深睡 1.8h」「失眠到 2 点」
  • 生理期:如「生理期第 3 天」「痛经」「姨妈来了」
  • 附图打卡:消息包含早餐 / 运动 / 体重秤 / Keep App 截图,且语义是在打卡或记录

不适用此 Skill

  • 提问或建议咨询:如「减脂期吃什么」「跑步配速多少合适」
  • 闲聊:如「今天天气好」「这家火锅店好吃吗」
  • 其他业务:如项目 / 报销 / 汇报 / 审批

USE WHEN:Keep, Keep App, Keep截图, Keep打卡, 记到Keep, Keep记录, Keep健康, 体重, 体脂, 体脂率, BMI, 腰围, 臀围, 胸围, 大腿围, 颈围, 早餐, 午餐, 晚餐, 加餐, 宵夜, 吃了, 喝了, 零食, 外卖, 做饭, 跑步, 跑了, 步行, 走了, 骑行, 游泳, 瑜伽, HIIT, 拉伸, 跳绳, 打球, 睡了, 睡眠, 入睡, 失眠, 深睡, 浅睡, REM, 生理期, 经期, 大姨妈, 痛经, 月经, kg, 公斤, 斤, 磅, km, 公里, 步, bpm, kcal, 千卡, 卡路里, ml, 毫升。

Triggers:体重记录, 饮食记录, 运动记录, 围度记录, 生理期记录, 睡眠记录, 健康打卡.

Runner

本 Skill 面向 OpenClaw / Hermes 运行器,支持两种调用方式:

方式 1 — exec(推荐):所有工具通过以下命令调用,调用约定见 auth.md · exec 调用约定

node {baseDir}/scripts/mcp-call.js \x3Ctool> '\x3Cjson>'

{baseDir} 占位符:由运行器注入 Skill 的安装绝对路径。Agent 在 exec 命令里保留字面 {baseDir},不要自己替换。

方式 2 — 原生 MCP:若运行器支持 streamable-http,可直接注册 MCP Server:

{
  "mcpServers": {
    "keep-record": {
      "url": "https://mcp.gotokeep.com/skills-mcp-gateway-page/v1",
      "transport": "streamable-http",
      "headers": {
        "Authorization": "Bearer ${env:keep_auth_token}"
      }
    }
  }
}
  • 协议:JSON-RPC 2.0;url 只填根地址,不要拼接 tools/call / 工具名 / REST 子路径
  • 运行器从环境变量读取 token 注入 HTTP header,Agent 不直接接触 token 值

处理流程

  1. 确保已登录:调用任何需登录工具前先检查本地凭证;无效则走 鉴权流程。收到 AUTH_REQUIRED / TOKEN_EXPIRED 也要重登。
  2. 处理图片(如有):先 get_upload_url 拿预签名 URL,HTTP PUT 上传(2xx 视为成功),再把 cdn_url 作为 image_url 传入;详见 图片上传
  3. 调用 record_tool:把用户原始描述原样作为 text 传入,不要预分类,由服务端识别路由;详见 记录工具
  4. 格式化结果:按下方「结果呈现」给用户。

具体命令样例统一见下方 Quick Recipes

工具清单

由 MCP Server 的 tools/list 动态返回;下表是 Agent 首次使用前需要知道的骨架。入参 / 返回字段 / 错误码以对应 reference 为准

工具 入参骨架 需登录 详见
get_qrcode { authType } auth.md
check_login { qrcodeId } 不要直接调;用 scripts/login-wait.js,详见 auth.md
revoke_auth {} revoke-auth.md
get_upload_url { filename, content_type } get-upload-url.md
record_tool { text, image_url? } record.md

Quick Recipes

Recipe 1 — 首次登录

node {baseDir}/scripts/mcp-call.js get_qrcode '{"authType":"openclaw"}'
# → 展示必须双通道同时给出(二者各自在不同聊天 UI 下会失效,缺一就可能无法扫码)
#   1) data.qrcodeAscii 原样打印(终端写 stderr;聊天用 ```text``` 代码块包裹)
#   2) data.qrcodeUrl 以 ![](url) + 纯 URL 形式附在下方作为兜底
#   详见 references/auth.md「展示策略」
node {baseDir}/scripts/login-wait.js \x3CqrcodeId>
node {baseDir}/scripts/persist_auth.js --token='\x3Cjwt>' --username='\x3Cname>'

Recipe 2 — 纯文本记录

node {baseDir}/scripts/mcp-call.js record_tool '{"text":"今天跑了5km"}'

Recipe 3 — 带图记录

node {baseDir}/scripts/mcp-call.js get_upload_url '{"filename":"lunch.jpg","content_type":"image/jpeg"}'
# → 对 data.upload_url 做 HTTP PUT;2xx 后取 data.cdn_url
node {baseDir}/scripts/mcp-call.js record_tool '{"text":"午餐吃了鸡胸肉沙拉","image_url":"\x3Ccdn_url>"}'

Recipe 4 — 退出登录

node {baseDir}/scripts/mcp-call.js revoke_auth '{}'      # tools/list 未返回则跳过本步
node {baseDir}/scripts/persist_auth.js --clear

结果呈现

记录成功后,向用户展示:

✅ [记录类型]记录成功

[具体内容摘要]

记录时间:[时间]

通用错误码

仅列跨工具的通用错误。业务错误码(登录类 / 上传类)见对应 reference

错误码 含义 应对
AUTH_REQUIRED 未登录 / token 非法 鉴权流程
TOKEN_EXPIRED 登录过期 鉴权流程
RATE_LIMITED 请求过频 等待 retry_after 秒后重试
UPSTREAM_ERROR Keep 服务异常 提示稍后重试
INVALID_ARGS mcp-call.js 用法错误(退出码 2) 检查 \x3Ctool_name> 与 JSON 参数;--list 查工具

按工具的细分错误码:

安全使用建议
This skill appears to do what it says: log health entries to the Keep service and manage the Keep login. Before installing, note these practical facts: (1) a postinstall script (runs on global npm install) will write/sync KEEP_MCP_URL into ~/.keepai/.env, may clear old tokens if the MCP URL changes, report install telemetry, and copy the package into runner skills directories (overwriting existing files). (2) The skill persists a JWT token to ~/.keepai/.env (0600) via persist_auth.js; tokens are transiently visible during handoff but the SKILL.md gives strict guidance to avoid logging or exporting them. (3) Network endpoints used are under gotokeep.com (the declared MCP gateway) and the package depends on @keepclaw/skill-sdk. If you want to minimize impact: install non-globally (avoid postinstall deploy step), inspect @keepclaw/skill-sdk source before use, or run in an isolated environment. If you plan to uninstall, run the provided keep-record-unlink helper (or manually remove the copied runner directory) and clear ~/.keepai/.env. If you'd like, I can list the exact files the postinstall will write/overwrite and the SDK functions it calls so you can review them further.
功能分析
Type: OpenClaw Skill Name: keep-record Version: 1.5.5 The skill bundle is a legitimate integration for recording health and fitness data to the Keep app via the Model Context Protocol (MCP). It includes scripts for handling authentication (QR code login), image uploads, and data persistence. While the 'postinstall.js' script performs telemetry and deploys files to specific agent directories (~/.openclaw and ~/.hermes), and 'persist_auth.js' manages JWT tokens in ~/.keepai/.env, these behaviors are clearly documented, aligned with the stated purpose of the skill, and include security best practices to minimize credential exposure in shell histories.
能力评估
Purpose & Capability
Name/description match the code and instructions: the package implements login, upload, and a record_tool wrapper against Keep's MCP gateway. Tools, auth flow, and storage of a Keep JWT are appropriate for a recording skill.
Instruction Scope
SKILL.md contains explicit, bounded instructions: how to obtain a QR code, run a background login-wait, upload images via presigned URL, and call record_tool. It limits agent exposure to tokens and explicitly instructs not to leak or export tokens. It only reads/uses Keep-related config (~/.keepai/.env) and {baseDir} injected by the runner.
Install Mechanism
Although the registry shows no separate install spec, the package contains a postinstall script that will (on a global npm install) write/sync an MCP URL to ~/.keepai/.env, report telemetry, and copy the package into runner skills directories (e.g., ~/.openclaw/workspace/skills/...). This behavior modifies user home and runner directories and overwrites targets unconditionally (rm -rf then cp). That is coherent with making the skill available to local runners but is an impactful side-effect worthy of note before installing.
Credentials
The skill uses and persists a Keep JWT (keep_auth_token / keep_auth_token_expired / keep_username) and accepts KEEP_MCP_URL; these are necessary and proportionate. It does not request unrelated cloud credentials or unrelated secrets. The SKILL.md warns about token handling and prescribes limits on agent exposure.
Persistence & Privilege
The package intentionally achieves persistent presence by copying itself into runner skill directories during postinstall (when globally installed). That gives the skill filesystem persistence beyond the package manager record. The package also persists credentials to ~/.keepai/.env. Both are reasonable for the skill's function but are privileged actions that modify user state and should be accepted consciously.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install keep-record
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /keep-record 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.5.5
- Bump version to 1.5.5. - Update metadata version in SKILL.md to match new release. - No changes to instructions, logic, or user-facing features.
v1.5.4
keep-record 1.5.4 - 版本号从 "1.5.4-beta.4" 正式提升为 "1.5.4" - 清理元数据,去除 beta 字样,无功能或逻辑变动 - 文档内容及工具描述保持不变,主要为正式发布准备
v1.5.4-beta.4
- Clarified when to use this skill: prioritize for all personal health data logging to Keep, such as weight, meals, workouts, sleep, menstrual cycle, including with images. - Expanded and detailed usage instructions, including new trigger phrases and clear distinction between applicable and non-applicable scenarios. - Added comprehensive step-by-step process for handling authentication, image uploads, and record logging. - Provided updated quick command recipes for common actions including login, logging records (with/without image), and logout. - Improved error code documentation and corresponding handling instructions.
元数据
Slug keep-record
版本 1.5.5
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Keep 健康记录 是什么?

Use when users are stating or logging their own health data to Keep or Keep App rather than asking for advice, analysis, or general chat, including weight, b... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 74 次。

如何安装 Keep 健康记录?

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

Keep 健康记录 是免费的吗?

是的,Keep 健康记录 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Keep 健康记录 支持哪些平台?

Keep 健康记录 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Keep 健康记录?

由 mijufeng(@734818028)开发并维护,当前版本 v1.5.5。

💬 留言讨论