← ClaudeAtlas

endurance-coach-build-and-envlisted

Load when standing up the Endurance Coach from a fresh clone, or when the local toolchain / accounts won't come up. Triggers: "set up from scratch", "fresh clone won't build", "how do I get this running", "npm install fails", Node / tsx / TypeScript / ESM / "Node16 module resolution" errors, "typecheck fails", "npm test fails on a clean checkout", "npm audit" / esbuild advisory, connecting AI Endurance (`npm run auth:aie`, OAuth, `localhost:8765/callback`, "token cache", "aie-tokens.json", "can't do OAuth headless / on a cloud box / in a sandbox / no browser"), enabling Garmin (`garmin-mcp-auth`, uvx, Python 3.12, the pinned `Taxuspt/garmin_mcp@d31de79` commit, "6-month token expired", "download_activity_file missing"), the Claude desktop-app MCP breaking after a Homebrew node upgrade (`No such file or directory`, pinned Cellar path), ANTHROPIC_API_KEY setup, and "just show me the app" (`npm run demo`, no account/key). Do NOT load for: running/serving/deploying the dashboard or `npm run ship` (use endurance-c
maxeskell/personal-training-app · ★ 0 · AI & Automation · score 70
Install: claude install-skill maxeskell/personal-training-app
# endurance-coach-build-and-env **Use this when** you are bringing the coach up from zero — cloning, installing, getting `typecheck + test` green, connecting AI Endurance (AIE) OAuth, optionally enabling Garmin, or unwedging a toolchain/account problem that blocks setup. **Don't use this when** the app already builds and you need to *run/serve/ship* it (see `endurance-coach-run-and-operate`), look up an env var or add a flag (see `endurance-coach-config-and-flags`), or triage a live data/OAuth failure on a running instance (see `endurance-coach-debugging-playbook`). Jargon, defined once: - **AIE** = AI Endurance, the ML coaching platform this app reads its plan/thresholds/recovery from. The **data spine** — required. - **MCP** = Model Context Protocol, the tool-call transport the app uses to reach AIE and Garmin. - **OAuth** = the browser-based login that mints and caches AIE access tokens. - **tsx** = the TypeScript runner this project uses instead of compiling first; `npm run *` scripts are `tsx src/…`. - **ESM / Node16** = ES modules with Node16 module resolution (see `tsconfig.json`) — imports use `.js` extensions even for `.ts` files. `"type": "module"` in `package.json`. - **uvx** = the one-shot runner from Astral's `uv` Python tool-manager, used only to launch the Garmin community connector. > All commands below are copy-pasteable from anywhere — they `cd` into the repo first. The repo lives at > `/Users/maxeskell/dev/personal-training-app` on the author's M