Health Logging Skill
Log meals and CGM data to the health dashboard data files.
Meal Logging
When the user logs a meal, append a JSON line to /var/health/meals.jsonl:
echo '{"date":"2026-03-17","time":"12:30","description":"Chicken salad with avocado","category":"protein-dominant"}' >> /var/health/meals.jsonl
Fields
date: ISO date (YYYY-MM-DD)time: Local ET time (HH:MM, 24-hour)description: What was eaten (free text, be specific)category: One of:protein-dominant— mostly protein/fat (eggs, meat, cheese)balanced— mix of protein + carbs (stir fry with rice, sandwich)carb-dominant— mostly carbs with some protein (pasta, pizza)isolated-carb— pure carbs, no protein buffer (juice, candy, bread alone)
Classification Guidelines
- If meal has significant protein AND carbs →
balanced - If meal is mostly meat/eggs/cheese with minimal carbs →
protein-dominant - If meal is pasta/rice/bread-heavy with some protein →
carb-dominant - If meal is pure sugar/starch with no protein →
isolated-carb - When in doubt, use
balanced
Example Interactions
User: “Had scrambled eggs and toast for breakfast”
→ {"date":"<today>","time":"<now>","description":"Scrambled eggs and toast","category":"balanced"}
User: “Just ate a banana”
→ {"date":"<today>","time":"<now>","description":"Banana","category":"isolated-carb"}
User: “Steak with broccoli for dinner”
→ {"date":"<today>","time":"<now>","description":"Steak with broccoli","category":"protein-dominant"}
CGM Data
CGM data comes from Apple Health CSV exports. The user uploads via:
- Telegram: sends CSV file to Ava → append to
/var/health/cgm.csv - Web: upload at
/healthpage (handled by web server)
CGM CSV Format
Date/Time,Blood Glucose (mg/dL),Meal Time,Sources
2026-03-17 14:30:00,112,,
When receiving a CGM CSV file via Telegram:
- Parse the CSV
- Deduplicate by timestamp against existing
/var/health/cgm.csv - Append new-only readings
# Dedup and append (simple approach)
cat new_readings.csv >> /var/health/cgm.csv
sort -t',' -k1,1 -u /var/health/cgm.csv -o /var/health/cgm.csv
Data Locations
- Meals:
/var/health/meals.jsonl - CGM:
/var/health/cgm.csv - Bloodwork:
/var/health/bloodwork.csv(manual entry) - Exercise:
/var/health/exercise-cache.json(auto-fetched from intervals.icu)