Workout Track
by @spideystreet
Log a strength training session and insert it into the life_db database. Use when the user shares their gym session, exercises, sets, reps, weights, RPE, res...
clawhub install workout-trackπ About This Skill
name: workout-track description: Log a strength training session and insert it into the life_db database. Use when the user shares their gym session, exercises, sets, reps, weights, RPE, rest times, session duration, feelings, or asks to record a workout. metadata: {"openclaw":{"requires":{"bins":["uv"]}}}
Workout Log
Parses strength training sessions from natural or structured input and inserts them into the sport schema of life_db.
Connection
Credentials are in ~/.openclaw/services/life-db/.env.
Workflow
1. Parse the user's message
Extract from free text or structured input:
| Field | Type | Notes |
|-------|------|-------|
| session_date | YYYY-MM-DD | Default: today |
| duration_min | int | Total session duration |
| feeling | 1β10 integer | Overall session feeling |
| notes | string | Optional β program name, injuries, etc. |
| exercises[] | array | One object per exercise |
Each exercise:
| Field | Type | Notes |
|-------|------|-------|
| exercise_name | string | Normalize consistently (e.g. "Bench Press", "Squat", "Romanian Deadlift") |
| sets | int | Number of working sets |
| reps | int | Reps per set (use average if varied) |
| weight_kg | float | Working weight β null for bodyweight exercises |
| rpe | float | Rate of perceived exertion (1β10), optional |
| rest_sec | int | Rest between sets in seconds, optional |
| order_in_session | int | Order as mentioned |
| notes | string | Optional β tempo, drop sets, supersets, etc. |
2. Confirm with the user
Show a summary before inserting:
π
{DD/MM/YYYY} Β· Muscu Β· {duration} min Β· Feeling {feeling}/10
β’ {Exercise 1} β {sets}Γ{reps} @ {weight} kg
β’ {Exercise 2} β {sets}Γ{reps} bodyweight
β’ β¦Save? (yes / no)
3. Insert
Only after confirmation, use the exec tool:
{
"tool": "exec",
"command": "bash -c 'set -a; source ~/.openclaw/services/life-db/.env; uv run --project ~/.openclaw {baseDir}/scripts/insert_workout.py '"
}
Replace with the minified JSON payload (no newlines, properly shell-escaped).
4. Confirm result
On OK β respond with exactly this format, nothing more:
β
Muscu Β· {duration} min Β· Feeling {feeling}/10 Β· #{session_id}
{comment}
{comment} rules β 1 line, max 60 chars, no emoji:
On ERROR β report the error as-is, do not retry without user input.
Examples
| User says | Parsed session | |-----------|---------------| | "Gym 1h feeling 8. Bench 4x10 80kg, Squat 4x8 100kg, Curl 3x12 15kg" | 3 exercises, 60 min, feeling 8/10 | | "45 min chest/shoulders. Bench press 5x5 90kg RPE 9, overhead press 4x8 40kg, lateral raises 3x15 10kg" | 3 exercises, 45 min, feeling asked | | "Quick session 30min: pull-ups 4x8 bodyweight, rows 4x10 60kg" | 2 exercises, 30 min, feeling asked |
π‘ Examples
| User says | Parsed session | |-----------|---------------| | "Gym 1h feeling 8. Bench 4x10 80kg, Squat 4x8 100kg, Curl 3x12 15kg" | 3 exercises, 60 min, feeling 8/10 | | "45 min chest/shoulders. Bench press 5x5 90kg RPE 9, overhead press 4x8 40kg, lateral raises 3x15 10kg" | 3 exercises, 45 min, feeling asked | | "Quick session 30min: pull-ups 4x8 bodyweight, rows 4x10 60kg" | 2 exercises, 30 min, feeling asked |