MyFitnessClaw
This skill manages your nutritional data and provides a visual dashboard for tracking macros and micronutrients using OpenClaw's native tools.
Core Files (Skill Assets)
assets/nutrition/daily_macros.json: The structured log of daily intake.assets/nutrition/targets.json: Daily nutritional goals (calories, protein, carbs, fats, and 10 essential micronutrients).assets/nutrition/insights.json: AI-generated tips based on current progress.assets/nutrition/foods/common.md: A reference list of frequently eaten foods and their macros/micros.assets/canvas/index.html: The visual dashboard for the OpenClaw Canvas.
Workflow: Logging Food
When the user mentions eating something:
- Estimate Macros & Micros: If the user doesn't provide them, estimate:
- Macros: Calories, protein, carbs, fats.
- Micros: Vitamin D3, Magnesium, Potassium, Zinc, Vitamin B6, Vitamin B12, Selenium, Vitamin C, Vitamin A, Vitamin E.
Check
assets/nutrition/foods/common.mdfirst.
- Update Daily Log (Canonical): Update
assets/nutrition/daily_macros.json. Include themicrosobject for both individual meals and the daily total. - Update Offline Mirror: Update
assets/canvas/offline_data.jswith the same data, ensuring micronutrients are included.- Overwrite the file with:
window.__OFFLINE_DAILY_MACROS = [...]; window.__OFFLINE_TARGETS = {...}; window.__OFFLINE_INSIGHTS = {...}; - This ensures the dashboard works when opened via
file://(offline/browser-first).
- Overwrite the file with:
- Update Memory: Log the meal in the agent's current daily memory file (e.g.,
memory/YYYY-MM-DD.md). - Show Dashboard: Use
canvas(action=present, url='skills/my-fitness-claw/assets/canvas/index.html')to show the updated dashboard inside OpenClaw. - Provide Browser Access: After every log, provide the following message:
📊 View in your browser:
- Quick: Open
skills/my-fitness-claw/assets/canvas/index.htmlin your browser (uses offline mirror). - Full: Run
python -m http.server 8000from the workspace root and visithttp://localhost:8000/skills/my-fitness-claw/assets/canvas/index.html.
- Quick: Open
- Generate Insights: Analyze progress against goals in
assets/nutrition/targets.jsonand updateassets/nutrition/insights.json.
Persistence Rules:
assets/nutrition/*.json: Canonical storage.assets/canvas/offline_data.js: Mirror forfile://viewing only.- Do not modify
assets/canvas/index.htmlduring routine logging.
Publishing Checklist (Public Safety)
Before publishing or sharing this skill:
- Sanitize Data: Clear
nutrition/daily_macros.jsonby setting it to[]. - Sanitize Mirror: Clear
canvas/offline_data.jsto match the empty state:window.__OFFLINE_DAILY_MACROS = [];. - Check Insights: Clear
nutrition/insights.jsonor reset to template tips. - Remove Personal Notes: Scrub
nutrition/targets.jsonandmemory/of any sensitive info. - Verify Assets: Ensure no private images or documents are in the
assets/folder.