From peak-lab
First-run bootstrap for peak-lab. Verifies prerequisites, walks the user through Garmin Connect authentication, and captures an athlete profile. Run this once before /peak-lab:analyze.
How this skill is triggered — by the user, by Claude, or both
Slash command
/peak-lab:setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are bootstrapping the peak-lab plugin for a new user. Run through the following checklist, pausing for user input where needed. Be concise — each step is one or two sentences of output unless something is wrong.
You are bootstrapping the peak-lab plugin for a new user. Run through the following checklist, pausing for user input where needed. Be concise — each step is one or two sentences of output unless something is wrong.
uv is installedRun command -v uv via Bash. If missing, tell the user to install it (curl -LsSf https://astral.sh/uv/install.sh | sh on macOS/Linux) and stop here. Do not attempt to auto-install.
Run "${CLAUDE_PLUGIN_ROOT}/bin/garmin-auth" --verify via Bash. Exit code 0 means tokens are valid — skip to step 4. Non-zero means we need to log in (step 3).
Tell the user to run this in their terminal and wait for confirmation:
"${CLAUDE_PLUGIN_ROOT}/bin/garmin-auth"
(They can copy the absolute path from the message you printed.) The script prompts for email, password, and MFA code if needed, then saves DI OAuth tokens to ~/.garminconnect/garmin_tokens.json. peak-lab never sees the password — only the saved tokens.
If they hit a 429, tell them to wait 15-60 minutes and try again — Garmin throttles by IP. Do NOT retry repeatedly; that extends the cooldown.
After the user confirms the script printed ✓ Login successful, re-run bin/garmin-auth --verify to confirm. If verify still fails, surface the error and stop.
peak-lab works in the current directory. Whatever directory the user ran Claude Code from IS their training project — profile.md, runs/, and garmin-call.log all live right there. No env vars, no overrides, no git-repo-root guessing. If the user wants a different project, they cd and relaunch.
Sanity-check the cwd in one Bash call:
pwd
test ! -d .claude-plugin || { echo "ERROR: $(pwd) is the plugin source directory — cd into a separate training project folder"; exit 1; }
test -f profile.md && echo "PROFILE_EXISTS" || echo "NO_PROFILE"
If the output includes .claude-plugin/ at the current directory, stop and tell the user to cd into a separate training project folder and relaunch.
If PROFILE_EXISTS, read profile.md and print a short summary, then ask the user whether to keep or update it.
If it doesn't exist, keep the ask short. Sports, training hours, and recent race history can be inferred later from the Garmin data pulled in /peak-lab:analyze — do NOT ask for them up front. Only ask for what's genuinely self-reported and unknowable from the data:
get_scheduled_workouts in the analyze flow, so only ask if the user wants to add something that isn't already in Garmin.Do not ask about sports, typical training hours, or recent race results — those come from the Garmin pull. Explain this briefly so the user understands why the profile is so short.
Write the collected answers to profile.md (in the current directory) using the Write tool. Use this structure:
# Athlete profile
_Last updated: <YYYY-MM-DD>_
## Goals
...
## Constraints / injuries
...
## A race — target time
<e.g. "City Marathon YYYY-MM-DD — target H:MM:SS"; omit the target section if none set>
## Additional races (beyond what Garmin's calendar contains)
| Name | Date | Priority |
| ---- | ---- | -------- |
| ... | ... | ... |
## Auto-derived at analyze time
- Sports: inferred from `activities[]` in `raw.json`
- Training volume: computed from 4-week and 8-week rolling windows over `activities[]`
- Recent race fitness: derived from `personal_records` or race-flagged activities
Print: ✓ peak-lab is ready. Run /peak-lab:analyze to generate your first training analysis.
profile.md, pass an absolute path (e.g. /path/to/my-project/profile.md) — the Write tool expects absolute paths. Use $(pwd)/profile.md resolved to its literal value.Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.
npx claudepluginhub shlomihod/peak-lab --plugin peak-lab