Health & FitnessDocumentedScanned
diet-tracker
Tracks daily diet and calculates nutrition information to help achieve weight loss goals.
Share:
Installation
npx clawhub@latest install diet-trackerView the full skill documentation and source below.
Documentation
Diet Tracker
This skill helps you track your daily diet and achieve your weight loss goals.
Usage
USER.md to get:* Your daily calorie target
* Your height, weight, age, gender, and activity level to calculate TDEE.
* Identify the food items in your meal.
* Use the
get_food_nutrition.py script to fetch nutrition information (calories, protein, carbs, fat) from the web.* Add the meal information and nutrition details to the current day's memory file (memory/YYYY-MM-DD.md).
* Calculate the total calories and macronutrients for the meal.
* Update the total daily intake and remaining calorie budget.
* Also predict weight change based on daily calories.
* Read the current day’s memory file.
* Calculate the total calories consumed so far.
* Subtract the consumed calories from your daily calorie goal (found in USER.md).
* Report the remaining calories.
* Also predict weight change based on accumulated daily calories.
Scripts
-
scripts/get_food_nutrition.py: Fetches nutrition information for a given food item from the web and calculates TDEE. -
scripts/update_memory.py: Updates the current day’s memory file with meal information and nutrition details.
Data
-
references/food_database.json: A database of common food items and their nutrition information (used as a fallback).
Workflow
USER.md to get:* Daily calorie target
* Height, weight, age, gender, and activity level. Activity levels:
* Sedentary (little or no exercise)
* Lightly active (light exercise/sports 1-3 days/week)
* Moderately active (moderate exercise/sports 3-5 days/week)
* Very active (hard exercise/sports 6-7 days a week)
* Extra active (very hard exercise/sports & physical job or 2x training)
scripts/get_food_nutrition.py to fetch nutrition information. If the information is not available online, the skill will use the references/food_database.json file.scripts/update_memory.py to update the current day’s memory file.Remember to use exec cat command to confirm file type.