π¦ ClawHub
Calorie Counter
by @cnqso
Track daily calorie and protein intake, set goals, and log weight. Use when user mentions food they ate, wants to know remaining calories, or needs to track weight. Stores data in SQLite with automatic daily totals.
TERMINAL
clawhub install calorie-counterπ About This Skill
name: calorie-counter description: Track daily calorie and protein intake, set goals, and log weight. Use when user mentions food they ate, wants to know remaining calories, or needs to track weight. Stores data in SQLite with automatic daily totals. metadata: { "openclaw": { "emoji": "π", "requires": { "python": ">=3.7" } } }
Calorie Counter
Simple, reliable calorie and protein tracking with SQLite database.
Features
Usage
Adding Food
python scripts/calorie_tracker.py add "chicken breast" 165 31
python scripts/calorie_tracker.py add "banana" 100 1
Shows immediate feedback with today's totals and remaining calories.Viewing Today's Summary
python scripts/calorie_tracker.py summary
Shows:
Setting Goals
python scripts/calorie_tracker.py goal 2000
Sets the daily calorie goal (persists).Weight Tracking
python scripts/calorie_tracker.py weight 175
python scripts/calorie_tracker.py weight-history
Weight is in pounds (decimals allowed: 175.5).Viewing History
# Last 7 days
python scripts/calorie_tracker.py historyLast 30 days
python scripts/calorie_tracker.py history 30
Deleting Entries
# List entries to get ID
python scripts/calorie_tracker.py listDelete by ID
python scripts/calorie_tracker.py delete 42
Database
SQLite database: calorie_data.db
Tables
entries - Food log
daily_goal - Single calorie target
weight_log - Weight tracking
Agent Instructions
Important: The skill is located at workspace/calorie-counter/ in your agent's workspace. All commands should use this path prefix.
When user mentions food:
1. Extract food name, calories, and protein (estimate if not provided) 2. Run:python3 workspace/calorie-counter/scripts/calorie_tracker.py add "food" CALORIES PROTEIN
3. The command outputs immediate totals (no need to run summary separately)Example:
python3 workspace/calorie-counter/scripts/calorie_tracker.py add "chicken breast" 165 30When user wants remaining calories:
1. Run:python3 workspace/calorie-counter/scripts/calorie_tracker.py summaryWhen user sets a goal:
1. Run:python3 workspace/calorie-counter/scripts/calorie_tracker.py goal CALORIESWhen user logs weight:
1. Convert to pounds if needed (1 kg β 2.205 lbs) 2. Run:python3 workspace/calorie-counter/scripts/calorie_tracker.py weight POUNDSWhen user wants to delete entry:
1. Run:python3 workspace/calorie-counter/scripts/calorie_tracker.py list to show IDs
2. Run: python3 workspace/calorie-counter/scripts/calorie_tracker.py delete IDProtein Estimation Guide
If user doesn't specify protein, estimate based on food type:When uncertain, estimate conservatively or ask the user.
Notes
Example Session
# Set goal
$ python scripts/calorie_tracker.py goal 2000
β Set daily goal: 2000 calAdd breakfast
$ python scripts/calorie_tracker.py add "oatmeal" 150 5
β Added: oatmeal (150 cal, 5g protein)
Entry ID: 1
Today: 150 / 2000 cal (remaining: 1850) | Protein today: 5g | Entries: 1Add lunch
$ python scripts/calorie_tracker.py add "grilled chicken salad" 350 45
β Added: grilled chicken salad (350 cal, 45g protein)
Entry ID: 2
Today: 500 / 2000 cal (remaining: 1500) | Protein today: 50g | Entries: 2Check summary
$ python scripts/calorie_tracker.py summary
============================================================
DAILY SUMMARY - 2026-02-05
============================================================
Entries: 2
Total consumed: 500 cal | 50g protein
Daily goal: 2000 cal
Remaining: 1500 cal
25.0% of goal consumed
============================================================Log weight
$ python scripts/calorie_tracker.py weight 175.5
β Logged weight: 175.5 lbs
π‘ Examples
Adding Food
python scripts/calorie_tracker.py add "chicken breast" 165 31
python scripts/calorie_tracker.py add "banana" 100 1
Shows immediate feedback with today's totals and remaining calories.Viewing Today's Summary
python scripts/calorie_tracker.py summary
Shows:
Setting Goals
python scripts/calorie_tracker.py goal 2000
Sets the daily calorie goal (persists).Weight Tracking
python scripts/calorie_tracker.py weight 175
python scripts/calorie_tracker.py weight-history
Weight is in pounds (decimals allowed: 175.5).Viewing History
# Last 7 days
python scripts/calorie_tracker.py historyLast 30 days
python scripts/calorie_tracker.py history 30
Deleting Entries
# List entries to get ID
python scripts/calorie_tracker.py listDelete by ID
python scripts/calorie_tracker.py delete 42