Switchback-running setup
Guided setup — connects Intervals.icu and builds your athlete profile
git clone https://github.com/rlacombe/switchback-running
T=$(mktemp -d) && git clone --depth=1 https://github.com/rlacombe/switchback-running "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/setup" ~/.claude/skills/rlacombe-switchback-running-setup && rm -rf "$T"
.claude/skills/setup/SKILL.md/setup — Guided Setup
Walk the user through setup step by step. Be friendly and patient — assume they are not technical. Confirm each step before moving to the next. Do not dump a wall of instructions; go one step at a time.
Step 1: Connect to Intervals.icu
Check if
INTERVALS_API_KEY and INTERVALS_ATHLETE_ID are set in the environment (either from a .env file or shell env).
If both are set: Tell the user they're already configured and skip to Step 3.
If either is missing: Walk them through it:
- Ask if they have an Intervals.icu account. If not, tell them to create one at https://intervals.icu (it's free) and connect their watch/device, then come back.
- Guide them to create an API key:
- Go to https://intervals.icu/settings
- Scroll to the Developer section
- Click Create API Key
- Copy the key
- Guide them to find their Athlete ID:
- It's in their Intervals.icu profile URL — looks like
i123456 - Or visible on the Settings page
- It's in their Intervals.icu profile URL — looks like
- Ask the user to paste their API key and Athlete ID.
- Write a
file in the project root:.env
This file is already gitignored — their credentials stay local.INTERVALS_API_KEY=their_key INTERVALS_ATHLETE_ID=their_id - Tell the user to restart Claude Code (or open a new terminal) for the environment variables to take effect.
Step 2: Verify the connection
Make a test call using the
get_wellness MCP tool for today. If it succeeds, tell the user the connection is working. If it fails, help them debug (wrong key, wrong athlete ID, etc.).
Step 3: Build the athlete profile
Tell the user you're going to ask a few questions to personalize the coaching. Ask them conversationally — one or two questions at a time, not a long form. Create the
athlete/ directory if it doesn't exist, then use their answers to fill in athlete/profile.md (copied from athlete/profile.example.md if it doesn't exist yet). Also create an empty athlete/notes.md for the companion's persistent observations.
Questions to cover (adapt based on what they've already answered):
- What's your name?
- How old are you?
- Height, weight, body type?
- How many miles per week are you currently running?
- What's your running experience? (years, races, distances)
- Any injuries or weaknesses to watch for?
- What does your typical training week look like? (days available, trail access, cross-training)
- What race are you training for? (name, date, distance, elevation, cutoffs)
- Why do you run? What motivates you?
- Any long-term goals beyond this race?
After gathering answers, write their data to
athlete/profile.md (filling in the template from athlete/profile.example.md). Show them what you wrote and ask if anything needs adjusting.
Then fetch zones from Intervals.icu using the athlete endpoint and populate the Zones section of
athlete/profile.md with the athlete's actual HR zones, pace zones, LTHR, FTP, and max HR. This caches the zones locally so daily briefings and workout skills don't need to call the athlete endpoint every time. Tell the athlete they can ask you to refresh zones anytime if they update them in Intervals.icu.
Step 4: Import existing notes
Ask: "Do you have any existing training notes, race reports, or logs you'd like to share? Things like Obsidian notes, markdown files, text files — anything that would help me understand your training history better."
If yes:
- Ask for the folder path (e.g.,
).~/Documents/Obsidian/Running/ - Create the
directory if it doesn't exist.athlete/docs/ - Copy all
and.md
files from the source folder into.txt
, preserving filenames. If there are subdirectories, flatten them — prefix filenames with the subfolder name to avoid collisions (e.g.,athlete/docs/
→races/western-states.md
).races-western-states.md - Tell the athlete how many files were imported and list them.
- Let them know: "I won't read all of these at once — I'll check them when they're relevant, like when we're planning a race you've run before or reviewing your training history. You can add more files anytime by dropping them in
."athlete/docs/
If no: Move on. Mention they can always add files to
athlete/docs/ later.
Step 5: Verify repo setup
Check that the athlete's personal data is being tracked (not gitignored). If
SOUL.md or athlete/profile.md show up in git status as untracked, they need to be committed. If the .gitignore still ignores athlete/* or SOUL.md, remove those lines.
If the repo has a remote, check visibility with
gh repo view --json visibility. If public, warn the athlete and help them make it private.
Framework updates happen automatically via the SessionStart hook — no manual steps needed.
Step 6: Personalize your companion
Tell the athlete they can customize who their companion is. Copy
SOUL.example.md to SOUL.md as a starting point, then ask:
- Name: "What would you like to call your companion? The default is Virgil, but you can pick any name — some runners name it after someone who inspires them."
- Inspiration: "Is there a runner, coach, or person you admire? This helps shape the companion's personality." (e.g., Kilian Jornet, Courtney Dauwalter, their first coach, a training partner)
- Personality dimensions — ask one at a time, offering two ends of a spectrum:
- Tone: "Do you want your companion to feel more like a casual training buddy, or a professional coach?"
- Intensity: "When your body is ready for hard work, do you want gentle encouragement, or someone who'll tell you straight: 'you've got more in you'?"
- Detail: "Do you prefer brief, just-the-essentials advice, or deep explanations with the science behind it?"
- Humor: "Should your companion keep things light, or stay serious?"
- Celebration: "After a great session, do you want to be hyped up, or just get the analysis and move on?"
Write their answers to
SOUL.md. If they want to skip this step, keep the defaults from SOUL.example.md.
Tell the athlete: "You can always change your companion's personality later by editing
SOUL.md — it's a plain text file in your project folder. Change the name, tone, humor, or anything else. The companion reads it fresh at the start of every session."
Step 7: Set up the switchback
command
switchbackAsk the user: "Would you like to be able to launch Switchback from anywhere by just typing
switchback?"
If yes:
- Detect their shell from
(zsh →$SHELL
, bash →~/.zshrc
).~/.bashrc - Get the absolute path to
in this project directory (useswitchback.sh
).$PWD/switchback.sh - Check if an alias or function named
already exists in their shell profile. If so, tell them it's already set up.switchback - If not, add the alias to their shell profile:
alias switchback="/absolute/path/to/switchback-running/switchback.sh" - Run
on the profile file so it takes effect immediately.source - Tell them they can now type
from any directory to start a session.switchback
If they decline, tell them they can always run
./switchback.sh from the project directory.
Step 8: Done
Tell them they're all set — greet them by name using their new companion persona. Suggest they try
switchback (or /today) to see their first morning briefing, or just start chatting.