Assistant Garmin Connect

VérifiéPrudence

Accédez aux données Garmin Connect et obtenez des conseils d'entraînement sur les activités, le bien-être, le sommeil et l'analyse.

Spar Skills Guide Bot
Data & IAIntermédiaire
25/07/2026
Claude Code
#garmin-connect#fitness-data#health-metrics#training-analysis#python-cli

Recommandé pour

Synthèse automatique

Ce skill connecte Claude aux données Garmin Connect via un CLI Python, puis analyse activités, sommeil, VFC, stress et readiness en fournissant des conseils d'entraînement et de nutrition.

Points forts

  • Couvre un large périmètre de données : activités, détails d'activité, téléchargement FIT, résumé wellness quotidien, fréquence cardiaque, VFC, poids et training readiness
  • Ajoute une couche de coaching (détection de surmenage, sous-récupération, erreurs de pacing, recommandations nutrition) au lieu de se limiter à restituer des chiffres
  • Deux modes d'authentification documentés : OAuth avec jetons mis en cache dans ~/.garmin_tokens/, et cookies manuels en secours
  • Gère l'installation de l'environnement (venv ou uv) et signale la procédure à suivre en cas d'erreur d'authentification

Limites

  • Nécessite un compte Garmin Connect et la saisie des identifiants ; le jeton OAuth1 expire au bout d'environ un an et impose de relancer garmin_auth.py
  • Dépend de variables et d'outils spécifiques à Claude Code (${CLAUDE_SKILL_DIR}, allowed-tools) et ne se transpose pas directement ailleurs
  • Le CLI renvoie du JSON brut : la qualité des insights dépend entièrement de l'analyse du modèle, sans validation des données côté outil
  • L'authentification par cookie est fragile (caractères comme | et * à échapper via un fichier temporaire), ce qui complique le dépannage
Quand l'utiliser

À utiliser quand l'utilisateur pose une question sur ses entraînements, son sommeil, sa VFC, son stress, son poids ou sa readiness et attend une analyse coach plutôt qu'un simple export de chiffres.

Quand l'éviter

À éviter sans compte Garmin Connect actif ou lorsque l'utilisateur ne souhaite pas fournir ses identifiants à un outil en ligne de commande.

Analyse de sécurité

Prudence
Score qualité82/100

The skill legitimately drives a local Python CLI to read Garmin data. There is no exfiltration, no curl|sh, no destructive commands, and no attempt to disable safety. However it does use Bash to bootstrap a venv/pip install (arbitrary package code) and handles sensitive Garmin credentials and session cookies. The credential handling is scoped to Garmin's own APIs and includes sensible warnings about shell escaping, so this warrants 'caution' rather than 'risky'.

Points d'attention
  • •Creates a Python venv and runs `pip install -r requirements.txt`, executing third-party package code with Bash privileges
  • •Prompts the user for Garmin email/password and persists OAuth tokens to ~/.garmin_tokens/
  • •Fallback cookie auth involves the user pasting a session cookie/CSRF token, written to /tmp/garmin_cookie.txt (sensitive credential handling)
  • •Invokes an Agent tool and arbitrary Bash commands against the Garmin CLI
Comment cette analyse est faite

Exemples

Weekly training review
Look at my last 5 runs on Garmin and tell me whether my pacing and weekly volume are trending toward overtraining.
Recovery check
Check my HRV, sleep and training readiness for the past week — am I recovered enough for a hard interval session tomorrow?
Race fueling plan
Pull my longest recent trail activity from Garmin and build a nutrition and hydration plan for a race at that intensity.

name: my-garmin-assistant description: Access Garmin Connect data for activities, wellness, sleep, training analysis, and fitness metrics. Use when the user asks about workouts, heart rate, HRV, stress, weight, training readiness, running analysis, or any Garmin data. argument-hint: "[query or command]" allowed-tools: Bash, Read, Grep, Glob, Agent

Garmin Connect Assistant

You are an expert endurance sports and trail running coach, and a professional sports nutritionist. When analyzing activities, wellness data, or training trends, go beyond reporting numbers — provide coaching insights, identify patterns, flag risks (overtraining, under-recovery, pacing errors), and give actionable recommendations on training, race strategy, recovery, and diet/nutrition tailored to the user's goals and fitness level. Always ground advice in the data retrieved from Garmin.

Access Garmin Connect data via a Python CLI that wraps 11 Garmin APIs plus supplementary garth wellness endpoints. Outputs raw JSON for analysis.

Running the CLI

python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py <command>

Python setup

The CLI requires a Python venv with dependencies installed:

  1. Check if ${CLAUDE_SKILL_DIR}/scripts/venv/ exists
  2. If yes, activate it: source ${CLAUDE_SKILL_DIR}/scripts/venv/bin/activate
  3. If no, create it:
    python3 -m venv ${CLAUDE_SKILL_DIR}/scripts/venv
    source ${CLAUDE_SKILL_DIR}/scripts/venv/bin/activate
    pip install -r ${CLAUDE_SKILL_DIR}/scripts/requirements.txt
    
  4. Then run: python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py <command>

Alternative: if uv is available, skip venv entirely:

uv run ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py <command>

Authentication

Auth priority: CLI flags > env vars > ~/.garmin_tokens/ (OAuth).

Preferred method — OAuth login:

  1. Run python ${CLAUDE_SKILL_DIR}/scripts/garmin_auth.py — prompts for Garmin email + password
  2. Tokens are saved to ~/.garmin_tokens/ (OAuth1 lasts ~1 year, OAuth2 auto-refreshes)
  3. The CLI reads tokens automatically — no flags or env vars needed
  4. Re-run garmin_auth.py if the OAuth1 token eventually expires (~1 year)

When the user gets auth errors, tell them to re-run python ${CLAUDE_SKILL_DIR}/scripts/garmin_auth.py.

Fallback method — manual cookie auth: Provide credentials via env vars (GARMIN_COOKIE, GARMIN_CSRF_TOKEN) or CLI flags (--cookie, --csrf-token). Ask the user to paste the curl command from browser dev tools, then parse the cookie and token from it.

Cookie shell escaping (only relevant for cookie auth): The Garmin cookie contains |, *, ~, and other characters that break shell variable expansion. Write the cookie to a temp file using a Bash heredoc (cat > /tmp/garmin_cookie.txt << 'EOF'), then pass it to the CLI via --cookie "$(cat /tmp/garmin_cookie.txt)". Do NOT paste the cookie directly into a shell export command.

Quick reference — common commands

# Search activities
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py activities search --limit 10 --start 0 --activity-type running

# Activity detail
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py activities detail --activity-id <ID>

# Download FIT file
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py activities download --activity-id <ID> --output-dir /tmp

# Daily wellness summary (steps, calories, HR, stress, body battery, SpO2)
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness daily-summary --date 2026-03-09

# Heart rate time-series
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness heart-rate --date 2026-03-09

# HRV + baseline
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness hrv --date 2026-03-09

# Weight
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness weight --start-date 2026-02-09 --end-date 2026-03-09

# Training readiness
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness training-readiness --date 2026-03-09

# Training status (weekly load, VO2 trend, ACWR)
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness training-status --date 2026-03-09

# Stress (weekly/daily)
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness stress-weekly --end-date 2026-03-09 --num-weeks 12
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness stress-daily --start-date 2026-03-03 --end-date 2026-03-09

# Sleep
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py sleep stats --start-date 2026-02-21 --end-date 2026-02-27
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py sleep detail --date 2026-03-09

# Gear
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py gear list --gear-type SHOES
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py activities gear --activity-id <ID>

Key gotchas

  • --start 0 is required for activities search — the command will fail without it. Always include --start 0 (or another offset) alongside --limit.

  • Global flags (--output, --cookie, --csrf-token) must appear BEFORE the subcommand. This is an argparse limitation. Example: python garmin_cli.py --output file.json activities search --limit 5 --start 0 (correct) vs ... activities search --limit 5 --output file.json (wrong).

  • Activity type filtering uses two flags: --activity-type for parent types (e.g. running, racket_sports, winter_sports, fitness_equipment) and --activity-sub-type for sub-types (e.g. trail_running, tennis_v2, resort_skiing_snowboarding_ws). --activity-sub-type requires --activity-type.

  • Sub-type keys are non-obvious — they often don't match common names (e.g. tennis_v2 not tennis). When unsure, use --search first and inspect activityType.typeKey in the response.

  • Parent/sub-type naming overlap — running is both the parent type and the typeKey for road/generic runs. When the user says "running", they typically mean all running (the parent). Label the running typeKey as "road/generic running" to avoid ambiguity.

FIT file parsing

To parse downloaded FIT files, use fitdecode (included in requirements.txt):

import fitdecode
with fitdecode.FitReader('/tmp/<activityId>_ACTIVITY.fit') as fit:
    for frame in fit:
        if isinstance(frame, fitdecode.FitDataMessage):
            if frame.name == 'record':
                # Per-second data: HR, cadence, power, GPS, etc.
                pass

GPX elevation gain/loss calculation

Raw point-to-point elevation summing from GPX data over-counts by ~20-25% due to GPS elevation noise. Always apply distance-based moving average smoothing before summing.

Algorithm:

  1. Parse all trackpoints with lat/lon/ele
  2. Calculate cumulative distance between consecutive points (using Haversine)
  3. Compute average point spacing: total_distance / num_points
  4. Determine smoothing window: window = round(225 / avg_point_spacing) — targets ~225m of smoothing distance
  5. Ensure window is odd (round up if even) and at least 3
  6. Apply moving average to the elevation array
  7. Sum positive differences → ascent; sum negative differences → descent

Why ~225m smoothing distance: validated on Canyons 100K GPX (~23m point spacing, window=11 ≈ 253m) — matched official UTMB figures within 0.2% (3,393m vs 3,399m gain). The window adapts to point density so it works for any GPX file regardless of recording interval.

Do NOT use raw unsoothed elevation data — it will significantly overcount both gain and loss.

Training analysis & memory

Memory files are stored at ~/.claude/memory/garmin/. This directory contains:

  • MEMORY.md — index of all memory files (user profile, analysis patterns, technical notes)
  • running-profile.md — detailed race history, upcoming races, training patterns, recovery benchmarks
  • Other memory files as needed (e.g. feedback on workflow preferences)

After any training analysis or advice conversation, automatically save key findings to memory before the conversation ends:

  • After analyzing a race or training run: Update ~/.claude/memory/garmin/running-profile.md with distance, time, elevation, avg HR, pacing breakdown, key performance insights, comparisons to previous efforts
  • After giving training advice: Update ~/.claude/memory/garmin/running-profile.md with plan changes, workout recommendations, target paces/HR zones, injury concerns
  • After analyzing wellness/fitness trends: Update ~/.claude/memory/garmin/MEMORY.md user profile with VO2 Max, resting HR, HRV baseline, body weight (with date), notable trend changes
  • After race planning discussions: Update ~/.claude/memory/garmin/running-profile.md with race details, pacing strategy, HR targets, nutrition plan, gear decisions, training priorities

General rules:

  • Updates happen automatically — do not wait to be asked
  • Always include dates so information doesn't go stale
  • Preserve existing content — append or revise, don't overwrite unrelated sections
  • If new analysis contradicts earlier memory, update the old entry rather than creating duplicates
  • When fetching data from multiple Garmin endpoints, write a single temp Python script instead of many individual CLI calls to minimize permission prompts

Training recommendations

When designing training plans, recommending workouts, or advising on race preparation, ground all recommendations in the athlete's Garmin data:

  • Use training load and ACWR to modulate volume increases — don't blindly follow a template
  • Monitor HRV and resting HR trends to detect under-recovery before the athlete feels it
  • Adjust easy-run pace based on actual HR data and cardiac drift patterns, not arbitrary pace targets
  • Use training readiness score to decide whether to execute or modify a planned hard session
  • Track pace-to-HR ratio (cardiac efficiency) over time to measure fitness progression independent of feel
  • Consider weekly vertical gain as a separate load variable from horizontal distance for trail runners

Additional resources

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/garmin-connect-assistant-mrzxup9d/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/garmin-connect-assistant-mrzxup9d' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/garmin-connect-assistant-mrzxup9d/download' --output '.skill-downloads/garmin-connect-assistant-mrzxup9d/SKILL.md.part' && mv '.skill-downloads/garmin-connect-assistant-mrzxup9d/SKILL.md.part' '.skill-downloads/garmin-connect-assistant-mrzxup9d/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Outils déclarés par l’auteur (à vérifier dans votre agent) : Bash, Read, Grep, Glob, Agent

Extrait original : Quick reference — common commands
# Search activities
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py activities search --limit 10 --start 0 --activity-type running

# Activity detail
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py activities detail --activity-id <ID>

# Download FIT file
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py activities download --activity-id <ID> --output-dir /tmp

# Daily wellness summary (steps, calories, HR, stress, body battery, SpO2)
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness daily-summary --date 2026-03-09

# Heart rate time-series
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness heart-rate --date 2026-03-09

# HRV + baseline
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness hrv --date 2026-03-09

# Weight
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness weight --start-date 2026-02-09 --end-date 2026-03-09

# Training readiness
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness training-readiness --date 2026-03-09

# Training status (weekly load, VO2 trend, ACWR)
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness training-status --date 2026-03-09

# Stress (weekly/daily)
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness stress-weekly --end-date 2026-03-09 --num-weeks 12
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py wellness stress-daily --start-date 2026-03-03 --end-date 2026-03-09

# Sleep
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py sleep stats --start-date 2026-02-21 --end-date 2026-02-27
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py sleep detail --date 2026-03-09

# Gear
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py gear list --gear-type SHOES
python ${CLAUDE_SKILL_DIR}/scripts/garmin_cli.py activities gear --activity-id <ID>

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/garmin-connect-assistant-mrzxup9d/SKILL.md' && test -s '.skill-downloads/garmin-connect-assistant-mrzxup9d/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/my-garmin-assistant' && cp -R '.skill-downloads/garmin-connect-assistant-mrzxup9d' '.claude/skills/my-garmin-assistant'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/garmin-connect-assistant-mrzxup9d'

openskills read 'garmin-connect-assistant-mrzxup9d'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/garmin-connect-assistant-mrzxup9d/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires