← 返回 Skills 市场
lovefromio

Lovefromio Garmin Connect

作者 AI · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
139
总下载
0
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install lovefromio-garmin-connect
功能描述
Garmin Connect integration for Clawdbot: sync fitness data (steps, HR, calories, workouts, sleep) every 5 minutes using OAuth.
使用说明 (SKILL.md)

Garmin Connect Skill

Sync all your Garmin fitness data to Clawdbot:

  • 🚶 Daily Activity: Steps, heart rate, calories, active minutes, distance
  • 😴 Sleep: Duration, quality, deep/REM/light sleep breakdown
  • 🏋️ Workouts: Recent activities with distance, duration, calories, heart rate
  • ⏱️ Real-time sync: Every 5 minutes via cron

Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. OAuth Authentication (One-time)

python3 scripts/garmin-auth.py [email protected] your-password

This saves your OAuth session to ~/.garth/session.json — fully local and secure.

3. Test Sync

python3 scripts/garmin-sync.py

You should see JSON output with today's stats.

4. Set Up 5-Minute Cron

Add to your crontab:

*/5 * * * * /home/user/garmin-connect-clawdbot/scripts/garmin-cron.sh

Or manually:

*/5 * * * * python3 /home/user/garmin-connect-clawdbot/scripts/garmin-sync.py ~/.clawdbot/.garmin-cache.json

5. Use in Clawdbot

Import and use in your scripts:

from scripts.garmin_formatter import format_all, get_as_dict

# Get all formatted data
print(format_all())

# Or get raw dict
data = get_as_dict()
print(f"Steps today: {data['summary']['steps']}")

Features

✅ OAuth-based (secure, no password storage) ✅ All metrics: activity, sleep, workouts ✅ Local caching (fast access) ✅ Cron-friendly (5-minute intervals) ✅ Easy Clawdbot integration ✅ Multi-user support

Data Captured

Daily Activity (summary)

  • steps: Daily step count
  • heart_rate_resting: Resting heart rate (bpm)
  • calories: Total calories burned
  • active_minutes: Intensity minutes
  • distance_km: Distance traveled

Sleep (sleep)

  • duration_hours: Total sleep time
  • duration_minutes: Sleep in minutes
  • quality_percent: Sleep quality score (0-100)
  • deep_sleep_hours: Deep sleep duration
  • rem_sleep_hours: REM sleep duration
  • light_sleep_hours: Light sleep duration
  • awake_minutes: Time awake during sleep

Workouts (workouts)

For each recent workout:

  • type: Activity type (Running, Cycling, etc.)
  • name: Activity name
  • distance_km: Distance traveled
  • duration_minutes: Duration of activity
  • calories: Calories burned
  • heart_rate_avg: Average heart rate
  • heart_rate_max: Max heart rate

Cache Location

By default, data is cached at: ~/.clawdbot/.garmin-cache.json

Customize with:

python3 scripts/garmin-sync.py /custom/path/cache.json

Files

File Purpose
garmin-auth.py OAuth setup (run once)
garmin-sync.py Main sync logic (run every 5 min)
garmin-formatter.py Format data for display
garmin-cron.sh Cron wrapper script
requirements.txt Python dependencies

Troubleshooting

OAuth authentication fails

  • Check email/password
  • Disable 2FA on Garmin account (or use app password)
  • Garmin servers might be rate-limiting — wait 5 minutes

No data appears

  1. Sync your Garmin device with the Garmin Connect app
  2. Wait 2-3 minutes for data to sync
  3. Check that data appears in Garmin Connect web/app
  4. Then run garmin-sync.py again

Permission denied on cron

chmod +x scripts/garmin-cron.sh
chmod +x scripts/garmin-sync.py
chmod +x scripts/garmin-auth.py

Cache file not found

Run garmin-sync.py at least once to create cache:

python3 scripts/garmin-sync.py

Usage Examples

from scripts.garmin_formatter import format_all, get_as_dict

# Get formatted output
print(format_all())

# Get raw data
data = get_as_dict()
if data:
    print(f"Sleep: {data['sleep']['duration_hours']}h")
    print(f"Steps: {data['summary']['steps']:,}")

License

MIT — Use, fork, modify freely.


Made for Clawdbot | Available on ClawdHub

安全使用建议
This skill appears to implement Garmin sync functionality, but exercise caution before installing or running it: - Do not pass your Garmin password on the command line where it can be viewed by other processes; prefer browser-based OAuth (garth-cli) as described in some scripts. - The SKILL.md and scripts suggest disabling 2FA or using an app password — do not disable 2FA for your primary account; instead create/apply an app-specific token if Garmin supports it, or use the browser OAuth flow. - The requirements.txt omits the 'garth' dependency used in code. When installing, explicitly install garth/garth-cli and verify package sources. - Review and, if needed, change hardcoded paths and example emails in scripts (e.g., /home/mamotec/, [email protected]) before running; they are developer leftovers and not suitable for production. - Session and cache files are written to ~/.garth/session.json and ~/.clawdbot/.garmin-cache.json; ensure those files have appropriate filesystem permissions and consider storing them in a secure directory. - If you are not comfortable inspecting or modifying Python scripts, run this in an isolated environment (VM/container) and inspect network behavior. Prefer the garth-cli/browser OAuth path rather than the username/password script. What would change this assessment: a clear, trusted upstream source (homepage or repo), a corrected requirements.txt that lists all runtime dependencies, removal of advice to disable 2FA, and removal of hardcoded developer-specific credentials/paths. With those fixes the skill would likely be classified as benign.
功能分析
Type: OpenClaw Skill Name: lovefromio-garmin-connect Version: 1.0.2 The skill bundle contains multiple scripts with hardcoded personal information and environment-specific paths, notably the email '[email protected]' and the home directory '/home/mamotec/' in garmin-auth-oauth.py, garmin-cron.sh, and garmin-sync-30days.py. While the logic for syncing Garmin fitness data appears functionally correct, the lack of sanitization for distribution is a significant privacy leak and configuration risk. Additionally, the scripts handle sensitive Garmin credentials and OAuth tokens, storing them in local session files.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
Files and scripts implement Garmin data sync and caching (OAuth / garth + garminconnect) which matches the stated purpose. However the repository mixes two auth approaches (browser-based OAuth guidance alongside a username/password login script), and requirements.txt omits the 'garth' dependency that many scripts import. Hardcoded example paths and email addresses (e.g., /home/mamotec/.garth/session.json, [email protected]) are leftover developer artifacts but not required for the stated feature.
Instruction Scope
SKILL.md and scripts instruct the user to run an authentication script with email and password on the command line (python3 scripts/garmin-auth.py <email> <password>) and even suggest disabling 2FA — these broaden the scope to collecting sensitive credentials and encourage insecure practices. Scripts read/write local session and cache files (e.g., ~/.garth/session.json, ~/.clawdbot/.garmin-cache.json) — expected — but instructions are inconsistent about using OAuth/browser login vs username/password and include hardcoded user-specific instructions.
Install Mechanism
No install spec (instruction-only skill). It relies on pip installing requirements.txt, which lists garminconnect/requests/dateutil but omits 'garth'/'garth-cli' that many scripts require. That mismatch may lead users to run manual installs; otherwise there is no remote download or archive-extract behavior in the install metadata.
Credentials
The skill declares no required environment variables or credentials, yet its runtime requires sensitive authentication (Garmin credentials or browser OAuth session). The SKILL.md explicitly instructs supplying email/password on the CLI and advises disabling 2FA, which is disproportionate and insecure. There are also hardcoded example email and home paths embedded in scripts, which leak developer-specific identifiers and could mislead users.
Persistence & Privilege
The skill stores session and cache files in user-local paths (~/.garth and ~/.clawdbot) which is consistent with a sync tool. It does not request 'always: true', does not modify other skills, and has no system-wide install behavior in the manifest. Autonomous invocation is allowed but is the platform default.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lovefromio-garmin-connect
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lovefromio-garmin-connect 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
lovefromio-garmin-connect v1.0.2 - Updated metadata in _meta.json. - No changes to functionality or documentation content.
v1.0.1
Fork and update to 1.0.1
元数据
Slug lovefromio-garmin-connect
版本 1.0.2
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 2
常见问题

Lovefromio Garmin Connect 是什么?

Garmin Connect integration for Clawdbot: sync fitness data (steps, HR, calories, workouts, sleep) every 5 minutes using OAuth. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 139 次。

如何安装 Lovefromio Garmin Connect?

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

Lovefromio Garmin Connect 是免费的吗?

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

Lovefromio Garmin Connect 支持哪些平台?

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

谁开发了 Lovefromio Garmin Connect?

由 AI(@lovefromio)开发并维护,当前版本 v1.0.2。

💬 留言讨论