skills$openclaw/garmer
garrza6.2k

by garrza

garmer – OpenClaw Skill

garmer is an OpenClaw Skills integration for coding workflows. Extract health and fitness data from Garmin Connect including activities, sleep, heart rate, stress, steps, and body composition. Use when the user asks about their Garmin data, fitness metrics, sleep analysis, or health insights.

6.2k stars9.8k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026coding

Skill Snapshot

namegarmer
descriptionExtract health and fitness data from Garmin Connect including activities, sleep, heart rate, stress, steps, and body composition. Use when the user asks about their Garmin data, fitness metrics, sleep analysis, or health insights. OpenClaw Skills integration.
ownergarrza
repositorygarrza/garmer
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @garrza/garmer
last updatedFeb 7, 2026

Maintainer

garrza

garrza

Maintains garmer in the OpenClaw Skills directory.

View GitHub profile
File Explorer
43 files
.
examples
basic_usage.py
13.2 KB
moltbot_integration.py
12.6 KB
references
REFERENCE.md
9.7 KB
scripts
health_query.py
3.0 KB
moltbot_integration.py
12.6 KB
src
garmer
extractors
__init__.py
667 B
activities.py
8.5 KB
base.py
5.4 KB
body.py
6.8 KB
daily.py
4.6 KB
heart_rate.py
4.0 KB
sleep.py
3.8 KB
steps.py
4.9 KB
stress.py
4.0 KB
user.py
4.3 KB
models
__init__.py
1.3 KB
activity.py
9.9 KB
base.py
1.5 KB
body_composition.py
4.3 KB
daily.py
10.7 KB
heart_rate.py
5.0 KB
hydration.py
3.2 KB
respiration.py
3.6 KB
sleep.py
10.0 KB
steps.py
5.0 KB
stress.py
6.4 KB
user.py
5.6 KB
__init__.py
615 B
auth.py
8.6 KB
cli.py
33.7 KB
client.py
21.5 KB
config.py
5.2 KB
_meta.json
442 B
pyproject.toml
1.2 KB
README.md
5.1 KB
SKILL.md
7.7 KB
SKILL.md

name: garmer description: Extract health and fitness data from Garmin Connect including activities, sleep, heart rate, stress, steps, and body composition. Use when the user asks about their Garmin data, fitness metrics, sleep analysis, or health insights. license: MIT compatibility: Requires Python 3.10+, pip/uv for installation. Requires Garmin Connect account credentials for authentication. metadata: author: MoltBot Team version: "0.1.0" moltbot: emoji: "⌚" primaryEnv: "GARMER_TOKEN_DIR" requires: bins: - garmer install: - id: uv kind: uv package: garmer bins: - garmer label: Install garmer (uv) - id: pip kind: pip package: garmer bins: - garmer label: Install garmer (pip)

Garmer - Garmin Data Extraction Skill

This skill enables extraction of health and fitness data from Garmin Connect for analysis and insights.

Prerequisites

  1. A Garmin Connect account with health data
  2. The garmer CLI tool installed (see installation options in metadata)

Authentication (One-Time Setup)

Before using garmer, authenticate with Garmin Connect:

garmer login

This will prompt for your Garmin Connect email and password. Tokens are saved to ~/.garmer/garmin_tokens for future use.

To check authentication status:

garmer status

Available Commands

Daily Summary

Get today's health summary (steps, calories, heart rate, stress):

garmer summary
# For a specific date:
garmer summary --date 2025-01-15
# Include last night's sleep data:
garmer summary --with-sleep
garmer summary -s
# JSON output for programmatic use:
garmer summary --json
# Combine flags:
garmer summary --date 2025-01-15 --with-sleep --json

Sleep Data

Get sleep analysis (duration, phases, score, HRV):

garmer sleep
# For a specific date:
garmer sleep --date 2025-01-15

Activities

List recent fitness activities:

garmer activities
# Limit number of results:
garmer activities --limit 5
# Filter by specific date:
garmer activities --date 2025-01-15
# JSON output for programmatic use:
garmer activities --json

Activity Detail

Get detailed information for a single activity:

# Latest activity:
garmer activity
# Specific activity by ID:
garmer activity 12345678
# Include lap data:
garmer activity --laps
# Include heart rate zone data:
garmer activity --zones
# JSON output:
garmer activity --json
# Combine flags:
garmer activity 12345678 --laps --zones --json

Health Snapshot

Get comprehensive health data for a day:

garmer snapshot
# For a specific date:
garmer snapshot --date 2025-01-15
# As JSON for programmatic use:
garmer snapshot --json

Export Data

Export multiple days of data to JSON:

# Last 7 days (default)
garmer export

# Custom date range
garmer export --start-date 2025-01-01 --end-date 2025-01-31 --output my_data.json

# Last N days
garmer export --days 14

Utility Commands

# Update garmer to latest version (git pull):
garmer update

# Show version information:
garmer version

Python API Usage

For more complex data processing, use the Python API:

from garmer import GarminClient
from datetime import date, timedelta

# Use saved tokens
client = GarminClient.from_saved_tokens()

# Or login with credentials
client = GarminClient.from_credentials(email="user@example.com", password="pass")

User Profile

# Get user profile
profile = client.get_user_profile()
print(f"User: {profile.display_name}")

# Get registered devices
devices = client.get_user_devices()

Daily Summary

# Get daily summary (defaults to today)
summary = client.get_daily_summary()
print(f"Steps: {summary.total_steps}")

# Get for specific date
summary = client.get_daily_summary(date(2025, 1, 15))

# Get weekly summary
weekly = client.get_weekly_summary()

Sleep Data

# Get sleep data (defaults to today)
sleep = client.get_sleep()
print(f"Sleep: {sleep.total_sleep_hours:.1f} hours")

# Get last night's sleep
sleep = client.get_last_night_sleep()

# Get sleep for date range
sleep_data = client.get_sleep_range(
    start_date=date(2025, 1, 1),
    end_date=date(2025, 1, 7)
)

Activities

# Get recent activities
activities = client.get_recent_activities(limit=5)
for activity in activities:
    print(f"{activity.activity_name}: {activity.distance_km:.1f} km")

# Get activities with filters
activities = client.get_activities(
    start_date=date(2025, 1, 1),
    end_date=date(2025, 1, 31),
    activity_type="running",
    limit=20
)

# Get single activity by ID
activity = client.get_activity(12345678)

Heart Rate

# Get heart rate data for a day
hr = client.get_heart_rate()
print(f"Resting HR: {hr.resting_heart_rate} bpm")

# Get just resting heart rate
resting_hr = client.get_resting_heart_rate(date(2025, 1, 15))

Stress & Body Battery

# Get stress data
stress = client.get_stress()
print(f"Avg stress: {stress.avg_stress_level}")

# Get body battery data
battery = client.get_body_battery()

Steps

# Get detailed step data
steps = client.get_steps()
print(f"Total: {steps.total_steps}, Goal: {steps.step_goal}")

# Get just total steps
total = client.get_total_steps(date(2025, 1, 15))

Body Composition

# Get latest weight
weight = client.get_latest_weight()
print(f"Weight: {weight.weight_kg} kg")

# Get weight for specific date
weight = client.get_weight(date(2025, 1, 15))

# Get full body composition
body = client.get_body_composition()

Hydration & Respiration

# Get hydration data
hydration = client.get_hydration()
print(f"Intake: {hydration.total_intake_ml} ml")

# Get respiration data
resp = client.get_respiration()
print(f"Avg breathing: {resp.avg_waking_respiration} breaths/min")

Comprehensive Reports

# Get health snapshot (all metrics for a day)
snapshot = client.get_health_snapshot()
# Returns: daily_summary, sleep, heart_rate, stress, steps, hydration, respiration

# Get weekly health report with trends
report = client.get_weekly_health_report()
# Returns: activities summary, sleep stats, steps stats, HR trends, stress trends

# Export data for date range
data = client.export_data(
    start_date=date(2025, 1, 1),
    end_date=date(2025, 1, 31),
    include_activities=True,
    include_sleep=True,
    include_daily=True
)

Common Workflows

Health Check Query

When a user asks "How did I sleep?" or "What's my health summary?":

garmer snapshot --json

Activity Analysis

When a user asks about workouts or exercise:

garmer activities --limit 10

Trend Analysis

When analyzing health trends over time:

garmer export --days 30 --output health_data.json

Then process the JSON file with Python for analysis.

Data Types Available

  • Activities: Running, cycling, swimming, strength training, etc.
  • Sleep: Duration, phases (deep, light, REM), score, HRV
  • Heart Rate: Resting HR, samples, zones
  • Stress: Stress levels, body battery
  • Steps: Total steps, distance, floors
  • Body Composition: Weight, body fat, muscle mass
  • Hydration: Water intake tracking
  • Respiration: Breathing rate data

Error Handling

If not authenticated:

Not logged in. Use 'garmer login' first.

If session expired, re-authenticate:

garmer login

Environment Variables

  • GARMER_TOKEN_DIR: Custom directory for token storage
  • GARMER_LOG_LEVEL: Set logging level (DEBUG, INFO, WARNING, ERROR)
  • GARMER_CACHE_ENABLED: Enable/disable data caching (true/false)

References

For detailed API documentation and MoltBot integration examples, see references/REFERENCE.md.

README.md

Garmer - Garmin Data Extraction Tool

A Python library for extracting health and fitness data from Garmin Connect, designed for integration with MoltBot and other health insight applications.

Features

  • Comprehensive Data Extraction: Access activities, sleep, heart rate, stress, steps, body composition, hydration, and more
  • Easy Authentication: OAuth-based authentication with token persistence
  • MoltBot Integration Ready: Designed for seamless integration with AI health assistants
  • CLI Tool: Command-line interface for quick data access
  • Type-Safe Models: Pydantic-based data models with full type hints
  • Flexible Export: Export data in JSON format for analysis

Installation

# Install from source
pip install -e .

# Or with development dependencies
pip install -e ".[dev]"

Quick Start

Command Line

# Login to Garmin Connect
garmer login

# Check authentication status
garmer status

# Get today's summary
garmer summary

# Get sleep data
garmer sleep

# Get recent activities
garmer activities

# Get full health snapshot
garmer snapshot --json

# Export data
garmer export --days 7 -o my_data.json

Python API

from garmer import GarminClient

# Login with credentials (tokens are saved automatically)
client = GarminClient.from_credentials(
    email="your-email@example.com",
    password="your-password",
)

# Or use saved tokens
client = GarminClient.from_saved_tokens()

# Get today's summary
summary = client.get_daily_summary()
print(f"Steps: {summary.total_steps}")

# Get sleep data
sleep = client.get_sleep()
print(f"Sleep: {sleep.total_sleep_hours:.1f} hours")

# Get recent activities
activities = client.get_recent_activities(limit=5)
for activity in activities:
    print(f"{activity.activity_name}: {activity.distance_km:.1f} km")

# Get comprehensive health snapshot
snapshot = client.get_health_snapshot()

# Get weekly report
report = client.get_weekly_health_report()

Available Data Types

Activities

  • Running, cycling, swimming, and 20+ activity types
  • Duration, distance, pace, heart rate zones
  • Laps, splits, GPS data (via detailed endpoints)
  • Training effect metrics

Sleep

  • Total sleep duration and phases (deep, light, REM)
  • Sleep score and quality metrics
  • Heart rate, HRV, respiration during sleep
  • Sleep phases timeline

Heart Rate

  • Resting heart rate
  • Heart rate samples throughout the day
  • Heart rate zones
  • 7-day averages

Stress

  • Overall stress level
  • Stress samples throughout the day
  • Rest vs. stress duration
  • Body Battery correlation

Steps & Activity

  • Total steps and goal tracking
  • Distance traveled
  • Floors climbed
  • Intensity minutes (moderate/vigorous)
  • Sedentary time

Body Composition

  • Weight tracking
  • Body fat percentage
  • Muscle mass, bone mass
  • BMI, metabolic age

Hydration

  • Water intake tracking
  • Daily goals
  • Sweat loss correlation

Respiration

  • Breathing rate (waking and sleeping)
  • Respiratory trends

MoltBot Integration

Garmer is designed to work seamlessly with MoltBot for health insights:

from garmer.examples.moltbot_integration import GarminIntegration

integration = GarminIntegration()

# Get health summary for AI analysis
summary = integration.get_health_summary()
# Returns structured data with metrics and insights

# Get activity analysis
activities = integration.get_activity_insights(days=7)

# Get sleep trend analysis
sleep_trends = integration.get_sleep_trends(days=7)

# Generate daily briefing
briefing = integration.get_daily_briefing()

Configuration

Garmer stores configuration and tokens in ~/.garmer/:

~/.garmer/
├── garmin_tokens    # OAuth tokens (auto-created after login)
├── config.json      # Optional configuration file
└── exports/         # Default export directory

Environment Variables

  • GARMER_TOKEN_DIR: Directory for token storage
  • GARMER_LOG_LEVEL: Logging level (DEBUG, INFO, WARNING, ERROR)
  • GARMER_CACHE_ENABLED: Enable/disable caching (true/false)

Data Models

All data is returned as Pydantic models with type hints:

from garmer.models import (
    Activity,
    SleepData,
    HeartRateData,
    StressData,
    StepsData,
    DailySummary,
    UserProfile,
)

# Models can be converted to dictionaries
activity_dict = activity.to_dict()

# Or accessed with full type support
print(activity.distance_km)  # float
print(activity.avg_heart_rate)  # int | None

Error Handling

from garmer.auth import AuthenticationError, SessionExpiredError

try:
    client = GarminClient.from_saved_tokens()
except AuthenticationError:
    print("Please login first: garmer login")

try:
    data = client.get_daily_summary()
except SessionExpiredError:
    # Token expired, need to re-authenticate
    client.login(email, password)

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Type checking
mypy src/garmer

# Linting
ruff check src/garmer

License

MIT License

Acknowledgments

  • Uses the garth library for Garmin Connect authentication
  • Inspired by the need for comprehensive health data integration with AI assistants

Permissions & Security

Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.

Requirements

1. A Garmin Connect account with health data 2. The `garmer` CLI tool installed (see installation options in metadata)

FAQ

How do I install garmer?

Run openclaw add @garrza/garmer in your terminal. This installs garmer into your OpenClaw Skills catalog.

Does this skill run locally or in the cloud?

OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.

Where can I verify the source code?

The source repository is available at https://github.com/openclaw/skills/tree/main/skills/garrza/garmer. Review commits and README documentation before installing.