TopRank Skills

Home / Claw Skills / Others / calorie-counter
Official OpenClaw rules 15%

calorie-counter

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.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 calorie-counter 技能。 若已安装,则直接安装 calorie-counter 技能。

Overview

Skill Key
cnqso/calorie-counter
Author
cnqso
Source Repo
openclaw/skills
Version
-
Source Path
skills/cnqso/calorie-counter
Latest Commit SHA
5c500f17048705787b536241c08f5a8b1cc8fbd9

Extracted Content

SKILL.md excerpt

# Calorie Counter

Simple, reliable calorie and protein tracking with SQLite database.

## Features

- **Manual Entry**: Add food with calories and protein
- **Protein Tracking**: Monitor daily protein intake
- **Daily Goals**: Set custom calorie targets
- **Weight Tracking**: Log weight in pounds
- **Instant Feedback**: See totals immediately after adding food
- **History**: View past days and trends

## Usage

### Adding Food
```bash
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
```bash
python scripts/calorie_tracker.py summary
```
Shows:
- All entries for today
- Total calories and protein consumed
- Daily goal and remaining calories
- Progress percentage

### Setting Goals
```bash
python scripts/calorie_tracker.py goal 2000
```
Sets the daily calorie goal (persists).

### Weight Tracking
```bash
python scripts/calorie_tracker.py weight 175
python scripts/calorie_tracker.py weight-history
```
Weight is in pounds (decimals allowed: 175.5).

### Viewing History
```bash
# Last 7 days
python scripts/calorie_tracker.py history

# Last 30 days
python scripts/calorie_tracker.py history 30
```

### Deleting Entries
```bash
# List entries to get ID
python scripts/calorie_tracker.py list

# Delete by ID
python scripts/calorie_tracker.py delete 42
```

## Database

SQLite database: `calorie_data.db`

### Tables

**entries** - Food log
- id (INTEGER) - Auto-increment
- date (TEXT) - YYYY-MM-DD
- food_name (TEXT)
- calories (INTEGER)
- protein (INTEGER)
- created_at (TIMESTAMP) - Automatic

**daily_goal** - Single calorie target
- id (INTEGER) - Always 1
- calorie_goal (INTEGER)

**weight_log** - Weight tracking
- id (INTEGER) - Auto-increment
- date (TEXT) - YYYY-MM-DD
- weight_lbs (REAL) - Pounds with decimals
- created_at (TIMESTAMP) - Automatic

## Agent Instructions

**Important:** The skill is located...

README excerpt

# Calorie Counter 🍎

Simple, reliable calorie and protein tracking for OpenClaw agents.

## Features

- **Manual calorie entry** - No unreliable nutrition APIs
- **Protein tracking** - Monitor daily protein intake
- **Weight logging** - Track weight in pounds
- **Instant feedback** - See totals immediately after adding food
- **SQLite database** - Reliable, local storage
- **History & trends** - View past days and progress

## Installation

```bash
clawhub install calorie-counter
```

Or manually clone to your workspace directory.

## Requirements

- Python 3.7+
- No external dependencies (uses only Python stdlib)

## Quick Start

### Set Your Daily Goal
```bash
python scripts/calorie_tracker.py goal 2000
```

### Add Food
```bash
python scripts/calorie_tracker.py add "chicken breast" 165 31
```

### Check Progress
```bash
python scripts/calorie_tracker.py summary
```

### Log Weight
```bash
python scripts/calorie_tracker.py weight 175
```

## Agent Usage

When installed, your agent will automatically use this skill when you mention food or ask about calories.

Example conversation:
```
You: "I just ate a turkey sandwich, about 450 calories and 30g protein"
Agent: [runs add command]
       "✓ Added - you've consumed 450 cal today, 1550 remaining"

You: "How many calories do I have left?"
Agent: [runs summary command]
       "You have 1550 calories remaining (22.5% of goal consumed)"
```

## Database

Data stored in `calorie_data.db` (SQLite):
- **entries** - Food log with calories and protein
- **daily_goal** - Your calorie target
- **weight_log** - Weight measurements in pounds

## Commands

```bash
add <food> <calories> <protein>   # Add food entry
delete <id>                       # Delete entry
list                              # List today's entries
summary                           # Show daily summary
goal <calories>                   # Set daily goal
weight <lbs>                      # Log weight
weight-history [days]             # Show weight history
histo...

Related Claw Skills