Garmin Frisbee Analysis
Analyze Garmin health and performance data specifically for Ultimate Frisbee players. Generate interactive HTML dashboards for post-game review, tournament fatigue tracking, training load optimization, and season-long trend comparison.
Two Installation Paths
- 1. Clawdbot Skill (this guide) — Use with Clawdbot for natural language queries and proactive monitoring
- MCP Server (see MCP setup guide) — Use with Claude Desktop as an MCP server
Setup (first time only)
1. Install Dependencies
CODEBLOCK0
Pinned versions are in requirements.txt:
- -
garminconnect>=0.2.19 — Garmin Connect API client - INLINECODE1 — FIT file parsing for activity data
- INLINECODE2 — GPX file parsing
2. Configure Credentials
Why email + password? Garmin does not expose a public OAuth API. The garminconnect library authenticates via Garmin's SSO, the same flow as the Garmin Connect mobile app. The password is used once during login and is never written to disk or logged. The resulting session token is then stored locally at ~/.clawdbot/garmin/ (permissions 700); all subsequent API requests use that token, not the password.
Set GARMIN_EMAIL and GARMIN_PASSWORD in your shell profile (~/.zshrc or ~/.bashrc):
CODEBLOCK1
3. Authenticate
CODEBLOCK2
Frisbee Scripts
Post-Game / Post-Training Analysis
Analyze a single activity in depth: sprints, speed, heart rate zones.
CODEBLOCK3
Dashboard includes:
- - Summary cards: duration, distance, sprint count, top speed, sprint fatigue index, high-intensity distance
- Speed timeline with sprint highlight bands
- Sprint peak speed trend (detects fatigue: are later sprints slower?)
- Heart rate zone distribution (Zone 1–6)
Sprint detection: speed > 14.4 km/h sustained ≥ 2 seconds.
Sprint Fatigue Index: last 3 sprint peaks ÷ first 3 sprint peaks. < 0.85 = significant fatigue.
Tournament Review Dashboard
Full overview of a multi-day tournament: fatigue curve, game intensity, heart rate recovery, overnight sleep/HRV.
CODEBLOCK4
Dashboard includes:
- - Body Battery fatigue curve across tournament days (includes day-before baseline)
- Per-game avg/max heart rate comparison
- Heart Rate Recovery curves post-game (30 min window, all games overlaid)
- Overnight sleep hours + HRV per tournament night
- Activity table with all detected games
Comparison Analysis
Compare training sessions, games, or the full season.
CODEBLOCK5
Activity classification uses name keywords:
- - Game:
game, match, tournament, vs, INLINECODE13 - Training:
practice, training, train, drill, INLINECODE18
Dashboard includes:
- - Top speed trend over time (training vs game color-coded in cross mode)
- Avg heart rate per activity (color by intensity)
- Morning HRV on day of each activity
- Volume trend: duration + distance over time
- Full activity table
General Garmin Data
CODEBLOCK6
General Health Charts
CODEBLOCK7
Answering Frisbee Questions
| Player asks | Script | What to report |
|---|
| "How many sprints did I hit?" | INLINECODE19 | sprintcount, sprint fatigue index |
| "What was my top speed?" |
frisbee_activity.py --latest | topspeed_kmh from summary |
| "Was I fatigued at the end?" |
frisbee_activity.py --latest | sprint
fatigueindex < 0.85 = yes |
| "How long was my heart rate elevated?" |
frisbee_activity.py --latest | Zone 4-6 time percentage |
| "Did I recover fast enough between points?" |
frisbee_tournament.py | HRR curves, slope comparison |
| "Was I ready for the tournament?" |
frisbee_tournament.py | Pre-game Body Battery values |
| "Is my training intense enough?" |
frisbee_compare.py --mode cross | Avg HR: training vs game |
| "Am I improving this season?" |
frisbee_compare.py --mode season | Top speed + HRV trends |
| "How did I sleep during the tournament?" |
frisbee_tournament.py | Recovery nights chart |
Data Availability (Garmin 265S)
| Metric | Available |
|---|
| Sprint count & speed | ✅ FIT file analysis |
| Top speed |
✅ FIT file
speed field |
| Sprint fatigue index | ✅ Computed from speed time-series |
| Heart rate zones | ✅ FIT file HR + max HR |
| Heart Rate Recovery (HRR) | ✅ Intraday HR time-series |
| Body Battery | ✅ Garmin API |
| HRV (overnight) | ✅ Garmin API |
| Sleep stages & score | ✅ Garmin API |
| Total distance | ✅ FIT file + Garmin API |
| High-intensity distance | ✅ Computed from speed threshold |
| Ground Contact Time | ❌ Requires HRM-Run Pod (not wrist) |
Key Frisbee Metrics Explained
Sprint Fatigue Index
Ratio of last 3 sprint peak speeds to first 3:
≥ 0.95 stable,
0.85–0.95 mild decline,
< 0.85 significant fatigue. Use this to judge if you're losing speed output as the game progresses.
Heart Rate Recovery (HRR)
How fast your HR drops after game ends. Steeper curve = better cardiovascular fitness and recovery. Flatter curves in later games of a tournament = cumulative fatigue.
Body Battery (0–100)
Pre-game value is the key readiness indicator.
≥ 70 = ready to go,
50–69 = manageable,
< 50 = compromised performance likely.
Heart Rate Zones
- - Zone 4 (70–80% max): Sustained hard effort — hallmark of well-executed frisbee
- Zone 5–6 (80–100% max): Explosive sprints and close contests
- High Zone 4–6 in training = adequate game-prep intensity
Troubleshooting
- - "FIT file download failed": Check activity ID; some activity types may not export FIT
- No sprints detected: Activity may not include speed data, or you used a non-GPS mode
- HRR chart empty: Intraday HR not available for that date; ensure "All-day HR monitoring" is on in Garmin settings
- Activities not classified: Name your activities with keywords like "game vs X" or "practice" — see classification keywords above
- Tokens expired: Re-run INLINECODE35
Privacy & Security
Credentials
- -
GARMIN_EMAIL and GARMIN_PASSWORD are read from environment variables at runtime only - The Garmin password is never written to disk or logged — used only during the authentication step, then discarded
- No config file stores credentials
Session tokens
- - Stored in
~/.clawdbot/garmin/ with directory permissions 700 (owner read/write/execute only) - Managed by the
garth library (part of garminconnect); format is an opaque token bundle, not plaintext password - To revoke:
rm -rf ~/.clawdbot/garmin/ — next login will re-authenticate
Network
- - Credentials are used only to authenticate with Garmin Connect and are not transmitted to any third-party service
- All API calls go to
connect.garmin.com only - Generated HTML dashboards load Chart.js from
cdn.jsdelivr.net (versions pinned: chart.js@4.4.0, chartjs-plugin-annotation@3.0.1) — requires internet access when viewing dashboards
References
- -
references/api.md — Garmin Connect API details - INLINECODE48 — Science-backed metric interpretation
- INLINECODE49 — Claude Desktop MCP setup
Version Info
- - Version: 1.1.3
- Created: 2026-03-11
- Updated: 2026-03-16
- Author: Evelyn & Claude
- License: MIT
- Dependencies: garminconnect, fitparse, gpxpy
Garmin飞盘分析
专门针对极限飞盘运动员分析Garmin健康与表现数据。生成交互式HTML仪表板,用于赛后回顾、锦标赛疲劳追踪、训练负荷优化以及整个赛季的趋势对比。
两种安装方式
- 1. Clawdbot技能(本指南)——配合Clawdbot使用,支持自然语言查询和主动监控
- MCP服务器(参见MCP设置指南)——作为MCP服务器与Claude Desktop配合使用
设置(仅首次)
1. 安装依赖
bash
pip3 install -r requirements.txt
固定版本见requirements.txt:
- - garminconnect>=0.2.19 — Garmin Connect API客户端
- fitparse>=3.2.0 — 用于活动数据的FIT文件解析
- gpxpy>=1.3.5 — GPX文件解析
2. 配置凭证
为什么需要邮箱+密码? Garmin不提供公开的OAuth API。garminconnect库通过Garmin的SSO进行身份验证,与Garmin Connect移动应用的流程相同。密码在登录时仅使用一次,从不写入磁盘或记录日志。生成的会话令牌随后存储在本地~/.clawdbot/garmin/目录下(权限700);所有后续API请求均使用该令牌,而非密码。
在shell配置文件(~/.zshrc或~/.bashrc)中设置GARMINEMAIL和GARMINPASSWORD:
bash
export GARMIN_EMAIL=your-email@example.com
export GARMIN_PASSWORD=your-password
3. 身份验证
bash
python3 scripts/garmin_auth.py login
python3 scripts/garmin_auth.py status # 验证
飞盘脚本
赛后/训练后分析
深入分析单个活动:冲刺、速度、心率区间。
bash
最近的活动
python3 scripts/frisbee_activity.py --latest
指定日期
python3 scripts/frisbee_activity.py --date 2026-03-08
指定活动ID
python3 scripts/frisbee_activity.py --activity-id 12345678
保存到文件
python3 scripts/frisbee_activity.py --latest --output ~/Desktop/game.html
仪表板包含:
- - 摘要卡片:时长、距离、冲刺次数、最高速度、冲刺疲劳指数、高强度距离
- 带冲刺高亮条的速度时间线
- 冲刺峰值速度趋势(检测疲劳:后续冲刺是否变慢?)
- 心率区间分布(1–6区)
冲刺检测: 速度 > 14.4公里/小时且持续 ≥ 2秒。
冲刺疲劳指数: 最后3次冲刺峰值 ÷ 前3次冲刺峰值。 < 0.85 = 显著疲劳。
锦标赛回顾仪表板
多日锦标赛的完整概览:疲劳曲线、比赛强度、心率恢复、夜间睡眠/HRV。
bash
python3 scripts/frisbee_tournament.py \
--start 2026-03-08 \
--end 2026-03-10 \
--name 2026春季锦标赛 \
--output ~/Desktop/tournament.html
仪表板包含:
- - 锦标赛期间的Body Battery疲劳曲线(含赛前一天的基线)
- 每场比赛的平均/最大心率对比
- 赛后心率恢复曲线(30分钟窗口,所有比赛叠加显示)
- 每场锦标赛夜间的睡眠时长 + HRV
- 包含所有检测到比赛的活动表格
对比分析
比较训练课、比赛或整个赛季。
bash
训练 vs 训练(最近90天)
python3 scripts/frisbee_compare.py --mode training --days 90
比赛 vs 比赛
python3 scripts/frisbee_compare.py --mode tournament --days 180
训练强度 vs 比赛强度
python3 scripts/frisbee_compare.py --mode cross --days 60
整个赛季概览
python3 scripts/frisbee_compare.py --mode season --days 180
保存输出
python3 scripts/frisbee_compare.py --mode season --days 180 --output ~/Desktop/season.html
活动分类使用名称关键词:
- - 比赛:game、match、tournament、vs、finals
- 训练:practice、training、train、drill、scrimmage
仪表板包含:
- - 随时间变化的最高速度趋势(交叉模式下训练与比赛用颜色区分)
- 每项活动的平均心率(按强度着色)
- 每项活动当天的晨间HRV
- 量趋势:随时间变化的时长 + 距离
- 完整活动表格
通用Garmin数据
bash
睡眠
python3 scripts/garmin_data.py sleep --days 14
Body Battery
python3 scripts/garmin
data.py bodybattery --days 30
HRV
python3 scripts/garmin_data.py hrv --days 30
心率
python3 scripts/garmin
data.py heartrate --days 7
活动
python3 scripts/garmin_data.py activities --days 30
压力
python3 scripts/garmin_data.py stress --days 7
综合摘要
python3 scripts/garmin_data.py summary --days 7
自定义日期范围
python3 scripts/garmin_data.py sleep --start 2026-01-01 --end 2026-01-15
通用健康图表
bash
python3 scripts/garmin_chart.py sleep --days 30
python3 scripts/garminchart.py bodybattery --days 30
python3 scripts/garmin_chart.py hrv --days 90
python3 scripts/garmin_chart.py activities --days 30
python3 scripts/garmin_chart.py dashboard --days 30
回答飞盘相关问题
| 玩家提问 | 使用的脚本 | 报告内容 |
|---|
| 我完成了多少次冲刺? | frisbeeactivity.py --latest | 冲刺次数、冲刺疲劳指数 |
| 我的最高速度是多少? |
frisbeeactivity.py --latest | 摘要中的最高速度(公里/小时) |
| 我最后是否感到疲劳? | frisbee_activity.py --latest | 冲刺疲劳指数 < 0.85 = 是 |
| 我的心率升高持续了多久? | frisbee_activity.py --latest | 4–6区时间百分比 |
| 我在回合之间恢复得够快吗? | frisbee_tournament.py | HRR曲线、斜率对比 |
| 我准备好参加锦标赛了吗? | frisbee_tournament.py | 赛前Body Battery数值 |
| 我的训练强度够吗? | frisbee_compare.py --mode cross | 平均心率:训练 vs 比赛 |
| 我这个赛季在进步吗? | frisbee_compare.py --mode season | 最高速度 + HRV趋势 |
| 我在锦标赛期间睡得怎么样? | frisbee_tournament.py | 恢复夜间图表 |
数据可用性(Garmin 265S)
| 指标 | 是否可用 |
|---|
| 冲刺次数与速度 | ✅ FIT文件分析 |
| 最高速度 |
✅ FIT文件speed字段 |
| 冲刺疲劳指数 | ✅ 从速度时间序列计算 |
| 心率区间 | ✅ FIT文件心率 + 最大心率 |
| 心率恢复(HRR) | ✅ 日内心率时间序列 |
| Body Battery | ✅ Garmin API |
| HRV(夜间) | ✅ Garmin API |
| 睡眠阶段与评分 | ✅ Garmin API |
| 总距离 | ✅ FIT文件 + Garmin API |
| 高强度距离 | ✅ 从速度阈值计算 |
| 触地时间 | ❌ 需要HRM-Run心率带(非腕部) |
关键飞盘指标说明
冲刺疲劳指数
最后3次冲刺峰值速度与前3次的比值:≥ 0.95稳定,0.85–0.95轻度下降,< 0.85显著疲劳。用于判断比赛进行过程中速度输出是否下降。
心率恢复(HRR)
比赛结束后心率下降的速度。曲线越陡 = 心血管健康和恢复能力越好。锦标赛后期比赛中曲线越平缓 = 累积疲劳。
Body Battery(0–100)
赛前数值是关键的准备状态指标。≥ 70 = 准备就绪,50–69 = 可控状态,< 50 = 表现可能受影响。
心率