gtapps/hermitd/activity-deep-dive
Claude Code and agent skill by gtapps/hermitd
- community
Checking that the SKILL.md file is still in the repository.
Per-activity coaching analysis from Strava. Detects interval vs steady-state sessions and road vs trail terrain, branching the metrics accordingly. Computes zone breakdown and recovery estimate; saves a compiled artifact and returns a compact summary. Run after a workout or to retro-analyze a specific activity.
Install
npx vskill@latest install gtapps/hermitd/activity-deep-diveSKILL.md
The same SKILL.md was published earlier as gtapps/hermitd/activity-deep-dive.
Activity Deep-Dive
Produces a standardised per-activity coaching note. All deterministic statistics (session-kind detection, terrain, zones, cadence, efficiency, cardiac drift, VAM/GAP, recovery estimate) are computed by scripts/fitness-lab.ts — this skill runs it once, interprets the JSON, and writes the coaching narrative. Raw Strava streams never enter context: the script fetches and reduces them; the skill only sees the reduced metrics.
Interval sessions get work-interval HR progression and between-bout recovery quality; steady sessions get pace/HR efficiency and cardiac drift. Trail sessions swap pace/HR efficiency for VAM and a grade-adjusted-pace estimate, reframe cardiac drift against the altitude profile, and extend the recovery window for descent load. Both get zone breakdown, recovery estimate, and a coaching note. Saves a compiled artifact and returns a compact summary.
Usage
Steps
- Resolve subjective RPE. Read
.hermit/state/activity-notes.json. If it exists and has an entry for the resolved activity ID (or, forlatest, hold the check until step 2 returns the ID), keeprpeandnotesfor the output template and artifact frontmatter. The script does NOT read RPE — this is the skill's job.
- Run the analysis script. Issue a single Bash call:
`` bun ${CLAUDE_PLUGIN_ROOT}/scripts/fitness-lab.ts analyze <activity-id|latest> ``
The script fetches details, laps, streams, athlete zones, and the recent summary activities (for the efficiency baseline), then emits one JSON object. Handle the error contract:
{"error":"strava_auth:<message>"}(exit 1) → the token is missing or expired. Relay<message>verbatim to the operator and stop. Do not compute anything.- Any other
{"error":"<token>:<detail>"}(exit 1, e.g.fetchorinvalid_activity_id) → report it and stop. - Success (exit 0) → parse the JSON and continue.
- Interpret the JSON. The object has these fields (see
thresholdsin the payload for the exact cutoffs behind each classification — cite them in coaching prose without hardcoding a second copy):
meta—name, date, sport_type, distance_km, moving_time_s, avg_hr, max_hr, total_elevation_gain_m, elev_gain_per_km.session_kind—"interval"or"steady".session_detailcarriescycles,differential_bpm,work_bouts,avg_bout_minfor theInterval (N×~Xmin)header, pluswork_segment_hrs— the ordered per-work-bout average HR (from laps when there were ≥3, else from the HR-stream windows the classifier used). This is the authoritative source for theI1 → INprogression, so it renders even on lap-sparse activities.terrain—"road"or"trail".zones—[{zone, pct}](Z1–Z5), ornullwhen HR/zone data is absent (render "HR data unavailable").cadence—{avg, sd, cv, flags}ornull.flagsis["over-striding"]and/or["high-variability"]; it is empty on trail (road-calibrated thresholds are suppressed). Omit the cadence line entirely whennull.efficiency—{current, prior_mean, delta_pct, priors_used}. Cite on steady + road only.delta_pctis the signed % vs the prior mean (negative = more efficient). Skip the line whenpriors_usedis 0.cardiac_drift_bpm/cardiac_drift_flagged— signed int (rising HR = positive), and whether it cleared the flag threshold. Cite on steady sessions only — on an interval session the first-20%/last-20% split straddles work and recovery bouts, so the figure is noise; skip the drift line.nullon trail (use thehr_altitudefield instead — see below).flaggedis already pace-guarded (a negative split won't trip it), so relay it as-is.hr_altitude— trail only (nullon road, andnullon trail when HR/altitude streams are too short or flat to correlate).{corr, tracks}:corris the Pearson r of HR vs altitude (rounded);tracksis"tracks"(r ≥ 0.3 — HR broadly rose on climbs / fell on descents, expected) or"decoupled"(HR did not follow the terrain — worth flagging). Render theHR/altitude:line from this; whennull, state the coupling couldn't be assessed rather than inventing one.vam(m/h) andgap_per_km(seconds/km) — trail only;nullon road. Render GAP asM:SS/km.laps—[{index, avg_hr, max_hr, distance_km, moving_time_s}]. For interval sessions, build theI1 → INprogression fromsession_detail.work_segment_hrs(above), not the raw laps — it already sequences the work bouts whether laps or HR-windows fed the classifier. Uselaps(andmeta.max_hras HRmax, never a zone floor) for the between-bout recovery note and the peak-bout callout; whenlapsis empty, ground those from the progression alone.recovery—{band, hours, window, trail_extended}.bandis 1–5;windowis the rendered rest recommendation (already includes any(+trail vert)extension).warnings— degraded-metric notes (short/absent streams). Surface anything material in the coaching note rather than silently dropping it.
- Write the coaching note — 2–3 sentences grounded in the numbers. Highlight what was executed well and one concrete thing to monitor or adjust next time. Reference specific metrics (e.g. "cardiac drift of +14 bpm suggests pacing started too hot").
- Format output (8–10 lines):
Steady session (road): `` Activity: <name> | <date> | <distance>km in <duration> Session type: Steady Zones: Z1 N% / Z2 N% / Z3 N% / Z4 N% / Z5 N% Cadence: N spm avg (CV: X%) [⚠ over-striding | ⚠ high variability] ← omit line when cadence absent or non-running; show ⚠ only on a tripped flag Pace/HR efficiency: X.XX min·km⁻¹·bpm⁻¹ (vs prior 4: ±X%) Cardiac drift: +N bpm (flag if > 10 bpm) Recovery: N/5 — recommended rest: Xh Subjective: RPE N/10 — <notes> ← include only when RPE data exists from step 1 Coaching: <2–3 sentences> ``
Steady session (trail): `` Activity: <name> | <date> | <distance>km in <duration> | <elevation>m gain Session type: Steady · Trail Zones: Z1 N% / Z2 N% / Z3 N% / Z4 N% / Z5 N% Cadence: N spm avg (CV: X%) ← reference only on trail (no ⚠ flags); omit line when cadence absent or non-running Trail: VAM N m/h | GAP ~M:SS/km (est, vs actual P:SS/km) HR/altitude: HR <tracked / decoupled from> the climb/descent profile (r=X.XX) ← from hr_altitude; if null, "coupling not assessable (stream too short)" Recovery: N/5 — recommended rest: Xh[(+trail vert)] Subjective: RPE N/10 — <notes> ← include only when RPE data exists from step 1 Coaching: <2–3 sentences> ``
Interval session (road): `` Activity: <name> | <date> | <distance>km in <duration> Session type: Interval (N×~Xmin) Zones: Z1 N% / Z2 N% / Z3 N% / Z4 N% / Z5 N% Cadence: N spm avg (CV: X%) [⚠ over-striding | ⚠ high variability] ← omit line when cadence absent or non-running; show ⚠ only on a tripped flag Intervals: I1 NNNbpm → IN NNNbpm — <progressive ✓ / regressive / flat>; peaked at NNNbpm on IN Between-bout recovery: HR to ~NNNbpm — <adequate / incomplete> Recovery: N/5 — recommended rest: Xh Subjective: RPE N/10 — <notes> ← include only when RPE data exists from step 1 Coaching: <2–3 sentences> ``
Interval session (trail): `` Activity: <name> | <date> | <distance>km in <duration> | <elevation>m gain Session type: Interval (N×~Xmin) · Trail Zones: Z1 N% / Z2 N% / Z3 N% / Z4 N% / Z5 N% Cadence: N spm avg (CV: X%) ← reference only on trail (no ⚠ flags); omit line when cadence absent or non-running Trail: VAM N m/h | GAP ~M:SS/km (est, vs actual P:SS/km) Intervals: I1 NNNbpm → IN NNNbpm — <progressive ✓ / regressive / flat>; peaked at NNNbpm on IN Between-bout recovery: HR to ~NNNbpm — <adequate / incomplete> Recovery: N/5 — recommended rest: Xh[(+trail vert)] Subjective: RPE N/10 — <notes> ← include only when RPE data exists from step 1 Coaching: <2–3 sentences> ``
- Save compiled artifact to
.hermit/compiled/activity-<id>-<YYYY-MM-DD>.md:
Body: the full output above.
CRITICAL — `cardiac_drift_bpm` must be a bare signed integer (6, -5), not a formatted value like +6 bpm. weekly-coaching-patterns reads this field to build its trend series; renaming the key or writing a non-numeric value breaks the trend detector. It falls back to parsing the body's Cardiac drift: line only for notes written before this field existed.
- Inside an open record's turn, pipe signal-only coaching observations into
.hermit/bin/hermitd-run task note .hermit <task-id>. Otherwise skip this step.
From the computed metrics and coaching note, derive 0–N observations that carry a coaching signal worth tracking across sessions: a flagged cardiac drift, a zone-distribution anomaly, a recovery estimate that conflicts with subjective RPE, an efficiency regression vs the prior mean, a flagged cadence (low average or high within-run variability), a notable VAM value, or a trail recovery extension. Do NOT write routine confirmations ("session completed normally") unless they represent a pattern break. If nothing clears the signal bar, skip this step.
Read only the current record at .hermit/tasks/<task-id>.md to deduplicate; writes go through the note command. For each qualifying observation, pipe one line through the note command:
`` Coaching observation [<label>] (activity <id>): <one-line description grounded in a specific metric> ``
Skip a line with the same [<label>] (activity <id>) already in the record; rerunning the deep-dive must not duplicate observations.
Labels are kebab-case and reused across sessions for consistency. Prefer an existing label over inventing a synonym. Seed vocabulary: cooldown-hr-elevated, vo2max-stimulus-confirmed, cardiac-drift-high, interval-pacing-inconsistent, recovery-insufficient, efficiency-regression, cadence-low, cadence-variability-high, trail-recovery-extended, vam-notable. Add a new kebab-case label only when none fit.
These lines provide task-record evidence; the label convention lets reflect recognize recurrence across records, and recurring observations graduate to proposals through the normal reflection-judge / proposal-triage gates.
- Return the formatted output to the caller.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/hermitd-fitness/skills/activity-deep-dive/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/gtapps/hermitd/activity-deep-dive)