.claude/skills/memory-consolidate/SKILL.md
Audit and refresh the project's memory bank. Cross-references each user/project memory entry for age, vagueness, and data leaks. Detects stale opinions, missing topics, and entries that need user confirmation. Runs HITL clarification with the user to keep memory fresh. Use at the start of each new session AND whenever the user asks to review memory, refresh what you know about them, or update the memory bank.
npx skillsauth add AlvaroLaraFF/strava-coach memory-consolidateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill keeps the persistent memory bank for strava-coach aligned with
reality. Memory entries decay — the user's threshold pace shifts, new PRs
appear, FTP changes, sports get added. Without periodic consolidation,
recommendations drift from facts.
python3 .claude/skills/memory-consolidate/scripts/consolidate.py
The script outputs a JSON report of findings, each tagged with a type:
| Finding type | Meaning |
|---|---|
| stale | Memory references a value that newer data contradicts |
| missing | DB has data that isn't reflected in any memory entry |
| outdated | Memory file's date is >14 days old and refers to a fast-changing topic |
| orphan | Memory references a file path / function that no longer exists |
| ok | Memory is consistent with current state |
If findings is empty — tell the user one short line ("memory is up to
date — last consolidation: X") and proceed with their original request.
If 1–3 findings — apply them yourself without asking, EXCEPT when a value is ambiguous (e.g., the user might have set a new PR vs. the old one being correct). For unambiguous updates, just edit the memory file and tell the user one line about what changed.
If ≥4 findings, OR any ambiguous one — use AskUserQuestion to ask the user at most 3 questions to disambiguate. Group related findings into a single question. Examples:
After applying — update MEMORY.md index if files were created or
removed. Touch .session_state.json to record the consolidation timestamp
so the same session doesn't re-trigger.
Each memory file at
~/.claude/projects/-home-alfernandez-PycharmProjects-strava-coach/memory/<name>.md
follows this frontmatter:
---
name: <descriptive title>
description: <one-line hook>
type: <user|feedback|project|reference>
---
<content>
When updating:
user_athlete_profile.md already exists, edit it. Don't create user_athlete_profile_v2.md.project memories that snapshot state, the convention is
project_training_state_<YYYY_MM_DD>.md. If today's snapshot doesn't yet
exist, create one and remove the previous one once it's >14 days old (the
raw data lives in the DB and is recomputable — memory files are for
qualitative observations only).MEMORY.md index with one line per entry.This skill always works (no token required) — it only reads local files and the local SQLite DB.
data-ai
Show a weekly training log: activities grouped by ISO week and sport, with totals for distance, time and elevation. Use when the user asks "what did I do this week", "weekly summary", "training log".
tools
Cross-reference recent runs/rides with historical weather (temperature, humidity, wind) from Open-Meteo to find correlations with performance. Use when the user asks "do I run worse in the heat", "weather impact", "temperature vs pace".
testing
Show how the user's training time and volume distribute across run, ride and swim, and flag underweighted disciplines. Use when the user asks "am I balanced", "discipline balance", "which sport am I neglecting".
data-ai
Compute a combined CTL/ATL/TSB across run, ride and swim for triathletes. Use when the user asks "my combined load", "triathlon training load", "total TSS across sports".