TrainingPeaks CLI Skill for Openclaw

A Python-based CLI tool to pull real-time training data, workout details, and performance metrics from TrainingPeaks using cookie-based authentication.

rubengarciam
v1.0.1
Feb 4, 2026
4
2.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install trainingpeaks

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install trainingpeaks using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is TrainingPeaks CLI Skill?

The TrainingPeaks skill provides a seamless way for developers and athletes to interact with their endurance training data programmatically. By leveraging internal API access, this skill enables the retrieval of workout schedules, completed activities, and advanced physiological metrics like Training Stress Balance (TSB). It serves as a foundational component within the Openclaw Skills ecosystem for building AI-driven coaching assistants or custom fitness dashboards.

Designed with a focus on simplicity, the tool requires no external pip dependencies and utilizes the Python standard library. It allows users to bypass the need for official API keys by using a browser-based authentication cookie, making it accessible for personal automation and custom integrations. Whether you are tracking Chronic Training Load (CTL) or querying specific personal records for cycling and running, this skill provides the structured data needed for deep athletic analysis.

TrainingPeaks CLI Skill Use Cases

  • Automated retrieval of planned workouts for AI coaching agents.
  • Monitoring long-term fitness trends including CTL, ATL, and TSB.
  • Exporting personal records (PRs) for cycling power or running speed for external analysis.
  • Generating automated training summaries and progress reports using Openclaw Skills.
  • Programmatic auditing of workout completion status and coach commentary.

How TrainingPeaks CLI Skill Works

  1. The user authenticates by providing a valid session cookie extracted from a web browser.
  2. The skill exchanges this cookie for a temporary Bearer token and caches the athlete ID locally for future requests.
  3. CLI commands are used to query TrainingPeaks endpoints for specific data ranges or metric types.
  4. The tool handles rate limiting and token refreshing automatically to ensure stable communication with the API.
  5. Data is returned in either a human-readable table format or raw JSON for integration with other scripts or Openclaw Skills.

TrainingPeaks CLI Skill Setup

To initialize this skill from the Openclaw Skills library, follow these steps:

  1. Log in to TrainingPeaks in your browser.
  2. Open Browser DevTools (F12) → Application → Cookies and copy the value of Production_tpAuth.
  3. Authenticate the CLI tool:
python3 scripts/tp.py auth "<your_cookie_value>"
  1. Verify your status:
python3 scripts/tp.py auth-status

For headless environments, you can also use the environment variable:

export TP_AUTH_COOKIE="<your_cookie_value>"

TrainingPeaks CLI Skill Data Schema & Taxonomy

The skill manages its state and cached data within the ~/.trainingpeaks/ directory. The structure is organized as follows:

File Purpose
cookie Stores the persistent Production_tpAuth cookie with 0600 permissions.
token.json Stores the active OAuth Bearer token and its expiration time.
config.json Contains cached athlete metadata, including Athlete ID and account type.

All date-based queries use the YYYY-MM-DD format, and workout data includes specific fields for TSS (Training Stress Score), duration, and sport-specific metrics.

TrainingPeaks CLI Skill Advanced Features

  • Environment variable overrides for seamless CI/CD and automated script integration.
  • Support for over 20 unique Personal Record (PR) types across cycling and running sports.
  • Automatic token refresh logic that extends sessions using the stored authentication cookie.
  • Built-in rate limiting (150ms) to prevent IP blocking during bulk data retrieval.
  • Native JSON output mode for all commands, facilitating integration with other Openclaw Skills and data pipelines.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*