Pp strava

From mvanhorn/printing-press-library · View interactive version

Pp strava is an AI agent skill from the GitHub repository mvanhorn/printing-press-library. Every Strava feature, plus offline analytics — training load, power curves, zone time Trigger phrases: `strava training load`, `check my CTL ATL`, `power curve from Strava`, `sync my Strava activities`, `segment progression strava`, `use strava-pp-cli`, `run strava cli`.

How to use this skill

Skill file

<!-- GENERATED FILE — DO NOT EDIT.

This file is a verbatim mirror of library/productivity/strava/SKILL.md,

regenerated post-merge by tools/generate-skills/. Hand-edits here are

silently overwritten on the next regen. Edit the library/ source instead.

See the repository agent guide, section "Generated artifacts: registry.json, cli-skills/". -->

Strava — Printing Press CLI

Prerequisites: Install the CLI

This skill drives the strava-pp-cli binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:

  1. Install via the Printing Press installer. It defaults binaries to $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows:

```bash

npx -y @mvanhorn/printing-press-library install strava --cli-only

```

  1. Verify: strava-pp-cli --version
  2. Ensure the reported install directory is on $PATH for the agent/runtime that will invoke this skill.

If the npx install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer):

go install github.com/mvanhorn/printing-press-library/library/productivity/strava/cmd/strava-pp-cli@latest

If --version reports "command not found" after install, the runtime cannot see the binary directory on $PATH. Do not proceed with skill commands until verification succeeds.

When to Use This CLI

Use strava-pp-cli when an agent needs to query an athlete's historical training data, compute fitness metrics unavailable from the Strava web interface, manage activities in bulk, or build a training analysis pipeline. It is the right choice when the question involves aggregating across more than 5 activities, involves stream-level data (heart rate, power, GPS), or requires offline access to Strava data.

Unique Capabilities

These capabilities aren't available in any other tool for this API.

Local state that compounds

_Use this when an agent needs to assess whether an athlete is progressing on a target training segment over a season._

```bash

strava-pp-cli segments progress 229781 --json --select start_date,elapsed,avg_watts,delta_pr_seconds

```

_Use when an agent needs to assess an athlete's fitness/fatigue state and readiness for an upcoming event._

```bash

strava-pp-cli training load --weeks 12 --ftp 285 --agent

```

_Use when evaluating whether a training block was executed as prescribed (polarized, sweet-spot, base)._

```bash

strava-pp-cli training zones --weeks 8 --type Run --zone-type heartrate --agent

```

_Use when an agent needs to characterize a cyclist's physiological profile or compare peak power across training blocks._

```bash

strava-pp-cli athlete power-curve --since 2025-01-01 --weight 75 --agent

```

_Use when an agent needs to identify which long runs or rides showed aerobic decoupling, indicating the athlete was above their aerobic threshold._

```bash

strava-pp-cli activities drift --min-duration 45m --since 2025-01-01 --threshold 5 --agent

```

_Use when an agent needs to surface the most achievable KOM targets for a training plan or pre-ride goal setting._

```bash

strava-pp-cli segments kom-gap --top 10 --agent

```

Agent-native plumbing

_Use when an agent needs to mass-migrate a gear assignment after equipment replacement or retroactively organize a training block's activities._

```bash

strava-pp-cli activities bulk-update --type Ride --after 2024-01-01 --set-gear b12345678 --dry-run

```

_Use when an agent needs to check whether any gear is approaching retirement before an important race._

```bash

strava-pp-cli gear status --threshold shoes=500mi --agent

```

Command Reference

activities — Manage activities

athlete — Manage athlete

athletes — Manage athletes

clubs — Manage clubs

gear — Manage gear

routes — Manage routes

segment-efforts — Manage segment efforts

segments — Manage segments

uploads — Manage uploads

Finding the right command

When you know what you want to do but not which command does it, ask the CLI directly:

strava-pp-cli which "<capability in your own words>"

which resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code 0 means at least one match; exit code 2 means no confident match — fall back to --help or use a narrower query.

Recipes

Check training readiness before a race

strava-pp-cli training load --weeks 8 --ftp 285 --agent --select ctl,atl,tsb,label

Shows TSB (freshness) for each of the past 8 weeks; negative TSB = fatigue, positive = fresh. Ideal for race week targeting TSB > 10.

Find your best power efforts this year

strava-pp-cli athlete power-curve --since 2025-01-01 --weight 72 --agent --select duration,watts,wkg

Returns best mean power per standard window normalized to W/kg — share with a coach for physiological profiling.

Identify aerobically decoupled long runs

strava-pp-cli activities drift --type Run --min-duration 60m --threshold 8 --agent --select id,name,start_date,drift_pct

Lists all runs where HR drifted more than 8% relative to pace in the second half — these are training days where you went too hard.

See your segment progression this season

strava-pp-cli segments progress 229781 --since 2025-01-01 --agent --select start_date,elapsed,avg_watts,delta_pr_seconds

Shows every effort on segment 229781, ordered by date, with delta from your PR so you can see the trend clearly.

Check gear retirement status before a marathon

strava-pp-cli gear status --threshold run_shoes=400 --agent --select gear_name,total_distance_mi,pct_threshold,est_retirement_date

Shows all running gear with mileage and estimated retirement date; use --select to narrow to the fields a race-day checklist needs.

Auth Setup

Strava uses OAuth2. Run strava-pp-cli auth login to open the browser authorization page — the CLI handles the local callback, token exchange, and storage automatically. Set STRAVA_CLIENT_ID and STRAVA_CLIENT_SECRET before running. To re-authenticate, run auth login again.

Run strava-pp-cli doctor to verify setup.

Agent Mode

Add --agent to any command. Expands to: --json --compact --no-input --no-color --yes.

```bash

strava-pp-cli activities create-activity --name example-resource --agent --select id,name,status

```

Response envelope

Commands that read from the local store or the API wrap output in a provenance envelope:

{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}

Parse .results for data and .meta.source to know whether it's live or local. A human-readable N results (live) summary is printed to stderr only when stdout is a terminal AND no machine-format flag (--json, --csv, --compact, --quiet, --plain, --select) is set — piped/agent consumers and explicit-format runs get pure JSON on stdout.

Agent Feedback

When you (or the agent) notice something off about this CLI, record it:

strava-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
strava-pp-cli feedback --stdin < notes.txt
strava-pp-cli feedback list --json --limit 10

Entries are stored locally at ~/.strava-pp-cli/feedback.jsonl. They are never POSTed unless STRAVA_FEEDBACK_ENDPOINT is set AND either --send is passed or STRAVA_FEEDBACK_AUTO_SEND=true. Default behavior is local-only.

Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.

Output Delivery

Every command accepts --deliver <sink>. The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:

| Sink | Effect |

|------|--------|

| stdout | Default; write to stdout only |

| file:<path> | Atomically write output to <path> (tmp + rename) |

| webhook:<url> | POST the output body to the URL (application/json or application/x-ndjson when --compact) |

Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.

Named Profiles

A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.

strava-pp-cli profile save briefing --json
strava-pp-cli --profile briefing activities create-activity --name example-resource
strava-pp-cli profile list --json
strava-pp-cli profile show briefing
strava-pp-cli profile delete briefing --yes

Explicit flags always win over profile values; profile values win over defaults. agent-context lists all available profiles under available_profiles so introspecting agents discover them at runtime.

Exit Codes

| Code | Meaning |

|------|---------|

| 0 | Success |

| 2 | Usage error (wrong arguments) |

| 3 | Resource not found |

| 4 | Authentication required |

| 5 | API error (upstream issue) |

| 7 | Rate limited (wait and retry) |

| 10 | Config error |

Argument Parsing

Parse $ARGUMENTS:

  1. Empty, help, or --help → show strava-pp-cli --help output
  2. Starts with install → ends with mcp → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with --agent)

MCP Server Installation

Install the MCP binary from this CLI's published public-library entry or pre-built release, then register it:

claude mcp add strava-pp-mcp -- strava-pp-mcp

Verify: claude mcp list

Direct Use

  1. Check if installed: which strava-pp-cli

If not found, offer to install (see Prerequisites at the top of this skill).

  1. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  2. Execute with the --agent flag:

```bash

strava-pp-cli <command> [subcommand] [args] --agent

```

  1. If ambiguous, drill into subcommand help: strava-pp-cli <command> --help.
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.