← 返回
数据分析 Key 中文

ClawCoach Food

Food photo analysis and meal logging for ClawCoach. Send a photo of your meal and get instant macro breakdown via Claude Vision.
ClawCoach食物拍照分析与记录。发送餐点照片,通过Claude Vision即时获取宏量营养素分解。
authoredniko
数据分析 clawhub v1.0.1 1 版本 99887.5 Key: 需要
★ 1
Stars
📥 868
下载
💾 26
安装
1
版本
#calories#food#health#latest#macros#meal-tracking#nutrition#photo#vision

概述

ClawCoach Food — Photo Analysis & Meal Logging

This skill handles food photo analysis via Claude Vision, text-based meal logging, and the confirmation flow.

When to Activate

  • User sends a photo — assume it is food unless context clearly suggests otherwise
  • User types a food description ("I had 2 eggs and toast for breakfast")
  • User says "log [food]" or "I ate [food]"
  • User wants to edit or delete a previous meal

Data Storage

All meals are stored in ~/.clawcoach/food-log.json with this structure:

{
  "meals": [
    {
      "id": "2026-02-22-lunch-001",
      "date": "2026-02-22",
      "type": "lunch",
      "status": "confirmed",
      "items": [
        {
          "name": "grilled chicken breast",
          "portion": "6 oz",
          "calories": 280,
          "protein_g": 52,
          "fat_g": 6,
          "carbs_g": 0
        }
      ],
      "total_calories": 520,
      "total_protein_g": 62,
      "total_fat_g": 14,
      "total_carbs_g": 48,
      "source": "photo",
      "timestamp": "2026-02-22T12:35:00Z"
    }
  ]
}

Photo Analysis Flow

When the user sends a photo:

  1. Analyze the image using your vision capabilities. Identify every distinct food item visible. For each item estimate:
    • Name (be specific: "grilled chicken breast" not just "chicken")
    • Portion in common units (oz, cups, pieces, slices)
    • Calories and macros (protein, fat, carbs in grams)

Use your nutritional knowledge. For common foods, these are well-established values. Be conservative with portions if uncertain.

  1. Present the results in the user's persona voice:
    • List each item with portion and macros
    • Show meal total
    • Show daily running totals (consumed / target / remaining)
    • Ask: "confirm? (yes / edit / redo)"
  1. Handle response:
    • "yes" / "confirm" — Write the meal to ~/.clawcoach/food-log.json with status "confirmed"
    • Correction (e.g., "the rice was brown rice" or "it was more like 8oz") — recalculate and present updated totals
    • "redo" — ask for a new photo or text description
  1. After confirmation, always show updated daily totals.

Text-Based Logging

When the user describes food in text:

  1. Parse the food items and estimate portions from the description
  2. Calculate macros for each item using your nutritional knowledge
  3. Follow the same confirmation flow as photo analysis

Meal Type Auto-Detection

Categorize meals by time:

  • Before 10:00 = breakfast
  • 10:00 - 14:00 = lunch
  • 14:00 - 17:00 = snack
  • After 17:00 = dinner

The user can override: "log this as a snack"

Editing and Deleting

  • "Delete my lunch" — find today's lunch entry, remove it from food-log.json
  • "I think that was more like 400 calories" — update the specific meal entry
  • "What did I eat today?" — list all confirmed meals for today with totals

Daily Totals

After any meal is confirmed, calculate and show:

  1. Read profile from ~/.clawcoach/profile.json for targets
  2. Sum all confirmed meals for today from food-log.json
  3. Display:
    • Consumed: X cal | Xg protein | Xg fat | Xg carbs
    • Target: X cal | Xg protein | Xg fat | Xg carbs
    • Remaining: X cal | Xg protein | Xg fat | Xg carbs

Edge Cases

  • Blurry or unclear photo: "I can't quite make out the food. Try a better lit photo, or just tell me what you had."
  • Non-food photo: "That doesn't look like food! Send a photo of your meal, or type what you ate."
  • Unknown food: Ask the user for clarification rather than guessing wildly.
  • Multiple items unclear: "I can see chicken and something else — is that rice or pasta?"
  • No portion visible: Use standard serving sizes and note: "I estimated a standard portion — let me know if it was more or less."

Nutritional Reference (Common Foods per 100g)

Use these as a baseline. Scale by estimated portion size.

FoodCalProteinFatCarbs
--------------------------------
Chicken breast (grilled)165313.60
Salmon (baked)20820130
White rice (cooked)1302.70.328
Brown rice (cooked)1232.71.026
Pasta (cooked)13151.125
Broccoli (steamed)352.40.47
Egg (whole, large ~50g)15513111.1
Avocado1602159
Sweet potato (baked)9020.121
Greek yogurt (plain)59100.73.6
Banana (~120g)891.10.323
Oats (cooked)682.41.412
Bread (white, per slice ~30g)26593.249
Cheese (cheddar)40325331.3
Almonds579215022
Olive oil (1 tbsp ~14ml)88401000
Pizza (pepperoni, per slice)298121430
Burger (quarter lb w/ bun)~550303040
Steak (sirloin)20626110
Tofu (firm)1441793
Lentils (cooked)11690.420
Milk (whole, 250ml)613.23.34.8
Protein shake (~1 scoop)~120251.53

For foods not on this list, use your general nutritional knowledge. Be transparent when estimating.

Important

  • Always present macros rounded to whole numbers
  • Always show daily running totals after confirming a meal
  • The persona voice comes from clawcoach-core — match it in all responses
  • Never log a meal without user confirmation
  • Generate unique meal IDs as: {date}-{meal_type}-{sequence}

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-29 12:46 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ClawCoach Setup

authoredniko
ClawCoach AI健康辅导一次性设置。配置您的个人资料、目标、宏量营养素目标、饮食偏好及教练风格。
★ 0 📥 690
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 199 📥 65,184
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 165 📥 60,107