AgentSkillsCN

hevy

在 Hevy 健身应用中创建训练计划。通过 CLI 将训练方案(文本/PDF/图片)转换为 Hevy JSON 格式。查询运动 ID,构建训练计划 JSON,再通过 API 创建。 适用场景:创建健身房训练计划、导入训练方案、查询运动 ID、构建训练 JSON、转换各类训练方案(PPL、5x5、531、GZCLP、nSuns、Starting Strength、PHUL、PHAT、上半身/下半身、全身训练),同步至 Hevy,或执行任何 Hevy API 任务。 关键词:健身应用、训练追踪器、训练计划生成器、健身房训练方案、力量训练、肌肥大、运动数据库、训练日志、举重、健美 用户可调用:/hevy

SKILL.md
--- frontmatter
name: hevy
description: |
  Create workout routines in Hevy fitness app. Converts training programs (text/PDF/image)
  to Hevy JSON format via CLI. Look up exercise IDs, build routine JSON, create via API.

  Use when: creating gym routines, importing workout plans, looking up exercise IDs,
  building workout JSON, converting programs (PPL, 5x5, 531, GZCLP, nSuns, Starting Strength,
  PHUL, PHAT, Upper/Lower, Full Body), syncing to Hevy, or any Hevy API task.

  Keywords: fitness app, workout tracker, routine builder, gym program, strength training,
  hypertrophy, exercise database, training log, weightlifting, bodybuilding

  User-invocable: /hevy

Hevy Routine Creator

Quick Start

bash
<skill-dir>/bin/hevy auth <key>           # Authenticate (get key from hevy.com/settings)
<skill-dir>/bin/hevy exercises search "squat"
<skill-dir>/bin/hevy routines template > routine.json
# Edit routine.json
<skill-dir>/bin/hevy routines create routine.json

For all commands: <skill-dir>/bin/hevy --help

Workflow

  1. Parse workout plan - extract exercises, sets, reps, weights, rest times
  2. Look up exercise IDs - hevy exercises search <name>
  3. Build routine JSON - start with hevy routines template
  4. Create routine - hevy routines create file.json

Critical Rules

  • NEVER use @ in notes (causes silent 400 errors)
  • ALWAYS wrap: {"routine": {...}} not bare object
  • ALWAYS match set properties to exercise type:
    • weight_reps → weight_kg, reps
    • reps_only → reps only (NO weight!)
    • duration → duration_seconds
    • distance_duration → distance_meters, duration_seconds
  • NEVER guess IDs - always hevy exercises search

Exercise Type Decision

User describes...Exercise TypeSet Properties
Weight + reps ("3x10 @ 135lb")weight_repsweight_kg, reps
Just reps ("3x12 pull-ups")reps_onlyreps only
Time hold ("60s plank")durationduration_seconds
Distance + time ("500m row")distance_durationdistance_meters, duration_seconds

When unsure: hevy exercises get <id> shows the exercise type.

Interpreting Workout Plans

Supersets:

  • "A1/A2", "superset", "paired" → same superset_id (integers: 0, 1, 2...)
  • "Circuit" or "EMOM" → all exercises share one superset_id
  • Separate exercises → superset_id: null

Rest: Goes on LAST exercise of superset only

AMRAP/Max effort: Use "reps": null

Example superset structure:

json
{
  "exercise_template_id": "79D0BB3A",
  "superset_id": 0,
  "rest_seconds": null,
  "sets": [{"type": "normal", "weight_kg": 80, "reps": 10}]
},
{
  "exercise_template_id": "1B2B1E7C",
  "superset_id": 0,
  "rest_seconds": 90,
  "sets": [{"type": "normal", "reps": 8}]
}

Common Exercise IDs

Use hevy exercises search for current IDs. These are reference examples:

ExerciseIDType
Squat (Barbell)D04AC939weight_reps
Deadlift (Barbell)C6272009weight_reps
Bench Press (Barbell)79D0BB3Aweight_reps
Overhead Press (Barbell)AE23FF09weight_reps
Pull Up1B2B1E7Creps_only
Push Up392887AAreps_only
Rowing Machine0222DB42distance_duration
Stretching527DA061duration

Before Creating Custom Exercises

  1. Search partial names ("row" not "cable row")
  2. Check equipment variants (Barbell, Dumbbell, Cable, Machine)
  3. Try alternate names ("Skull Crushers" = "Lying Tricep Extension")

Unit Conversion

User provides lbs → convert to kg: weight_kg = lbs / 2.205

Round to nearest 0.5 kg for practical loading.

Handling Search Results

ScenarioAction
Exact matchUse that ID
Multiple similar (e.g., "Squat" returns Barbell, Dumbbell, Smith)Pick equipment variant matching user's context
No resultsTry shorter term ("tricep" not "tricep pushdown cable")
Still nothingCreate custom exercise only as last resort

Bulk Import Strategy

For programs with 10+ routines:

  1. Build all JSON files first
  2. Create one routine, verify it appears correctly in app
  3. Create remaining with 2-second delays between calls
  4. If 429 error: wait 60s, resume from failed routine

Troubleshooting

ProblemCauseFix
HTML response@ in notesReplace with "at"
Exercise not foundTypoSearch partial name
401 UnauthorizedBad API keyhevy auth test
429 Rate limitToo many requestsWait 60s, then retry
400 Bad RequestWrong set properties for exercise typeCheck exercise type with hevy exercises get <id>
Field not allowedRead-only field in updateRemove id, created_at, updated_at fields
Sets rejectedweight_kg on reps_only exerciseRemove weight, use only reps

CLI vs This File

NeedUse
Exact command syntax, all flagshevy <command> --help
Workflow, gotchas, interpretation rulesThis file
Exploring all capabilitieshevy --help