# Send TrainingPeaks to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "trainingpeaks",
    "name": "TrainingPeaks",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/rubengarciam/trainingpeaks",
    "canonicalUrl": "https://clawhub.ai/rubengarciam/trainingpeaks",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/trainingpeaks",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=trainingpeaks",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "scripts/tp.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/trainingpeaks"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/trainingpeaks",
    "downloadUrl": "https://openagent3.xyz/downloads/trainingpeaks",
    "agentUrl": "https://openagent3.xyz/skills/trainingpeaks/agent",
    "manifestUrl": "https://openagent3.xyz/skills/trainingpeaks/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/trainingpeaks/agent.md"
  }
}
```
## Documentation

### TrainingPeaks Skill

CLI access to the TrainingPeaks internal API. Pure Python stdlib — no pip dependencies.

### Setup: Getting Your Auth Cookie

Log in to TrainingPeaks in your browser
Open DevTools → Application → Cookies → app.trainingpeaks.com
Find the cookie named Production_tpAuth
Copy its value (long encoded string)

Then authenticate:

python3 scripts/tp.py auth "<paste_cookie_value_here>"

Or set the environment variable (useful for CI/scripts):

export TP_AUTH_COOKIE="<cookie_value>"

Credentials are stored in ~/.trainingpeaks/ with 0600 permissions.

### auth <cookie> — Authenticate

Store and validate a Production_tpAuth cookie. Exchanges it for a Bearer token and caches the athlete ID.

python3 scripts/tp.py auth "eyJhbGci..."
# ✓ Authenticated successfully!
#   Account: user@example.com
#   Athlete ID: 12345
#   Token expires in: 60 minutes

### auth-status — Check Authentication

python3 scripts/tp.py auth-status
# Cookie: stored (file)
# Token: valid (42m remaining)
# Athlete ID: 12345
# ✓ Ready

### profile [--json] — Athlete Profile

python3 scripts/tp.py profile
# Profile
# ════════════════════════════════════════
#   Name:        Ruben Example
#   Email:       ruben@example.com
#   Athlete ID:  12345
#   Account:     Premium
#   Bike FTP:    280 W

### workouts <start> <end> [--filter all|planned|completed] [--json]

List workouts in a date range (max 90 days).

# All workouts this week
python3 scripts/tp.py workouts 2026-01-26 2026-02-01

# Only completed workouts
python3 scripts/tp.py workouts 2026-01-01 2026-01-31 --filter completed

# Raw JSON for scripting
python3 scripts/tp.py workouts 2026-01-26 2026-02-01 --json

Output columns: Date, Title, Sport, Status (✓/○), Planned duration, Actual duration, TSS, Distance.

### workout <id> [--json] — Workout Detail

Get full details for a single workout including description, coach comments, and all metrics.

python3 scripts/tp.py workout 123456789
# Workout: Tempo Intervals 3x10min
# ══════════════════════════════════════════════════
#   Date:         2026-01-28
#   Sport:        Bike
#   Status:       Completed ✓
#   ...

### fitness [--days 90] [--json] — CTL/ATL/TSB

Get fitness (CTL), fatigue (ATL), and form (TSB) data.

# Last 90 days (default)
python3 scripts/tp.py fitness

# Full season
python3 scripts/tp.py fitness --days 365

# JSON for charts
python3 scripts/tp.py fitness --json

Shows a summary with current CTL/ATL/TSB and status interpretation, plus a 14-day daily table.

### peaks <sport> <pr_type> [--days 3650] [--json] — Personal Records

Get ranked personal records by sport and metric.

# Best 20-minute power (all time)
python3 scripts/tp.py peaks Bike power20min

# 5K running PRs from last year
python3 scripts/tp.py peaks Run speed5K --days 365

# 5-second max power
python3 scripts/tp.py peaks Bike power5sec

Valid PR types:

SportTypesBikepower5sec, power1min, power5min, power10min, power20min, power60min, power90min, hR5sec, hR1min, hR5min, hR10min, hR20min, hR60min, hR90minRunhR5sec–hR90min, speed400Meter, speed800Meter, speed1K, speed1Mi, speed5K, speed5Mi, speed10K, speed10Mi, speedHalfMarathon, speedMarathon, speed50K

### Token Management

Bearer tokens are cached in ~/.trainingpeaks/token.json
Tokens expire in ~1 hour; auto-refreshed from stored cookie
Cookie lasts weeks; stored in ~/.trainingpeaks/cookie
If the cookie expires, you'll get a clear error to re-authenticate

### File Locations

FilePurpose~/.trainingpeaks/cookieStored Production_tpAuth cookie~/.trainingpeaks/token.jsonCached OAuth Bearer token + expiry~/.trainingpeaks/config.jsonCached athlete ID and account info

### Notes

All dates use YYYY-MM-DD format
Maximum workout query range: 90 days
Rate limiting: 150ms minimum between API requests
TP_AUTH_COOKIE environment variable overrides stored cookie
Default output is human-readable; --json gives raw API responses
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: rubengarciam
- Version: 1.0.1
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/trainingpeaks)
- [Send to Agent page](https://openagent3.xyz/skills/trainingpeaks/agent)
- [JSON manifest](https://openagent3.xyz/skills/trainingpeaks/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/trainingpeaks/agent.md)
- [Download page](https://openagent3.xyz/downloads/trainingpeaks)