clawhealth-garmin (OpenClaw Skill)
Sync your Garmin Connect health data into a local SQLite database
and expose it as structured JSON for OpenClaw agents.
Your agent can then query things like:
- - "How did I sleep yesterday?"
- "What is my HRV trend this week?"
- "Am I overtraining?"
This is a thin wrapper skill around the published clawhealth
Python package / CLI; it no longer fetches source code itself.
What It Does
- - Login with username/password (MFA supported)
- Sync daily health summaries into SQLite (stage 1)
- Fetch HRV + training metrics via separate commands (stage 2)
- Fetch sleep stages + sleep score (stage 2)
- Fetch body composition (stage 2)
- Fetch activity lists and full activity details (stage 2)
- Fetch menstrual day view and calendar range if supported by garminconnect (experimental)
- Provide
--json outputs for agent workflows - Persist raw JSON payloads for later analysis
Prerequisites
- - Python 3.10+
- Network access to Garmin Connect
- Garmin account (may require MFA)
If you run OpenClaw in Docker, you may prefer a prepatched image that already
includes the required Python dependencies:
Setup
1) Create {baseDir}/.env (see {baseDir}/ENV_EXAMPLE.md).
Recommended: use CLAWHEALTH_GARMIN_PASSWORD_FILE (password file) rather than
CLAWHEALTH_GARMIN_PASSWORD (plaintext env var).
Note: relative paths in env vars (like ./garmin_pass.txt) are resolved relative
to the skill directory by run_clawhealth.py.
2) Install the clawhealth package into a local .venv (if needed):
CODEBLOCK0
3) Run the skill entrypoint via OpenClaw, which will invoke run_clawhealth.py.
See README.md / README_zh.md in this directory and the root repo for
more details.
clawhealth-garmin (OpenClaw 技能)
将您的 Garmin Connect 健康数据同步到本地 SQLite 数据库,
并以结构化 JSON 格式提供给 OpenClaw 代理使用。
您的代理可以查询诸如以下内容:
- - 我昨天的睡眠质量如何?
- 本周我的心率变异性趋势如何?
- 我是否训练过度?
这是一个围绕已发布的 clawhealth Python 包/CLI 的轻量封装技能;它不再自行获取源代码。
功能说明
- - 使用用户名/密码登录(支持多因素认证)
- 将每日健康摘要同步到 SQLite 数据库(阶段 1)
- 通过单独命令获取心率变异性和训练指标(阶段 2)
- 获取睡眠阶段和睡眠评分(阶段 2)
- 获取身体成分数据(阶段 2)
- 获取活动列表和完整活动详情(阶段 2)
- 如果 garminconnect 支持,获取经期日视图和日历范围(实验性功能)
- 提供 --json 输出,适用于代理工作流
- 持久化原始 JSON 数据以供后续分析
前置条件
- - Python 3.10+
- 能够访问 Garmin Connect 网络
- Garmin 账户(可能需要多因素认证)
如果您在 Docker 中运行 OpenClaw,建议使用已预装所需 Python 依赖的镜像:
- - ernestyu/openclaw-patched
设置步骤
1) 创建 {baseDir}/.env 文件(参见 {baseDir}/ENV_EXAMPLE.md)。
建议:使用 CLAWHEALTHGARMINPASSWORDFILE(密码文件)而非 CLAWHEALTHGARMIN_PASSWORD(明文环境变量)。
注意:环境变量中的相对路径(如 ./garminpass.txt)将由 runclawhealth.py 相对于技能目录解析。
2) 将 clawhealth 包安装到本地 .venv 虚拟环境中(如需):
bash
python {baseDir}/bootstrap_deps.py
3) 通过 OpenClaw 运行技能入口点,这将调用 run_clawhealth.py。
更多详情请参阅本目录及根仓库中的 README.md / README_zh.md 文件。