/ai-brain-starter:backfill-journal-body-contextfrom ai-brain-starter
Backfills existing daily journal entries with retroactive body data (HRV, sleep, recovery, cycle phase, labs) from health-MCP. For users who want historical health context paired with past journals.
Ships in ai-brain-starter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Reads existing daily journals, pulls health-mcp data for each entry's date, and appends a "Body track" section BELOW the original verbatim content. The original entry text is NEVER modified — the rule from feedback_journal_verbatim_words.md is non-negotiable.
/backfill-journal-body-context/weekly and /monthly would surface if they had been pulling body data all along/health-setup for the first time and importing a backfill window of biometric dataDo NOT use for:
--year <current-year> (Jan 1 to today).[VAULT_PATH]/⚙️ Meta/journal-index.json (or Meta/journal-index.json on non-emoji vaults; rebuild if stale).## Body track (health-mcp, backfilled YYYY-MM-DD) section — if yes, skip (idempotent)health_journal_context(date, voice_profile="warm") for the data + rendered prosehealth_cycle_context(date) if cycle data exists (for women's cycle awareness)health_recovery_score(date) + health_sleep_score(date) for the scoreshealth_lab_panel(date, lookback_days=180) for any out-of-range markers active that periodfloor_level + floor)Append below the original journal content, after a blank line + horizontal rule:
---
## Body track (health-mcp, backfilled {{today_iso}})
*Auto-generated context. Original journal entry above is preserved verbatim.*
**Floor that day:** {{floor_name}} ({{floor_level}})
**Cycle phase** (if cycle data exists): {{phase}}, cycle day {{cycle_day}}{{ — irregularity flag if any}}
**The body that day:**
- HRV: {{hrv_ms}} ms ({{hrv_delta_pct}}% vs 30-day baseline)
- RHR: {{rhr_bpm}} bpm
- Sleep: {{sleep_asleep_min}} min ({{sleep_efficiency}}% efficiency, REM {{rem_min}}min, deep {{deep_min}}min)
- Steps: {{steps_total}}
- Workouts: {{workout_count}} ({{workout_min}}min)
- Mindful: {{mindful_min}}min
**Scores:**
- Recovery: {{recovery_score}}/100 ({{confidence}} confidence)
- Sleep: {{sleep_score}}/100
**Floor-paired interpretation** (1-3 sentences, see synthesis rule below): {{interpretation}}
**Lab markers** (if any out-of-range result from the prior 180 days, paired with today): {{lab_flags}}
The interpretation line must follow the same shape as the /weekly section 0d synthesis. Each line:
Examples (template SHAPES, not for verbatim use):
Floor was Fear and HRV ran 22% below baseline on a luteal day. The body and the mind both registered the threat. Without the journal entry the recovery score would have called this "rest more"; pairing with Fear shows the actual signal was "the worry is doing work the rest can't fix."
Floor was Joy after a strong gym week. HRV at baseline, sleep efficiency 94%. This is the high-water mark — note what conditions produced it.
Floor was Apathy and Vitamin D 25-OH came back at 26 ng/mL (below range) the month before. The mood floor may have had a metabolic floor under it. Worth a re-test after 3 months of supplementation.
Banned shapes (from /weekly section 0d, same rules apply):
The interpretation line is grunt-work prose. Use the cheapest model that produces a helpful sentence. Order of preference:
scripts/backfill-journal-body-context.py covers this."⚙️ Meta/scripts/minimax.sh" if the vault has it, otherwise skip the LLM step and use a fallback template.--high-quality flag passed and the user accepts the cost.The default is Python template + MiniMax fallback. Do NOT default to Sonnet for hundreds of journal entries.
The actual work runs in scripts/backfill-journal-body-context.py. The skill assembles arguments and hands off to the script.
When invoked:
Parse arguments:
--year YYYY (default: current year)--start YYYY-MM-DD and --end YYYY-MM-DD (override year)--vault-root PATH (default: $VAULT_ROOT or autodetect from cwd)--llm-model {python,minimax,haiku,sonnet} (default: python with minimax fallback)--dry-run (print what would change without writing)--force (overwrite an existing body-track section)Sanity checks:
health_status() to confirm there's biometric data in the DuckDB. If the count is zero, abort and suggest /health-setup first.⚙️ Meta/journal-index.json (or Meta/journal-index.json on non-emoji vaults) and a journal folder. Rebuild the index if stale.Run the script:
/usr/bin/python3 "[REPO_ROOT]/scripts/backfill-journal-body-context.py" --year 2026 --vault-root "$VAULT_ROOT"
Surface the summary: N entries processed, M backfilled, K skipped, plus the date range covered.
The skill does NOT write to the vault itself — the Python script does the file mutations. The skill only:
The Python script checks each journal file for an existing ## Body track (health-mcp, backfilled line. If present, skip unless --force. Re-running the skill on the same range is safe.
After the initial backfill, the same script runs daily for yesterday's entry via a scheduled task (use the /schedule skill). Suggested cadence: 7am local, after Apple Watch has uploaded the previous night's sleep data.
Scheduled-task body:
/usr/bin/python3 "[REPO_ROOT]/scripts/backfill-journal-body-context.py" --start "$(date -v-1d +%F)" --end "$(date -v-1d +%F)" --vault-root "$VAULT_ROOT"
That's "backfill yesterday, every morning, forever." Set it up after the initial backfill completes successfully.
warm register (narrative sentences, not clinical exact-number dumps)language: field if present)[[Joy]] in English / [[Alegría]] in Spanish)The script reads journal files + the local DuckDB. It writes only to journal files (appending body-track sections). No data leaves the machine. The interpretation step (if LLM-backed) sends ONLY the structured body data + floor tag to the chosen model — never the journal body content.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
backfill, journal-enrichment, health-data, body-context, retroactive
npx claudepluginhub mycelium-hq/ai-brain-starter --plugin ai-brain-starter37 skills in this plugin
/cierre-de-llamadaUse when a SALES or CLIENT call just ended and the follow-up needs to be produced from its transcript. Triggers: /cierre, "close out this call", "acabo de tener una llamada", "arma el seguimiento", "what's the follow-up on this call", "qué sigue con este cliente", or the user pastes a sales-call transcript. Produces seven blocks: CRM summary, deal state, tasks, follow-up email draft, reminder, note to the sales lead, and what worked / what did not. NOT for internal team meetings (use meeting-todos) and NOT for personal notes (use note-todos)./coachUse when the user says /coach (today, week, month, profile, log), asks what to do today for training, asks for a workout, weekly training plan, or longevity plan, wants to log a finished workout or check lift progression (PR, plateau, deload), or a scheduled morning task fires to drop today's workout into the calendar. NOT for importing health data (use ingest-health/health-setup), raw biometric queries without a prescription, or emotional/life coaching (use coaching)./coachingUse when the user wants to process a hard conversation, a decision they're second-guessing, or accumulated friction with a person (too big for a daily journal), wants panel takes that update with their corrections, or wants growth on a theme tracked over weeks. Triggers: /coaching, "coach me through this", "help me process this". NOT fitness coaching (/coach), daily entries (/journal), weekly/monthly reviews (/weekly, /monthly), or cross-session pattern detection (/patterns).Other plugins' skills for the same job