← 返回 Skills 市场
dw1161

Garmin Connect Health

作者 dw1161 · GitHub ↗ · v1.0.8 · MIT-0
cross-platform ✓ 安全检测通过
226
总下载
0
收藏
0
当前安装
9
版本数
在 OpenClaw 中安装
/install garmin-connect-health
功能描述
Fetch health and fitness data from Garmin Connect -- 40+ metrics including sleep, HRV, stress, body battery, SpO2, VO2 Max, training status, and activities....
使用说明 (SKILL.md)

Garmin Connect Health Data Skill

Fetch comprehensive health & fitness data from Garmin Connect for your AI agent.

Data Coverage

Category Fields
Activity Steps, distance, calories (active + BMR), floors, intensity minutes
Heart Rate Min/max/resting heart rate
Sleep Duration, score, deep/light/REM/awake breakdown, stress during sleep
HRV Last night avg, 5min peak, weekly avg, status (balanced/unbalanced), baseline
Body Battery Current level, daily min/max
SpO2 Average and minimum blood oxygen
Respiration Waking and sleep breathing rate
Stress Average/max, rest/low/medium/high duration breakdown
Training Status Overreaching/Highly Active/Productive/Maintaining/Recovery/Detraining + acute/chronic load ratio
Training Readiness Score (0-100)
Fitness Metrics VO2 Max, fitness age, endurance score, hill score
Race Predictions 5K/10K/Half/Marathon predicted times
Weight/Body Comp Weight (kg), body fat %, BMI (requires Garmin Index scale)
Hydration Intake (ml) vs goal
Activities Individual workouts with HR, duration, calories, elevation, training effect
Weekly Summary Total/avg steps for the week

Setup

1. Install dependency

pip install garminconnect

2. Set credentials (choose one method)

Option A -- Environment variables:

export GARMIN_EMAIL="[email protected]"
export GARMIN_PASSWORD="yourpassword"

Option B -- CLI args:

python3 garmin_health.py --email [email protected] --password yourpassword

Option C -- macOS Keychain:

security add-generic-password -a "[email protected]" -s "garmin_connect" -w "yourpassword"

Option D -- Credentials file:

echo -e "[email protected]\
password=yourpassword" > ~/.garmin_credentials
chmod 600 ~/.garmin_credentials

3. Set region (China accounts only)

If your Garmin account was registered in China, add this to your shell profile (~/.zshrc / ~/.bashrc) once:

export GARMIN_IS_CN=true

This tells the skill to use connect.garmin.com.cn instead of the global endpoint -- more reliable for mainland China IPs and prevents 429 rate-limit errors. Skip this step if you have a global Garmin account.

4. First run

First login may require MFA verification. You'll be prompted to enter a code sent to your email.

5. Use with OpenClaw

Ask your AI agent:

  • "Show my health data"
  • "How did I sleep last night?"
  • "What's my HRV?"
  • "Am I overtraining?"

Usage

# Fetch today's data (default)
python3 garmin_health.py

# Fetch specific date
python3 garmin_health.py --date 2026-03-16

# Show latest cached data
python3 garmin_health.py --show

# Use Garmin Connect CN endpoint (Chinese accounts / mainland China IP)
python3 garmin_health.py --cn

# With credentials
python3 garmin_health.py --email [email protected] --password pass

Data Storage

  • ~/.garmin_health/YYYY-MM-DD.json -- Daily snapshots
  • ~/.garmin_health/latest.json -- Most recent fetch
  • ~/.garminconnect/ -- OAuth token cache

Override with env vars:

  • GARMIN_DATA_DIR -- Change data directory
  • GARMIN_TOKENSTORE -- Change token cache directory
  • GARMIN_IS_CN=true -- Use Garmin Connect CN endpoint (set once in shell profile)

Supported Languages

All labels and output in English. JSON field names are English by design.

Security & Privacy

  • Your credentials only -- this skill authenticates with Garmin Connect using your own account credentials. No credentials are shared with or stored by this skill.
  • Local storage only -- all fetched health data is saved as JSON files on your own machine. No data is sent to any third party.
  • Token caching -- after first login, an OAuth token is cached locally (~/.garminconnect/). Subsequent runs reuse this token and do not re-send your password.
  • Recommended auth -- use macOS Keychain or environment variables rather than --password CLI flag to avoid password exposure in shell history.
  • Official API only -- all requests go directly to connect.garmin.com (or connect.garmin.com.cn for CN accounts). No proxies or intermediaries.

Requirements

  • Python 3.10+
  • garminconnect library
  • A Garmin Connect account
  • Device: Any Garmin watch/fitness tracker synced to Garmin Connect
安全使用建议
This skill appears to do what it says, but it requires your Garmin account credentials and will cache an OAuth token and JSON files in your home directory. Before installing: - Prefer macOS Keychain (or other secure secrets manager) over passing --password on the CLI or saving passwords in a file. - If you use ~/.garmin_credentials, set strict permissions (chmod 600). - Be aware tokens are cached under ~/.garminconnect; delete them if you want to revoke local access. - Review the python-garminconnect dependency source (or vendor it) if you don't already trust it. - Note the minor metadata mismatch: the registry lists no primary credential while the skill does require your Garmin login to function. - If you allow autonomous agent invocation, the agent may call this skill and access your cached data; consider that when granting agent permissions.
功能分析
Type: OpenClaw Skill Name: garmin-connect-health Version: 1.0.8 The garmin-connect-health skill is a legitimate tool for fetching personal fitness data from Garmin Connect. It uses the standard 'garminconnect' library and implements several security-conscious features, such as supporting the macOS Keychain for password storage, warning users about insecure file permissions on '~/.garmin_credentials', and advising against passing passwords via CLI arguments. The script (garmin_health.py) only communicates with official Garmin endpoints and stores all fetched health data locally in the user's home directory.
能力评估
Purpose & Capability
Name/description promise (fetch Garmin Connect health data) matches what's implemented: a Python script that uses the python-garminconnect library to authenticate, read many health metrics, and write JSON snapshots. Required credential handling (env vars, CLI, keychain, or local file) is appropriate for this purpose.
Instruction Scope
SKILL.md and the script restrict activity to authenticating with Garmin Connect, calling Garmin endpoints, and saving JSON under ~/.garmin_health and token cache under ~/.garminconnect. The script calls the macOS 'security' tool when available to read keychain entries (expected) and reads a local credentials file if present. Instructions do not direct data to third-party endpoints.
Install Mechanism
No custom install spec; user is instructed to pip install the well-known python-garminconnect package. No downloads from arbitrary URLs or archive extraction; installation method is standard for a Python script.
Credentials
The skill legitimately needs Garmin credentials (env vars / CLI / keychain / file) and a small set of optional env vars (GARMIN_IS_CN, GARMIN_DATA_DIR, GARMIN_TOKENSTORE). One minor metadata mismatch: the registry primary credential field is 'none' while the skill in practice needs your Garmin account credentials—this is expected for operation but worth noting.
Persistence & Privilege
The skill does persist data locally (JSON snapshots) and caches OAuth tokens in ~/.garminconnect; this is coherent with its function. It does not request system-wide persistence (always:true) nor modify other skills' configurations. It uses subprocess to call the macOS 'security' command when available (expected for keychain access).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install garmin-connect-health
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /garmin-connect-health 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.8
fix: remove ZWJ hidden chars from README emoji, mark GARMIN_EMAIL as optional to resolve metadata inconsistency
v1.0.7
fix: restore display name to Garmin Connect Health
v1.0.6
fix: add version to SKILL.md frontmatter, simplify description to single line, remove keyword list that triggered prompt-injection false positive
v1.0.5
fix: address ClawHub security scan -- declare env vars in skill.json, rewrite SKILL.md description, add Security & Privacy section
v1.0.4
fix: replace Unicode em-dashes with ASCII -- in SKILL.md to clear ClawHub security scan false positive
v1.0.3
docs: README (EN/ZH) + SKILL.md add CN endpoint setup guide; set GARMIN_IS_CN=true once in shell profile for Chinese accounts
v1.0.2
feat: add --cn flag and GARMIN_IS_CN env var to switch to Garmin Connect CN endpoint (connect.garmin.com.cn), recommended for Chinese accounts or mainland IP
v1.0.1
fix: token cache optimization — validate garth token before falling back to SSO login, fixes 429 Too Many Requests on frequent runs
v1.0.0
Initial release: 40+ health metrics including sleep, HRV, stress, body battery, SpO2, VO2 Max, training status, race predictions.
元数据
Slug garmin-connect-health
版本 1.0.8
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 9
常见问题

Garmin Connect Health 是什么?

Fetch health and fitness data from Garmin Connect -- 40+ metrics including sleep, HRV, stress, body battery, SpO2, VO2 Max, training status, and activities.... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 226 次。

如何安装 Garmin Connect Health?

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

Garmin Connect Health 是免费的吗?

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

Garmin Connect Health 支持哪些平台?

Garmin Connect Health 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Garmin Connect Health?

由 dw1161(@dw1161)开发并维护,当前版本 v1.0.8。

💬 留言讨论