terra-planned-workouts

Push structured workout templates to fitness devices via the Terra API Planned Workouts endpoints.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/tryterra/agent-skills --skill terra-planned-workouts-tryterra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terra-planned-workouts
Source: https://github.com/tryterra/agent-skills/tree/main/skills/terra-planned-workouts
Command: npx skills add https://github.com/tryterra/agent-skills --skill terra-planned-workouts-tryterra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building integrations that deliver structured workouts to users' fitness devices requires handling nine different providers (Garmin, COROS, Wahoo, Suunto, TrainingPeaks, Huawei, Zepp, Hevy, Apple), each with different feature support, operations, and quirks. This Skill gives an AI agent the endpoint reference, data model, and per-provider behavior needed to write correct Terra API Planned Workouts integration code. ## Core Features & Use Cases - Two-phase workflow guidance: Create a reusable workout template with POST /workouts, then schedule it per athlete with POST /workouts/{id}/plan?user_id=X, which applies athlete parameters (FTP, max HR, threshold values) and pushes to the device. - Data model and validation rules: Covers blocks, steps, completion conditions, and intensity targets (absolute, percentage, zone), including hard 400 rejections for out-of-range values and single-value restrictions on percentage targets. - Coercion warning handling: Explains how the API adapts payloads when a provider cannot represent a feature, with a full warning catalog and handling patterns (log, surface, ignore). - Provider compatibility matrices: Operations support, sport/target/completion support, and per-provider gotchas such as Zepp's 7-day sync window, Huawei's create-only running limitation, and COROS delete-and-recreate updates. - Use Case: A developer building a coaching app asks the agent to schedule a threshold-interval cycling workout personalized to each athlete's FTP; the agent produces the correct template and plan requests and anticipates coercion warnings on the target device. ## Quick Start Ask the agent to create a Terra API workout template for threshold intervals and schedule it to a user with a given FTP and planned date.

Frequently Asked Questions about terra-planned-workouts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I push a structured workout to a Garmin watch with the Terra API?

Create a workout template with POST /workouts to get a workout_id, then call POST /workouts/{id}/plan?user_id=X with a planned_date and any athlete parameters. The Terra API converts the template and pushes it to the user's connected Garmin device, returning a planned_workout_id and provider_workout_id.

How do athlete parameters like FTP personalize a workout template?

Templates use percentage-based targets such as power_percentage, and the plan request supplies the athlete's ftp, max_heart_rate, threshold_heart_rate, or threshold_speed. The Terra API converts percentages to absolute values linearly, so 95-100% with ftp 280 becomes 266-280 watts on the device.

Which providers support updating or deleting planned workouts?

Garmin, Wahoo, Suunto, TrainingPeaks, Zepp, Hevy, and Apple support updates; COROS updates by deleting and recreating, which changes the provider_workout_id. Huawei supports neither update nor delete on the device, and Hevy has no provider-side delete, so the workout remains in the user's account.

What are coercion warnings in the Terra API Planned Workouts response?

Coercion warnings are returned when a provider cannot represent a requested feature, such as an unsupported sport or target type. The workout is still created with adjusted values, and each warning includes a path and message describing what changed, so you can log, surface, or ignore them.

Why did my percentage target request fail with a 400 error?

Percentage targets like power_percentage and heart_rate_max_percentage reject a single value field at template creation. You must supply value_low and/or value_high instead, and sanity ranges such as heart rate 30-250 BPM or power 1-2000 W are enforced as hard 400 rejections.

Does deleting a workout template remove it from users' devices?

DELETE /workouts/{id} cascades: it removes every planned workout linked to that template from every user's device across all providers, then deletes the template, and this is irreversible. To unschedule one user only, use DELETE /plannedWorkouts/{id} instead.