MyFitnessClaw
This skill manages your nutritional data and provides a visual dashboard for tracking macros using OpenClaw's native tools.
Core Files (Workspace Root)
nutrition/daily_macros.json: The structured log of daily intake.nutrition/targets.json: Daily nutritional goals (calories, protein, carbs, fats).nutrition/insights.json: AI-generated tips based on current progress.nutrition/foods/common.md: A reference list of frequently eaten foods and their macros.canvas/index.html: The visual dashboard for the OpenClaw Canvas.
Workflow: Logging Food
When the user mentions eating something:
- Estimate Macros: If the user doesn't provide them, estimate calories, protein, carbs, and fats. Check
nutrition/foods/common.mdfirst. - Update Daily Log: Add values to
nutrition/daily_macros.json. - Update Memory: Log the meal in the agent's current daily memory file (e.g.,
memory/YYYY-MM-DD.md) using thewriteoredittool. - Update Dashboard:
- Ensure
nutrition/daily_macros.json,nutrition/targets.json, andnutrition/insights.jsonare up to date. - Use
canvas(action=present, url='canvas/index.html')to show the updated dashboard. - Safety Rule: Never use the
edittool to modify thecanvas/index.htmlfile or any other executable code (JS/HTML). Always use the JSON files for data persistence.
- Ensure
- Generate Insights: Analyze progress against goals in
nutrition/targets.jsonand updatenutrition/insights.json.
Dashboard Maintenance
The dashboard (canvas/index.html) reads from the JSON files but uses fallbackData for immediate persistence. Always keep the HTML fallbacks in sync with daily_macros.json.