360 Secure SkillHub
360 安全技能中心

Peloton Stats

该 Skill 使用 Python 标准库脚本连接 Peloton API,读取账号凭据后拉取最近 7 天的骑行课程,统计总骑行次数、时长、卡路里、输出、平均功率、阻力和踏频,并生成含近期骑行表格的 Markdown 报告;仅支持骑行课程。

niemesrw
niemesrw
热度 76.01
最近更新 2026-05-11 17:26:18
分类:生活依赖:代码执行 / 第三方 API / 读写文件应用场景:健康 / 报告撰写 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add peloton-stats
Metadata
name
peloton-stats
description
Fetch and report Peloton cycling workout statistics. Use when the user wants to see their Peloton workout data, weekly cycling stats, ride history, or performance metrics. Hits the Peloton API directly (no dependencies) to pull total rides, duration, calories, output/power, and instructor data for cycling workouts.
user-invocable
true
metadata
{"openclaw":{"requires":{"env":["PELOTON_USERNAME","PELOTON_PASSWORD"],"config":["~/.openclaw/agents/main/agent/auth-profiles.json"]},"primaryEnv":"PELOTON_USERNAME","emoji":"🚴"}}

Peloton Stats

Fetch weekly cycling stats directly from the Peloton API. Zero dependencies — uses only Python stdlib.

Setup

Store your Peloton credentials securely using OpenClaw's credential manager:

openclaw config set auth.profiles.peloton:default.type api_key
openclaw config set auth.profiles.peloton:default.provider peloton
openclaw config set auth.profiles.peloton:default.username "your-email@example.com"
openclaw config set auth.profiles.peloton:default.password "your-password"

Or edit ~/.openclaw/agents/main/agent/auth-profiles.json directly:

{
  "profiles": {
    "peloton:default": {
      "type": "api_key",
      "provider": "peloton",
      "username": "your-email@example.com",
      "password": "your-password"
    }
  }
}

Usage

Weekly Report

python3 ~/.openclaw/skills/peloton-stats/scripts/fetch_stats.py

Outputs markdown with:

  • Total rides this week
  • Total duration, calories, output (kJ)
  • Average power (watts), resistance (%), cadence (RPM)
  • Recent rides table (date, class, instructor, metrics)

Data Retrieved

Metric Description
Total Rides Number of cycling workouts in last 7 days
Duration Total minutes ridden
Calories Total calories burned
Output Total energy in kilojoules (kJ)
Avg Power Average watts across all rides
Avg Resistance Average resistance %
Avg Cadence Average RPM

Notes

  • Only fetches cycling workouts (not running, strength, yoga, etc.)
  • Looks back 7 days from runtime
  • Requires active Peloton subscription
  • Uses the unofficial Peloton API at api.onepeloton.com