← Back to Plugins
Tools

Claw Coach

xiongyecpu By xiongyecpu 👁 65 views ▲ 0 votes

AI Running Coach - OpenClaw/Hermes Skill plugin for personalized running training plans

GitHub

Configuration Example

# ~/.hermes/config.yaml
mcp_servers:
  coros:
    command: "npx"
    args: ["-y", "coros-mcp"]
    env:
      COROS_EMAIL: "your-email"
      COROS_PASSWORD: "your-password"
    allowed_tools:
      - "authenticate_coros"
      - "get_daily_metrics"
      - "list_activities"
      - "get_activity_detail"
      - "create_workout"  # Push to watch!

README

# AI Running Coach ๐Ÿƒ

> **English** | [ไธญๆ–‡](README.zh.md)

An AI-powered running coach Skill for [OpenClaw](https://github.com/openclaw/openclaw) and [Hermes Agent](https://github.com/nousresearch/hermes).

Connect your running data, match with a science-based virtual coach, and get personalized training plans.

## Features

- **Dual-platform**: Compatible with both OpenClaw and Hermes Agent
- **Multi-data-source**: Strava API + COROS (direct API / MCP protocol)
- **3 Virtual Coaches**: Daniels VDOT, Hansons Marathon Method, MAF 180
- **AI Recommendation**: Multi-dimensional scoring to match the best coach for you
- **Dynamic Adjustment**: Auto-adjusts upcoming plans based on execution feedback
- **Safety First**: ACWR monitoring, overtraining detection, injury-aware routing
- **Visualization**: Beautiful HTML charts for training analytics

## Quick Start

### OpenClaw Installation

```bash
git clone https://github.com/xiongyecpu/claw-coach.git ~/.openclaw/skills/running-coach
cd ~/.openclaw/skills/running-coach
cp config.example.json config.json
# Edit config.json with your API credentials
```

### Hermes Agent Installation

```bash
git clone https://github.com/xiongyecpu/claw-coach.git ~/.hermes/skills/running-coach
cd ~/.hermes/skills/running-coach
cp config.example.json config.json
# Edit config.json with your API credentials

# Optional: configure COROS MCP Server
hermes mcp add coros --command "npx" --args "-y","coros-mcp"
```

Then talk to your Agent: **"I want to start running training"**

## Coaching Team

| Coach | Methodology | Best For | Weekly Volume |
|-------|-------------|----------|---------------|
| ๐ŸŽ“ Jack (VDOT) | Daniels VDOT Formula | Race goals, data-driven runners | 15-100km |
| ๐Ÿƒ Hanson | Hansons Marathon Method | Marathon training | 30-90km |
| ๐Ÿ’š Phil (MAF) | MAF 180 Method | Beginners, injury recovery, health-focused | 0-60km |

## Data Sources

| Platform | Auth | Data Types | Highlights |
|----------|------|------------|------------|
| **Strava** | OAuth 2.0 / Access Token | Activities, GPS, HR, Power, Cadence | Largest running community |
| **COROS** | Email + Password (MD5) | Activities, HR, HRV, Sleep, Training Load | **Push workouts to watch** |

### COROS MCP Integration

Hermes users can access COROS data via MCP protocol:

```yaml
# ~/.hermes/config.yaml
mcp_servers:
  coros:
    command: "npx"
    args: ["-y", "coros-mcp"]
    env:
      COROS_EMAIL: "your-email"
      COROS_PASSWORD: "your-password"
    allowed_tools:
      - "authenticate_coros"
      - "get_daily_metrics"
      - "list_activities"
      - "get_activity_detail"
      - "create_workout"  # Push to watch!
```

## Recommendation Decision Tree

```
Are you a beginner (< 1 year running)?
  โ†’ Coach Phil (MAF) โœ…

Are you recovering from injury?
  โ†’ Coach Phil (MAF) โœ…

Weekly mileage < 30km?
  โ†’ Coach Phil (MAF) or Coach Jack (reduced)

Weekly mileage 30-60km?
  โ†’ Coach Jack (VDOT) โœ… or Coach Hanson

Weekly mileage > 60km?
  โ†’ Coach Hanson โœ… or Coach Jack

Goal is 5K/10K?
  โ†’ Coach Jack (VDOT) โœ…

Goal is half-marathon?
  โ†’ Coach Jack (VDOT) โœ… or Coach Hanson

Goal is first marathon?
  โ†’ Coach Hanson โœ…

Goal is marathon PB?
  โ†’ Coach Hanson โœ… or Coach Jack

Pursuing health / no race goal?
  โ†’ Coach Phil (MAF) โœ…
```

## Training Safety

โš ๏ธ **Disclaimer**: This Skill provides training suggestions, not medical advice. Consult a doctor before starting any new training program, especially if you have heart disease, high blood pressure, diabetes, or other chronic conditions.

Built-in safety mechanisms:
- ACWR monitoring (Acute:Chronic Workload Ratio), warns when > 1.5
- Weekly volume increase capped at 10%
- Automatic low-intensity coach recommendation when injury history is present
- All high-intensity recommendations include warm-up and cool-down

## Interaction Examples

### First Use
```
User: I want to start running training
AI: Welcome! I'm your AI Running Coach ๐Ÿƒ
    Let me learn about you first:
    1. How many km do you run per week?
    2. What's your running goal? (health/5K/10K/half/full)
    3. Do you have a sports watch? (Strava/COROS/other)

User: 20km/week, half-marathon goal, COROS
AI: Great! Let me connect your COROS data and analyze...
    [Syncing data...]
    [Analysis complete]

    Based on your data, I recommend:
    1. Coach Jack (VDOT) โ€” Match score: 85
       Reason: Your volume and goal fit VDOT methodology perfectly
    2. Coach Hanson โ€” Match score: 72
    3. Coach Phil (MAF) โ€” Match score: 60

    Which coach would you like to choose?
```

### Daily Training
```
User: What should I train today?
AI: According to Coach Jack's plan, today's (Tuesday) workout is:
    ๐Ÿ”ด Interval: 5x1km @ 4:15/km
    Rest: 3min easy jog
    Warm-up: 15min easy run
    Cool-down: 10min easy run
    Estimated total: 55min
```

## Project Structure

```
running-coach/
โ”œโ”€โ”€ SKILL.md                    # Skill manifest (dual-platform)
โ”œโ”€โ”€ README.md                   # English docs
โ”œโ”€โ”€ README.zh.md                # Chinese docs
โ”œโ”€โ”€ LICENSE                     # Apache-2.0 License
โ”œโ”€โ”€ config.example.json         # Config template
โ”œโ”€โ”€ install.sh                  # Install script
โ”œโ”€โ”€ .github/                    # GitHub templates
โ”‚   โ””โ”€โ”€ ISSUE_TEMPLATE/
โ”œโ”€โ”€ references/                 # Knowledge base
โ”‚   โ”œโ”€โ”€ training_methods/
โ”‚   โ”‚   โ”œโ”€โ”€ daniels_vdot.md     # Daniels VDOT deep dive
โ”‚   โ”‚   โ”œโ”€โ”€ hansons.md          # Hansons Marathon Method
โ”‚   โ”‚   โ””โ”€โ”€ maf180.md           # MAF180 deep dive
โ”‚   โ””โ”€โ”€ coach_profiles.md       # Coach profiles summary
โ””โ”€โ”€ scripts/
    โ”œโ”€โ”€ data/                   # Data layer
    โ”‚   โ”œโ”€โ”€ base_adapter.py
    โ”‚   โ”œโ”€โ”€ strava_adapter.py
    โ”‚   โ”œโ”€โ”€ coros_adapter.py
    โ”‚   โ””โ”€โ”€ unified_model.py
    โ”œโ”€โ”€ coaches/                # Coach engines
    โ”‚   โ”œโ”€โ”€ base_coach.py
    โ”‚   โ”œโ”€โ”€ coach_daniels.py
    โ”‚   โ”œโ”€โ”€ coach_hanson.py
    โ”‚   โ””โ”€โ”€ coach_maf.py
    โ”œโ”€โ”€ engine/                 # Recommendation engine
    โ”‚   โ”œโ”€โ”€ analyzer.py
    โ”‚   โ”œโ”€โ”€ recommender.py
    โ”‚   โ””โ”€โ”€ plan_generator.py
    โ””โ”€โ”€ visualization/
        โ””โ”€โ”€ charts.py
```

## Roadmap

### V1 (Current) โ€” MVP
- [x] Strava data integration
- [x] 3 core coaches (Daniels / Hanson / MAF)
- [x] Basic recommendation engine
- [x] Weekly training plan generation
- [x] ACWR + overtraining detection
- [x] Training visualization charts

### V2 โ€” Multi-source + Expansion
- [ ] COROS MCP protocol integration
- [ ] Garmin Connect adapter
- [ ] 4 new coaches (Canova dual threshold / 80-20 / Lydiard / Polarized)
- [ ] Push training plans to watch
- [ ] Data persistence (SQLite)

### V3 โ€” Full Feature
- [ ] 10 coaches total
- [ ] Altitude training scenarios
- [ ] Social features (training sharing)
- [ ] Multi-language support
- [ ] Nutrition & recovery advice

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). We welcome:
- New coaches (polarized, Lydiard, Canova dual threshold, etc.)
- New data sources (Garmin, Apple Health, Suunto)
- Bug reports and feature requests
- Documentation improvements

## License

Apache License 2.0 โ€” see [LICENSE](LICENSE).
tools

Comments

Sign in to leave a comment

Loading comments...