mcpField
W
workout-tracker

workout-tracker

github.com/marswangyangOther1209 installsUpdated 39w ago
Repository

About workout-tracker

Workout Tracker is a skill for logging fitness activities to a local SQLite database and viewing past performance. It can infer rest time from previous sessions and identify gym equipment from images to suggest exercises.

Key features

  1. 01Log exercise details to SQLite
  2. 02View workout history
  3. 03Fill rest time from past sessions
  4. 04Recognize equipment in images
  5. 05Generate image-based reports

Use cases

  1. 01Record sets, reps, and weight after training
  2. 02Review progress for a selected exercise
  3. 03Log a workout after identifying equipment
  4. 04Share a mobile-oriented workout report

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/marswangyang/workout-tracker --skill workout-tracker

After installing, type/workout-trackerin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

LICENSE
.gitignore
README.md
_meta.json
scripts/
pyproject.toml
log.py
render.py
models.py
main.py
report.py

Details

From the project README

Workout Tracker

A skill to log and track fitness activities using a local SQLite database.

Capabilities

  1. Log Workout: Record exercise details.
  2. View History: See past performance.
  3. Smart Rest Time: Auto-fills rest time based on previous sessions if not provided.
  4. Visual Recognition: Can identify gym equipment from images to suggest exercises.

Usage

1. Logging a Workout

When the user says "I did 5 sets of Bench Press at 60kg for 8 reps", parse the details and run:

cd skills/workout-tracker/scripts && uv run log.py \
  --exercise "Bench Press" \
  --weight 60 \
  --unit kg \
  --sets 5 \
  --reps 8 \
  --body_part "Chest" \
  --rest_time 90  # Optional: User provided or leave empty to auto-fill
  --notes "Optional notes"

Parameters:

  • --exercise (Required): Name of the movement.
  • --body_part: (New) Target muscle group (e.g. Chest, Back, Legs). INFER THIS from the exercise if not provided (e.g. Bench -> Chest).
  • --weight (Required): Weight value.
  • --unit: 'kg' or 'lb' (default kg).
  • --sets: Number of sets.
  • --reps: Reps per set.
  • --rest_time: Seconds. OMIT THIS if the user didn't specify. The script will auto-fill from history.
2. Viewing History

When the user asks "How is my Squat progress?" or "Show last workouts":

cd skills/workout-tracker/scripts && uv run render.py --exercise "Squat"

Then send the generated image: message(action="send", filePath="/tmp/workout_report.png", message="Here is your report:")

3. Image Recognition (Vision)

If the user uploads an image (e.g., of a machine):

  1. Analyze the image using your vision capabilities.
  2. Identify the equipment (e.g., "Leg Press Machine", "Dumbbells").
  3. Ask the user: "This looks like a Leg Press. Do you want to log a set? How much weight?"
  4. Once they reply, use the log.py script as usual.

Design & Behavior Rules (User Preferences)

1. User Profile
  • Type: General User (Casual).
  • Interaction: Use natural language. Automatically infer the body_part from the exercise name (e.g., "Bench Press" -> "Chest") without asking, unless ambiguous.
2. Display Format (Mobile Portrait)
  • Preferred Output: Always generate an Image for reports using render.py.
  • Style: Vertical (Portrait) aspect ratio optimized for mobile screens.
  • Layout:
    • Narrow width (figsize width ~6).
    • Wrap long text in "Notes" column.
    • Hide "Exercise" column if filtering by a single exercise (title context is enough).
    • Sort chronologically (Oldest -> Newest) within the day/session.
3. Logging Logic
  • Drop Sets: Must be logged as separate rows for data accuracy.
    • Rest Time: Set to 0 between drop set segments.
    • Notes: Mark as "Drop set part X/Y" for clarity.
  • Units: User prefers lb (pounds).

Database

Data is stored in skills/workout-tracker/workout.db (SQLite). The schema includes date, exercise, weight, unit, sets, reps, rest_time, notes.

Technical Setup (Maintenance)

This skill uses uv for Python package management.

Installation
  1. Ensure uv is installed: brew install uv
  2. Sync dependencies:
    cd skills/workout-tracker/scripts
    uv sync
    
Database Schema (SQLModel)

The SQLite database (workout.db) uses the following schema:

  • id: Integer (PK)
  • date: ISO8601 String
  • exercise: String
  • body_part: String (Target muscle group)
  • weight: Float
  • unit: String (default "kg")
  • sets: Integer
  • reps: Integer
  • rest_time: Integer (Seconds, optional)
  • notes: String (Optional)

Comments

Markdown supported