← 返回 Skills 市场
drpeterkalmar

Garmin Connect Pro

作者 drpeterkalmar · GitHub ↗ · v1.4.1 · MIT-0
cross-platform ✓ 安全检测通过
438
总下载
1
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install garmin-connect-pro
功能描述
Want to be fit like @steipete? Well, now you can track every step of your journey—literally. This skill pulls your complete Garmin Connect data into OpenClaw...
使用说明 (SKILL.md)

Garmin Connect Pro

The most comprehensive Garmin Connect skill for OpenClaw. Retrieve activities, health data, sleep analysis, heart rate, stress, body battery, training readiness, VO2 max, and more from your Fenix, Forerunner, Index scales, or other Garmin devices.

Security & Privacy

⚠️ Important Security Information:

Credential Options

Option 1: Environment Variables (Recommended for cron jobs)

export GARMIN_EMAIL="[email protected]"
export GARMIN_PASSWORD="your-password"
  • More secure for automated/scheduled usage
  • Not stored on disk
  • Works with cron jobs without leaving plaintext files

Option 2: Credentials File

mkdir -p ~/.config/garmin-connect
echo '{"email": "[email protected]", "password": "your-password"}' > ~/.config/garmin-connect/credentials.json
chmod 600 ~/.config/garmin-connect/credentials.json
  • Stored in plaintext (any process with file access can read it)
  • File permissions set to 600 (owner read/write only)
  • Consider excluding from backups

Third-Party Library

This skill uses the garminconnect Python library for all Garmin API communication.

Data Flow

Your Credentials → garminconnect library → Garmin API servers
                     ↓
              OAuth tokens cached locally

No data is transmitted to any third parties other than Garmin via the official garminconnect library.

Setup

First-time Login

# Install dependency
pip3 install garminconnect

# Option A: Use environment variables (recommended)
export GARMIN_EMAIL="[email protected]"
export GARMIN_PASSWORD="your-password"

# Option B: Use credentials file
mkdir -p ~/.config/garmin-connect
echo '{"email": "[email protected]", "password": "your-password"}' > ~/.config/garmin-connect/credentials.json
chmod 600 ~/.config/garmin-connect/credentials.json

# Login (generates OAuth tokens)
python3 ~/.agents/skills/garmin-connect-pro/scripts/garmin.py login

Features

Feature Description
Natural Language Queries "how did I sleep?", "what's my body battery?", "should I train today?"
ASCII Charts Visual trends for steps, HR, stress, battery
Week-over-Week Comparison Track progress vs last week
Race Predictions 5K, 10K, half marathon, marathon
Body Composition Weight, muscle mass, fat percentage
VO2 Max Tracking Cardio fitness from activities
FIT/GPX Downloads Export activity files
Training Effect Aerobic + anaerobic impact
HR Zones per Activity Time in each zone
Emoji-Powered Output Quick visual scanning

Quick Start

# Ask questions naturally
python3 scripts/garmin.py ask "how did I sleep?"
python3 scripts/garmin.py ask "what's my training readiness?"

# Daily summary
python3 scripts/garmin.py summary

# Trends with charts
python3 scripts/garmin.py trends --days 7
python3 scripts/garmin.py chart steps --days 14

# Compare weeks
python3 scripts/garmin.py compare

# Download activities
python3 scripts/garmin.py download --id 123456 --format fit

Commands

Natural Language

python3 scripts/garmin.py ask "how did I sleep?"
python3 scripts/garmin.py ask "am I stressed?"
python3 scripts/garmin.py ask "how many steps today?"

Daily Metrics

python3 scripts/garmin.py summary              # Full daily summary
python3 scripts/garmin.py stats --today        # Steps, HR, calories
python3 scripts/garmin.py sleep --today        # Sleep stages
python3 scripts/garmin.py hr --today           # Heart rate data
python3 scripts/garmin.py hrv --today          # HRV
python3 scripts/garmin.py stress --today       # Stress levels
python3 scripts/garmin.py body-battery --today # Energy level

Activities

python3 scripts/garmin.py activities --limit 5
python3 scripts/garmin.py activity --id 123456 --full
python3 scripts/garmin.py download --id 123456 --format fit

Training & Performance

python3 scripts/garmin.py training --today     # Readiness + intensity
python3 scripts/garmin.py vo2max              # VO2 max + predictions
python3 scripts/garmin.py body                 # Body composition
python3 scripts/garmin.py race                 # Race predictions

Trends

python3 scripts/garmin.py week --days 7
python3 scripts/garmin.py trends --days 14
python3 scripts/garmin.py compare              # Week vs week
python3 scripts/garmin.py chart steps --days 30

Example Output

Natural Language Response

🔋 Body Battery:
   Current: 45%
   ⚠️ Moderate - lighter activity recommended

Weekly Comparison

📊 WEEK VS WEEK
─────────────────────────────────────────────────
Metric          This Week   Last Week   Change
─────────────────────────────────────────────────
Steps              42,500      38,200    ↑ 11.3%
Distance (km)         35.2        28.9   ↑ 21.8%
Calories            18,500      17,200     ↑ 7.6%
Resting HR            56.0        57.5     ↓ 2.6%

ASCII Chart

📈 STEPS - Last 7 Days
──────────────────────────────────────────────
10000 │       █           █
 8000 │   █   █   █       █
 6000 │   █   █   █   █   █
 4000 │   █   █   █   █   █   █
 2000 │   █   █   █   █   █   █   █
    0 └────────────────────────────────
      Mon  Tue  Wed  Thu  Fri  Sat  Sun

Cron Job Setup

⚠️ Security Note: Using environment variables is more secure than storing credentials on disk.

Option A: Environment Variables (Recommended)

# In your crontab or OpenClaw cron config:
GARMIN_EMAIL="[email protected]" GARMIN_PASSWORD="your-password" python3 ~/.agents/skills/garmin-connect-pro/scripts/garmin.py summary

Option B: Credentials File

# Morning briefing at 6:30
openclaw cron add --name "Morning Fitness" --cron "30 6 * * *" \
  --message "python3 ~/.agents/skills/garmin-connect-pro/scripts/garmin.py summary"

# Midday check at 12:00
openclaw cron add --name "Midday Check" --cron "0 12 * * *" \
  --message "python3 ~/.agents/skills/garmin-connect-pro/scripts/garmin.py ask 'body battery'"

# Evening summary at 20:00
openclaw cron add --name "Evening Summary" --cron "0 20 * * *" \
  --message "python3 ~/.agents/skills/garmin-connect-pro/scripts/garmin.py week --days 1"

Note: Cron jobs that run scripts with access to stored credentials increase the attack surface. Consider:

  • Using a dedicated Garmin account with limited permissions
  • Using environment variables instead of credential files
  • Running on a secure, isolated system

Data Available

Category Metrics
Activities Name, type, duration, distance, calories, HR zones, training effect, elevation, splits, steps
Daily Stats Steps, distance, floors, calories (total/active/BMR), HR (resting/min/max), stress, body battery
Sleep Total, deep, light, REM, awake, sleep score
Heart Resting HR, min/max HR, HR zones, HRV (heart rate variability)
Training Readiness score, intensity minutes (moderate/vigorous), aerobic/anaerobic effect
Body Weight, muscle mass, fat percentage, BMI (with Index scale)
Performance VO2 max, race predictions (5K-marathon), FTP (cycling)
Health SpO2, respiration rate, hydration, stress timeline
Devices Fenix, Forerunner, Index scales, firmware, battery level

JSON Output

Add --json to any command for scripting:

python3 scripts/garmin.py summary --json | jq '.totalSteps'
python3 scripts/garmin.py activities --json | jq '.[0].averageHR'
python3 scripts/garmin.py export --days 30 --json > monthly_export.json

Requirements

  • Python 3.7+
  • garminconnect library (pip install garminconnect)
  • Garmin Connect account with devices synced

Troubleshooting

"Authentication failed"

  • Verify email and password in credentials file or environment variables
  • Delete tokens: rm -rf ~/.config/garmin-connect/tokens/
  • Re-run login

"No data for date"

  • Device may not have synced yet
  • Sleep data appears after morning sync
  • Some metrics (HRV, training readiness) require overnight processing

Rate Limits

  • Garmin may rate-limit excessive API calls
  • Add delays between bulk requests

The Honest Truth

This won't make you fitter. But it will make it harder to ignore the data. Your Garmin already knows you skipped leg day—now OpenClaw can remind you too.


Want to be fit like @steipete? Well, now you can track every step of your journey—literally.

安全使用建议
This skill appears to do what it claims: it uses the garminconnect Python library to fetch your Garmin data and caches OAuth tokens locally. Before installing: (1) Prefer providing GARMIN_EMAIL/GARMIN_PASSWORD as environment variables rather than creating the plaintext credentials file. (2) If you must use a credentials file, keep it at ~/.config/garmin-connect/credentials.json with 600 permissions and consider excluding it from backups. (3) Review/verify the garminconnect library source (https://github.com/cyberjunkie/garminconnect) if you have strong security needs. (4) Consider using a dedicated Garmin account for automation and be cautious when scheduling cron jobs that run with stored credentials. If you want, I can scan the full scripts for any suspicious network calls or print the exact places where credentials and tokens are read/written.
功能分析
Type: OpenClaw Skill Name: garmin-connect-pro Version: 1.4.1 The Garmin Connect Pro skill is a legitimate tool designed to integrate Garmin fitness and health data into the OpenClaw ecosystem. It utilizes the well-known 'garminconnect' Python library for all API communications and provides clear documentation on credential management, supporting both environment variables and local configuration files with appropriate file permissions (600). The code (garmin.py and garmin-pro.py) is transparent, lacks obfuscation, and contains no evidence of data exfiltration, malicious execution, or prompt injection; its 'natural language' capabilities are implemented via simple keyword-based logic.
能力评估
Purpose & Capability
Name/description, SKILL.md, package.json, and the two Python scripts all describe the same functionality (retrieve Garmin Connect activities and health metrics). The only declared binary requirement is python3 and the pip dependency is the garminconnect client—both are appropriate and proportional.
Instruction Scope
Runtime instructions and the scripts consistently instruct the agent to read credentials (env vars or ~/.config/garmin-connect/credentials.json), obtain OAuth tokens (cached in ~/.config/garmin-connect/tokens/), and call garminconnect client methods. There are no instructions or code paths that access unrelated system paths, other skills, or external endpoints beyond Garmin via the garminconnect library.
Install Mechanism
No install spec is provided; SKILL.md directs users to pip3 install garminconnect. This is typical and low risk compared with arbitrary downloads. The third-party library used is an open-source GitHub project and is traceable.
Credentials
The skill requires your Garmin credentials (email/password) to authenticate—exposed via environment variables (recommended) or a plaintext credentials file as a fallback; OAuth tokens are cached locally. Requesting these credentials is proportional to the stated purpose, but storing plaintext credentials on disk increases attack surface (the SKILL.md warns about this).
Persistence & Privilege
The skill caches OAuth tokens under ~/.config/garmin-connect/tokens/ and may write that directory. It does not request always:true, does not alter other skills, and its persistence is narrowly scoped to its own token/credential files. Token caching and local credential files are expected for an API client but increase local exposure if the machine is compromised.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install garmin-connect-pro
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /garmin-connect-pro 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.4.1
Fixed missing cmd_summary and cmd_activities functions
v1.3.0
Security: Documented GARMIN_EMAIL/GARMIN_PASSWORD env vars, added third-party library trust boundary warning (garminconnect), improved cron job security guidance with env var recommendation, clarified data flow diagram.
v1.2.0
Security disclosure: Added credential storage warnings, censored example values, natural language queries, ASCII charts, body composition, VO2 max, week-over-week comparison, FIT/GPX download.
v1.1.0
Natural Language Queries (ask 'how did I sleep?'), ASCII Charts, Body Composition, VO2 Max tracking, Week-over-Week comparison, FIT/GPX download, Training Effect (aerobic + anaerobic), HR zones per activity, enhanced emoji-powered output.
v1.0.0
Initial release of garmin-connect-pro skill with comprehensive access to Garmin Connect data. - Fetches detailed fitness and health metrics (activity, sleep, heart rate, stress, trends, race predictions, devices, etc.) - Command-line interface for data summaries, analytics, exports, and device/workout management - Supports full JSON export and machine-readable output - Stores login credentials and tokens locally for privacy and convenience - Includes troubleshooting and setup documentation for first-time users
元数据
Slug garmin-connect-pro
版本 1.4.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

Garmin Connect Pro 是什么?

Want to be fit like @steipete? Well, now you can track every step of your journey—literally. This skill pulls your complete Garmin Connect data into OpenClaw... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 438 次。

如何安装 Garmin Connect Pro?

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

Garmin Connect Pro 是免费的吗?

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

Garmin Connect Pro 支持哪些平台?

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

谁开发了 Garmin Connect Pro?

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

💬 留言讨论