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

Classification Guidelines

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:

  1. Telegram: sends CSV file to Ava → append to /var/health/cgm.csv
  2. Web: upload at /health page (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:

  1. Parse the CSV
  2. Deduplicate by timestamp against existing /var/health/cgm.csv
  3. 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