Running coach for endurance athletes training with Garmin, Strava, Coros, or Apple Watch. Provides VDOT-based pace zones, session analysis from training screenshots, weekly and periodized season plans (5K through marathon), race strategy, load monitoring via HRV/recovery metrics, injury risk screening, and strength/nutrition guidance grounded in Jack Daniels and Pfitzinger methodology.
设计与多媒体
run-coach
试用在 Telegram 里运行的循证跑步教练:文字或截图都能记录训练,训练计划以高清图册发送,可选同步 Garmin。
它能做什么
在 Telegram 对话中记录跑步数据:可以打字发参数,也可以直接发送手表或跑步 App 的截图,多模态能力直接读图,无需额外配置 OCR。训练计划通过 Playwright 渲染成高清图片,以 Telegram 照片专辑形式送达——周计划拆成「跑步日 + 交叉训练日」两张图。可选接入 Garmin Connect 自动同步数据,配套的每 4 周复盘会汇总配速、心率与里程趋势。训练方法综合 Daniels VDOT、MAF 心率、FIRST 三主项结构、80/20 极化配比;内置伤病监测关注膝、足底筋膜炎、IT band 三类信号,规则硬性:自评疼痛超过 4/10 必须停下。需要的环境变量只有 TELEGRAM_BOT_TOKEN 与 TELEGRAM_CHAT_ID,可视化渲染与 Garmin 都是可选项,缺依赖时会自动降级为纯文字。
什么时候用它
- 用手表或跑步 App 的截图直接记录一次训练
- 把 16 周马拉松备赛计划以图册形式发到 Telegram
- 每 4 周查看配速、心率、里程的复盘报告
- 在训练周期里追踪膝、足底筋膜炎或 IT band 的伤病信号
技能文档
Run Coach 🏃
A science-based running coach that works through Telegram. Logs your training, sends visual training plans as HD photo albums, syncs Garmin data, and coaches you with data-driven feedback.
Works for any runner — whether you're jogging 3x a week for fitness or training for your first marathon.
What it does
- Training log — Record every run: distance, pace, heart rate, feel score
- Visual plans — Training plans rendered as HD images sent to your Telegram Photos tab
- Trend tracking — Pace, heart rate, mileage trends over weeks and months
- Garmin sync — Pull data automatically from Garmin Connect (optional)
- Injury monitoring — Tracks knee, plantar fascia, IT band signals
- 4-week reviews — Automatic progress analysis every 4 weeks
- Race prep — Structured build-up for 5K, 10K, half marathon, or full marathon
Setup
1. Required environment variables
Set these in your OpenClaw config or .env:
TELEGRAM_BOT_TOKEN=your_bot_token_from_botfather
TELEGRAM_CHAT_ID=your_telegram_user_id
To get your TELEGRAM_CHAT_ID: send /start to your bot — it will show Your Telegram user id: XXXXXXXXXX.
2. Fill in your profile
Edit MEMORY.md with your personal data: age, running history, injuries, goal race.
3. Optional: Garmin integration
⚠️ Known limitation: Garmin periodically changes their login flow. The
garminconnectlibrary may stop working after a Garmin-side update until the library maintainers patch it. Check garminconnect releases if sync suddenly fails. The rest of the bot works fine without Garmin — you can always log runs manually.⚖️ Legal note:
garminconnectuses Garmin's unofficial API (no official API exists). This may technically conflict with Garmin's Terms of Service. It accesses only your own data and Garmin has not acted against individual users, but use at your own discretion.
Set these additional env vars for automatic Garmin Connect sync:
GARMIN_EMAIL=your_garmin_email
GARMIN_PASSWORD=your_garmin_password
Then install the Python library:
pip install garminconnect
4. Optional: Visual training plans (self-hosted)
The image pipeline (visual training plans sent as Telegram photos) requires additional system dependencies. Install these in your container/environment:
# CJK fonts + emoji
apt-get install -y fonts-noto-cjk fonts-noto-color-emoji
fc-cache -f
# Playwright Chromium (chrome-headless-shell)
npx playwright install chromium
Without these, the coaching features still work — plans will be sent as text instead of images.
How to use
Log a run (text)
I ran 8km today, pace 5:30/km, avg HR 135, felt good
Log a run (screenshot — no Garmin needed)
Take a screenshot of your watch, running app (Strava, Nike Run Club, Apple Watch, etc.), or any device that shows your run data, and send it directly to the bot. The bot's built-in vision capability (LLM multimodal input) extracts the numbers — no OCR code is included in this skill.
[send screenshot of your watch/app summary]
Please log this run and give me feedback
Works with any device — the LLM reads the image natively, no integration required.
Request a visual training plan
Send me this week's training plan as an image
The bot calls training/text-to-image.sh and sends the plan as a Telegram photo album — appears in your Photos tab, full quality.
Get a weekly summary
Summarize my training this week
Sync Garmin data (optional)
Sync my Garmin data and give me feedback on today's run
Image pipeline
Training plans are rendered using Playwright + chrome-headless-shell and sent via Telegram sendMediaGroup (photo album). This means:
- ✅ Appears in Telegram Photos tab
- ✅ No compression on text
- ✅ CJK (Chinese/Japanese/Korean) and emoji supported
- ✅ Weekly plans sent as 2-photo album: run days + cross-training days
Note: The image pipeline requires Telegram. If you use a different channel (Discord, WhatsApp), the coaching features still work — only the visual plan sending is Telegram-specific.
Training methodology
Based on three evidence-based frameworks:
| Framework | Application |
|---|---|
| Daniels VDOT | Pace zones derived from test results, not guesses |
| MAF heart rate | Easy runs at truly easy effort — conversational pace |
| FIRST structure | Quality sessions: Interval + Tempo + Long run |
| 80/20 polarized | 80% easy volume, 20% quality — prevents overtraining |
Safety rule: pain >4/10 means stop. Always.
Files included
run-coach/
├── SKILL.md # This file — manifest + instructions
├── MEMORY.md # User profile template (fill in your data)
├── training/
│ ├── send-plan.sh # HTML → screenshot → Telegram album
│ ├── text-to-image.sh # Text → HTML → screenshot → Telegram album
│ ├── screenshot.mjs # Playwright screenshot engine
│ └── send-album.mjs # Telegram sendPhoto (single) or sendMediaGroup (multi)
└── garmin/ # Optional Garmin integration
├── garmin-sync.py
└── garmin-query.py
Agent instructions
When the user asks to send content as an image, use exec to run:
# Option A: convert text to image
bash training/text-to-image.sh "Title" "Content with \n line breaks"
# Option B: weekly plan as 2-photo album (run days + cross-training days)
bash training/send-plan.sh "Week X Plan" training/week-XX-run.html training/week-XX-cross.html
# Option C: single HTML (today's plan, summaries — not for weekly plans)
bash training/send-plan.sh "Title" training/week-XX.html
Do NOT use canvas, browser, or Playwright directly. Only these two scripts.
If a script errors, report the exact error to the user — do not silently switch to text.
For all numeric calculations (pace conversions, HR zones, VDOT), use exec:
node -e "console.log(42.195 / (3*60+55))"
Never calculate in your head.
相关技能
Fetch health and fitness data from Garmin Connect -- 40+ metrics including sleep, HRV, stress, body battery, SpO2, VO2 Max, training status, and activities. Stores data locally as JSON and SQLite.
Adaptive run and strength plan
按真正的教练流程开会:先定产出、再用短问、给出带日期与验证的承诺,并在签约时设计好结束节点。
Fitness and workout assistant. Helps with exercise plans, nutrition advice, workout programming, and training progression. Use when someone asks about fitness, exercise, nutrition, or wants help with their training program.
TRIGGER when: user asks about workout plans, exercise routines, fat loss, muscle gain, body recomposition, meal planning for fitness, calorie or macro tracki...