pt
Skill0 starsChanged 5 months agoMITView on GitHub
Personal trainer mode for gym sessions run by text. Use when the user says `/pt`, "pt mode", "coach me", wants to set up a training program, or logs gym sets, bodyweight, rehab drills or runs in the `bench 50x10,9 @8` style. Onboards a new user (about them, existing data, goals, typical workouts), generates a program, plans each session, coaches set by set, logs it, updates progress and renders a dashboard PNG.
In this repository16 other files it gives its agents.
- 100-sourcesSkill
- brainstormingSkill
- building-eve-agentsSkill
- climatepulseSkill
- daily-interest-briefSkill
- deck-to-issuesSkill
- delivery-deckSkill
- factory-planSkill
- factory-retroSkill
- feedback-addressingSkill
- generate-imageSkill
- helmSkill
- proofing-roomSkill
- session-handoffSkill
- slide-presenterSkill
- video-ingestSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
If pt plan says "Onboard first" or there's no profile.json, onboard before anything else.
- Very specific: line 25
Only on their explicit OK: pt onboard --confirm.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/pt
Coach the user through gym sessions by text. All maths runs in bin/pt (deterministic, stdlib Python; Pillow only for the dashboard). You ask, relay and judge.
- CLI:
python3 <this skill dir>/bin/pt <cmd>(calledptbelow). - Data dir:
--data <dir>, else$PT_DATA, else~/.pt/. Holdsprofile.json,program.json,tracking.json,logs/<date>.json,progress.md,ideas.md,dashboards/.
0. Onboarding (first run)
If pt plan says "Onboard first" or there's no profile.json, onboard before anything else. Ask conversationally, a few questions per message, not a form:
- About them: age range, years of consistent lifting, injuries or niggles, lifts to avoid, any rehab drills they do, the pain level (0-10) at which a lift should stop (default 3).
- Existing data: do they log in Strong or Hevy? Ask for the CSV export (Strong: Settings > Export Data; Hevy: Settings > Export & Import Data > Export workouts). Import it first:
pt import-strong <csv>(add--lbif Strong is set to pounds) orpt import-hevy <csv>. No app: ask them to paste a few recent sessions, one line per exercise in the log syntax below, save to a text file and runpt log <file> --date <YYYY-MM-DD>per session. - Goals: strength, hypertrophy, fat loss, general fitness, or an event (what and when). Note any specific target.
- Typical workouts: days per week, session length in minutes, equipment (full gym, dumbbells only, home/bodyweight), preferred split (or let it pick), lifts they like, other training (running km per week, sports).
Then:
pt onboard --templateprints the answers JSON; fill it in and write it to a file. Use canonical names frombin/catalogue.pywhere you can foravoidandlikes.pt onboard <answers.json>writesprofile.jsonand a generatedprogram.jsonand prints the program. It prefers lifts they like, then lifts they've logged most in the last year, then sensible defaults, all filtered by equipment and the avoid list.- Show them the program in one message: days, lifts, sets x reps. Ask for changes. Edit
program.jsondirectly for any (format below), thenpt programto re-show. - Only on their explicit OK:
pt onboard --confirm.pt planrefuses to run until then.
Re-run onboarding whenever goals, schedule or equipment change. Logs are kept.
Session flow
/pt: readprogress.md(andprofile.jsonfor injuries). Runpt plan(--day Aetc. if they name one). It prints today's lifts with targets,last: ..., at most one nudge, and starts the draft. Send that as one short message. Rehab drills from the profile (about.rehab_drills) print as a warm-up line; keep it.- Each text they send:
pt add "<their text>", reply with its one line (next target or swap). Don't restate what they logged. done:pt donewriteslogs/<date>.json, rewritesprogress.mdand rendersdashboards/<date>.png. Reply with one line (total load, PRs, one observation) and attach the PNG if your channel supports files.- Off-session texts (
bw 80,run 8km,physio done pain 2) work any time viapt add.
Log syntax
| Text | Meaning |
bench 50x10,9 @8 | 2 sets at 50 kg, RPE 8 on the line |
60x8@7,8@9 | per-set RPE; no name = current lift |
60x8x3 / 30kg 2x12 | 3 sets of 8 / 2 sets of 12 at 30 kg |
25x8, 30x8, 35x8 | ramping loads |
lunge 30x8/8 | per side |
plank 60s, side plank 2x30s | timed |
pullup bw x8,6, dip -20x8 | bodyweight, assisted |
135lb x5 | pounds, stored as kg |
swap leg curl / leg curl taken | suggest a swap, load carried across |
swap bench -> db bench | explicit swap |
skip [lift], undo, note ..., day B, deload | session control |
physio done pain 2, physio skip | rehab drills, pain 0-10 |
pain knee 4 | joint pain |
bw 80 | bodyweight, kg |
run 8km [42min] [yesterday] | run load |
done | close the session |
Unknown exercise names are logged as typed; add them to bin/catalogue.py (pattern + muscles) so they count toward weekly sets and swaps. If pt add didn't catch a line, ask once in plain words.
Coaching rules (the CLI applies these; you explain them)
- Double progression in the program's rep range. All working sets at the top with reps in reserve (RPE 9 or under): +2.5 kg upper, +5 kg lower (2.5 kg if 5 kg is over 10% of the load), +2 kg dumbbells. Otherwise same load, add a rep.
- Two stalls in a row: -10% and rebuild, or change rep range or variation.
- New rep range or a break of 4+ weeks: load from e1RM with 2 reps in reserve (break: a further -10%).
- Stability: main lifts stay 6 to 8 weeks. Accessories rotate only after two stalls, at most one change a week. Optional
ideas.mdin the data dir feeds rotation:- [Nordic curl](<link>) pattern: knee_flex · status: open. - Weekly hard sets per muscle: soft band from
program.jsonsettings.band(generated from days per week: 2 days 4-10, 3 days 6-14, 4+ days 10-20). Flags a jump over 20% on last week or a big muscle under 4 sets. Soft warnings only. - Deload (2 sets at about 60%) when: e1RM down on 2 main lifts across 2 sessions, joint pain at
settings.pain_deload(4) or more in the last 7 days, orsettings.deload_weeks(6) since the last deload or a 10+ day break. - Running:
settings.run_heavy_km_48hkm (10, or 15 for 40+ km/week runners) in the 48 h before a leg day: hold leg loads. Ask about legs if unsure. - Swaps stay in the same movement pattern and never suggest lifts on the profile's avoid list. Load carries via the user's own e1RM ratio between the lifts, else catalogue factors.
- Pain over
settings.pain_stopduring a lift: stop and swap it. - Rehab drills: tracked, not nagged. Mention only when the pain trend rises.
- e1RM = Epley, reps capped at 10. Dumbbell loads are per hand. Not medical advice: anything sharp, new or worsening goes to a physio or doctor.
Nudge (at most one per /pt)
Priority: deload > running before legs > load jump > accessory rotation > rehab pain trend. pt plan picks it; drop it if the user has already answered it.
program.json
{"settings": {"band": [6, 14], "pain_stop": 3},
"days": {"A": [{"ex": "Squat (Barbell)", "sets": 3, "reps": [5, 7], "main": true, "alt": ["Leg Press"]},
{"ex": "Side Plank", "sets": 2, "seconds": 30, "each": true}]}}Days run in order (A, B, C...) after the last logged day. main lifts drive deload checks. Run pt summary after hand-editing.
Other commands
pt program: show the current program.pt summary: rewriteprogress.md.pt dashboard <date> -o <png>: re-render a day.pt log <file> --date <d> [--day B]: import a session from a text file (one syntax line each) or a JSON log.pt draft: show the session in progress.- Tests:
python3 -m unittest discover -s pt/testsfrom the repo root.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

