convez.ai
SkillProdutividadeIntermediário
Yuvasee

Trainer: Coach de Fitness & Lifestyle

Yuvasee/trainer

Coach de fitness com histórico pessoal e recomendações determinísticas

Ver no GitHub
InicialPluginScore · de 0 a 100

Skill de coaching pessoal para fitness e estilo de vida que acompanha treino, nutrição, peso, sono, passos, recuperação e estresse. Usa ferramentas Python determinísticas para calcular métricas (BMR, TDEE, macros, tendências) e dá recomendações práticas baseadas no seu histórico pessoal. Funciona como camada sobre agentes como Claude Code, com memória durável em arquivos locais.

Instalação

$npx convez-ai Yuvasee/trainer

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
2
Forks
1
Acompanhando
0
Saúde
42%
Último commit
há 3 meses
Versão
—
Issues abertas
0
Contribuidores
2

Casos de uso

  • Acompanhar progresso de treino e nutrição com cálculos precisos
  • Receber recomendações contextualizadas baseadas em seu histórico
  • Manter accountability com logging append-only e relatórios automáticos

Veredito

Skill bem arquitetada que trata coaching como um loop determinístico: separa computação mecânica (Python) de orientação (modelo), usa arquivos para memória durável, e evita alucinações em aritmética. Ideal para quem quer rastreamento fitness rigoroso integrado a um agente Claude.

README

A tradução para o português deste README ainda está na fila.

trainer

A personal fitness & lifestyle coaching agent that holds an accounting of your training, nutrition, weight, sleep, steps, recovery and stress — and at any time tells you what to do right now to reach a target weight and shape, justified by your own logged history.

It is not a standalone app. It's a coaching harness layered on top of an agent like Claude Code: the agent is the loop; this self-contained skill supplies the four things a good agent needs around that loop — instructions, knowledge, deterministic tools, and durable memory. Everything ships under .claude/skills/trainer/, installs with npx skills add Yuvasee/trainer, and runs from any working directory. User data lives in ~/.trainer/ (override $TRAINER_HOME), kept out of the package.

Not medical advice. This is a fitness coach, not a clinician. It defers to qualified professionals for anything clinical and stops on red-flag symptoms.


How it works

              you ── "what should I do today?" / "logged 7h sleep" ──┐
                                                                     ▼
 ┌──────────────────────── the agent loop (Claude Code, …) ────────────────────┐
 │                                                                              │
 │  INSTRUCTIONS (the behavior)            KNOWLEDGE (cited, load-on-demand)     │
 │   SKILL.md   (coaching contract)         knowledge/INDEX.md → training.md     │
 │   intake.md  (interview flow)            nutrition.md recovery.md safety.md   │
 │   CLAUDE.md  (repo router → SKILL.md)                                         │
 │                                                                              │
 │  TOOLS (deterministic Python)           MEMORY (durable state, ~/.trainer/)   │
 │   tools/cli.py    (one dispatcher)       profile.md  goals.md  plan.md        │
 │   tools/log.py    (append + query)       log.jsonl   (append-only)            │
 │   tools/metrics.py (BMR/TDEE/macros/      today.md    (generated)             │
 │     trend/rate/projection)              templates/  (seed ~/.trainer on init) │
 │   tools/report.py (rollups + nudge)     routines/daily_nudge.md (stubbed)     │
 └──────────────────────────────────────────────────────────────────────────────┘

All of INSTRUCTIONS / KNOWLEDGE / TOOLS / templates ship under
`.claude/skills/trainer/`. The agent runs `tools/cli.py` from that directory;
durable state is written to `~/.trainer/` (set `$TRAINER_HOME` to relocate it).

Design principles

  • Mechanical computation, not model guessing. Every number (calories, macros, BMR/TDEE, weight trend, rate-of-change, projection) comes from tested Python — the model never does arithmetic.
  • State in files, not in chat. Everything the agent "remembers" lives in ~/.trainer/ as plain files, so it survives across sessions and stays out of the installed package.
  • Append-only history. Corrections are new events; log.jsonl is never rewritten (enforced in code).
  • Progressive disclosure. The agent reads a compact knowledge index and opens only the relevant cited reference just-in-time.
  • Advisory autonomy. It coaches and proposes; you act.

Install as a skill

The whole agent is a self-contained, distributable skill. Install it into any project (or your user-level skills) with:

npx skills add Yuvasee/trainer

That drops .claude/skills/trainer/ — the coaching contract, knowledge base, Python tools, and data templates — into place. It is agent-agnostic: it works the same under Claude Code, Codex, or any other agent that loads skills, because the tools are plain Python invoked through one dispatcher (tools/cli.py) that fixes up its own import path and runs from any working directory.

Data home. All durable state lives in ~/.trainer/ (override with $TRAINER_HOME) — never in the installed package or this repo. Create it from the bundled templates with one command (run from the skill directory):

python3 tools/cli.py init   # creates ~/.trainer/{profile,goals,plan}.md + log.jsonl

Quick start

  1. Install the skill (above) and open your project in your agent. The trainer skill auto-activates when you talk about training, food, weight, sleep, etc.
  2. Onboard. Say something like "let's set up" — the agent runs cli.py init to create ~/.trainer/, then the intake interview (.claude/skills/trainer/intake.md) fills profile.md and goals.md.
  3. Use it. Log things ("logged a 6 km easy run", "weighed 82.4 today") and ask "what should I do now?" — it reads your history, computes with the tools, and gives one concrete next action with the reasoning.

The data home seeds from empty templates; the files fill in as you use the agent.


The tools (CLI)

The tools are the agent's hands, but they're plain CLIs you can run yourself. There's one dispatcher, tools/cli.py; run it from the skill directory (the dir holding SKILL.md) — or by its absolute path, from any cwd — with Python 3.11+. Form: python3 tools/cli.py <log|metrics|report|init> ....

# one-time: create the data home from templates
python3 tools/cli.py init

# log an event (append-only, schema-validated)
python3 tools/cli.py log add weight --set kg=82.4
python3 tools/cli.py log add sleep  --set hours=7
python3 tools/cli.py log list --type weight --since 2026-06-01

# the numbers (Mifflin-St Jeor, EMA trend, safe-rate verdict, projection)
python3 tools/cli.py metrics --weight 80 --height 180 --age 30 --sex m \
    --activity active --target 75 --strategy cut targets
python3 tools/cli.py metrics rate          # observed rate of change + safety verdict
python3 tools/cli.py metrics projection    # time-to-goal from current trend

# reporting
python3 tools/cli.py report rollup --weeks 4   # weekly history summary
python3 tools/cli.py report today              # (re)generate ~/.trainer/today.md

All reads/writes default to ~/.trainer/ (override per-call with --log/--profile/--goals, or set $TRAINER_HOME). Event types and fields are defined in tools/schema.py (the single source of truth): weight, workout, meal, sleep, steps, recovery, note.

📖 Full tool & data-schema reference: REFERENCE.md — every CLI subcommand and flag, the complete event schema (required vs optional fields per type), the ~/.trainer/ file layout, and the design invariants.


Knowledge base

knowledge/ holds cited reference files the agent loads on demand:

FileCovers
training.mdprogressive overload, RPE/RIR, volume, splits, deloads, cardio, concurrent training
nutrition.mdenergy balance, BMR/TDEE, calorie/macro/protein targets, cut/recomp/lean-bulk
recovery.mdsleep, recovery markers, overtraining, stress, steps/NEAT
safety.mdsafe rate of change, RED-S/under-eating, red-flag symptoms, refer-out boundaries
INDEX.mdcompact map for progressive disclosure

Knowledge supplies the why and reference ranges; the numbers still come from the tools.


Development

python3 -m pytest          # 94 tests (paths configured in pyproject.toml)
ruff check .claude/skills/trainer/tools
pyright .claude/skills/trainer/tools

Tests, package source, ruff src, and pyright include all point at .claude/skills/trainer/tools via pyproject.toml, so the bare commands above work from the repo root. No runtime dependencies; dev tooling (pytest, ruff, pyright) is in pyproject.toml under optional-dependencies.dev.


Status & non-goals (MVP)

Working: onboarding, logging, the metrics/reporting engine, the coaching contract, and a stubbed daily-nudge routine.

Deliberately out of scope for this version: external nudge delivery (email/push), any server/API/database, and wearable integrations (Apple Health, Strava). Logging is manual. The proactive routine writes ~/.trainer/today.md only — it does not send anything.

Ver o original no GitHub

Bom para

Relacionados