Install
openclaw skills install @patello/caloric-intake-trackerLog and track daily calorie intake, macronutrients, body weight, and waist measurements locally in a SQLite database. Provides granular statistics, weekly averages, and future calorie budgets.
openclaw skills install @patello/caloric-intake-trackerTrack daily calorie intake, macronutrients, body weight, and waist measurements locally using a SQLite database.
This is a standalone, skill-first OpenClaw skill. It runs out-of-the-box using standard Python libraries.
The default SQLite database file is named health_data.db and is resolved relative to the current working directory (Cwd) of the running agent. To override the database path, pass the --database PATH option to any command.
list or stats day command, and run the update or delete command to fix it.--meal type. Allowed types are: breakfast, lunch, dinner, snack, fika, drink, dessert, evening, and other. Valid meal types are loaded and validated dynamically from the database.When marking a day as complete using the complete command, use one of the following completeness quality levels:
full: Default. All meals and drinks consumed for the target day were fully tracked.partial: Some meals are missing, or the day relies heavily on rough estimates.minimal: Only sporadic entries were logged; most of the day's intake is unknown.When reviewing weekly averages using the stats week command, averages and budgets are tailored dynamically to today's completion status by default (--include-today auto):
--include-today flag to force a specific behavior:
--include-today yes: Forces inclusion of today (shows Mon-Today average and Starting Tomorrow budget).--include-today no: Forces exclusion of today (shows Mon-Yesterday average and Starting Today budget).--include-today both: Shows both sets of averages and budgets.All commands support the following global flags (which must be placed before the subcommand):
--database PATH: Path to SQLite database file (defaulting to ./health_data.db).--today YYYY-MM-DD: Simulates today's date context for the entire command run (overrides the system clock date, affecting default logging dates, lookbacks, weekly budgets, and rolling averages).Configure Daily Goal & Height:
python3 scripts/tracker.py goal CALORIES [PROTEIN] [--height HEIGHT_CM]
Sets target calories, optional protein goals (in grams), and optional height in cm (used dynamically by SQLite views to compute BMI and Waist-to-Height Ratio).
Example: python3 scripts/tracker.py goal 1800 120 --height 180.0
Log Food Entry:
python3 scripts/tracker.py add "food description" CALORIES [protein] [carbs] [fat] --meal TYPE [--date YYYY-MM-DD]
Example: python3 scripts/tracker.py add "Oatmeal with blueberries" 350 12 --meal breakfast
List Entries by ID:
python3 scripts/tracker.py list [DATE] [--no-group]
Lists all entries for DATE (defaults to today). By default, entries are grouped by meal type (combining descriptions and summing calories/protein). Pass --no-group to disable grouping and display raw individual entries with their database IDs and timestamps (essential for updates/deletions).
Update Food Entry:
python3 scripts/tracker.py update ID [--name NAME] [--cal CALORIES] [--p PROTEIN] [--c CARBS] [--f FAT] [--meal TYPE]
Modifies an existing entry by ID. Only the specified flags are updated.
Delete Food Entry:
python3 scripts/tracker.py delete ID
Permanently deletes a specific entry.
Mark Day as Complete:
python3 scripts/tracker.py complete DATE [--completeness QUALITY] [--notes NOTES]
Sets the completeness status (full (default), partial, or minimal) and marks completed=1 in the database.
Check Day Completion:
python3 scripts/tracker.py check-complete [DATE]
Exits with code 0 if the date is fully completed (completeness == 'full' and completed == 1), otherwise exits with 1.
Log Body Weight:
python3 scripts/tracker.py weight KG [DATE]
Logs weight for the specified date (defaults to today).
Log Waist Circumference (Shortcut):
python3 scripts/tracker.py waist CM [DATE] [--notes NOTES]
Logs waist circumference with optional notes (delegates to measure waist).
Log Custom Body Measurement:
python3 scripts/tracker.py measure TYPE VALUE [DATE] [--notes NOTES]
Logs a measurement value for a defined measurement type (e.g. waist, hips, neck, or custom defined types) with optional notes.
(Note: Default types waist, hips, and neck are pre-seeded automatically. The key waist is specifically used to compute Waist-to-Height Ratio (WHtR) and power the waist shortcut.)
Example: python3 scripts/tracker.py measure hip_upper 92.5 --notes "Upper hip line, morning"
Define Custom Measurement Type:
python3 scripts/tracker.py measure-type define KEY DISPLAY_NAME UNIT [--desc DESCRIPTION]
Defines a custom measurement point with display name, unit, and optional description.
Example: python3 scripts/tracker.py measure-type define hip_upper "Hip (Upper)" cm --desc "Upper hip line"
List Defined Measurement Types:
python3 scripts/tracker.py measure-type list
Lists all defined measurement types, units, and descriptions.
Delete Custom Measurement Type:
python3 scripts/tracker.py measure-type delete KEY
Deletes the type definition and all associated logs. Default types (waist, hips, neck) cannot be deleted.
Show Daily Breakdown:
python3 scripts/tracker.py stats day [DATE] [--no-group]
Prints the chronological list of entries, meal-type breakdowns, and progress compared to daily goals. Defaults to today's date (or simulated --today date) if DATE is omitted. By default, the daily breakdown list is grouped by meal type (combining descriptions and summing calories/protein). Pass --no-group to disable grouping and display raw individual entries with their database IDs and timestamps.
Show Weekly Summary:
python3 scripts/tracker.py stats week [DATE] [--weeks N] [--compact] [--include-today {auto,yes,no,both}]
Summarizes the Mon-Sun week containing DATE (or N preceding weeks). Defaults to today's date (or simulated --today date) if DATE is omitted. If --compact is passed, it outputs a single-line summary of metrics for each week. Displays weekly averages and future daily budgets tailored dynamically to today's completion status (customizable via --include-today), along with a daily breakdown table.
Show Macronutrient Trends:
python3 scripts/tracker.py stats trend [--days N]
Displays 7-day, 30-day, and 90-day rolling averages of calorie and protein intake (resolved dynamically from rolling trends view) up to today.
Show Weight logs:
python3 scripts/tracker.py stats weight [-N ENTRIES] [--days DAYS]
Displays logged weights, BMI, and weight changes up to today. Defaults to showing the last 5 entries (-N 5). Supports a positive integer or "all" for -N, and an integer number of days for --days.
Show Waist logs (Shortcut):
python3 scripts/tracker.py stats waist [-N ENTRIES] [--days DAYS]
Displays logged waist measurements, WHtR, and waist changes. Defaults to showing the last 5 entries (-N 5).
Show Custom Measurement logs:
python3 scripts/tracker.py stats measure TYPE [-N ENTRIES] [--days DAYS]
Displays logs, unit, and calculated changes for any defined measurement type. If TYPE is waist, also prints WHtR.
Example: python3 scripts/tracker.py stats measure chest -N 10