Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计通过

diet-record饮食记录

Agent Skill

diet-record 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,631

周安装

113

GitHub Stars

2

下载量

922
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:diet-record(饮食记录)
来源仓库:https://github.com/734818028/diet-record
安装命令:
openclaw skills install diet-record
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install diet-record

简介

通过文字描述或食物照片智能识别并估算营养成分。

  • 帮助用户快速记录日常饮食并掌握卡路里摄入情况。
  • 适用于健身人群、糖尿病患者等特殊饮食管理需求。
  • 上传图片时请确保食物清晰可见,避免遮挡或模糊不清。
  • 结果仅供参考,实际营养含量可能存在偏差。diet-record 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
diet-record
description
Diet recording skill. Log meals via text description or food photo upload, auto-recognize food items and estimate nutrition/calories. Activate when user sends a food photo, describes what they ate, asks to log a meal, or queries calorie/nutrition info. Triggers include "记录饮食", "午饭吃了", "帮我记一下", "这个多少卡", "拍了张照片", "今天吃了什么", "log my meal", "what did I eat today".
metadata
{"nanobot":{"emoji":"📸"}}

Diet Logger

Record meals via photo or text, auto-recognize food items and calculate nutrition.

Data Storage

All diet records are stored in diet-log.jsonl (same directory as this skill file, one JSON object per line). Create the file if it doesn't exist.

Each record schema:

{
  "id": "uuid",
  "timestamp": "ISO-8601",
  "meal_type": "breakfast|lunch|dinner|snack",
  "items": [
    {
      "name": "食物名称",
      "portion_g": 150,
      "calories_kcal": 230,
      "protein_g": 12,
      "fat_g": 8,
      "carb_g": 28,
      "fiber_g": 2
    }
  ],
  "total_calories": 460,
  "notes": ""
}

User Preferences

Stored in diet-preferences.json (same directory as this skill file). Create the file if it doesn't exist.

{
  "photo_auto_log": null,
  "dietary_restrictions": [],
  "allergies": [],
  "disliked_foods": [],
  "favorite_foods": [],
  "diet_goal": null,
  "daily_calorie_target": null,
  "meal_routine": null,
  "notes": ""
}

Fields:

  • photo_auto_log: true = auto-log on photo upload, false = confirm first, null = not yet set.
  • dietary_restrictions: e.g. ["素食", "清真", "无麸质", "低碳水"]
  • allergies: e.g. ["花生", "海鲜", "乳糖不耐"]
  • disliked_foods: foods user explicitly dislikes
  • favorite_foods: frequently eaten or preferred foods
  • diet_goal: e.g. "减脂", "增肌", "维持体重", "均衡饮食"
  • daily_calorie_target: e.g. 1800 (kcal), null if not set
  • meal_routine: e.g. "一日三餐", "16:8轻断食", "少食多餐"
  • notes: any other dietary habits or notes from user

Preference Discovery

Photo auto-log preference: On the first food photo upload (or when photo_auto_log is null), recognize items as usual, then ask: "以后发食物照片时,要自动帮你记录饮食吗?还是每次先确认再记录?"

Dietary habits: Whenever user mentions dietary preferences, restrictions, allergies, goals, or habits in conversation, extract and save to the corresponding fields. Examples:

  • "我对花生过敏" → add "花生" to allergies
  • "我在减脂" → set diet_goal to "减脂"
  • "我不吃香菜" → add "香菜" to disliked_foods
  • "我每天控制在1500卡" → set daily_calorie_target to 1500
  • "我在做16:8轻断食" → set meal_routine to "16:8轻断食"

Preferences are accumulated over time — update individual fields without overwriting unrelated ones. Read preferences before each interaction to provide personalized feedback (e.g. warn if a meal exceeds calorie target, flag allergens in recognized food).

Workflow

Photo Input

  1. Receive food photo from user
  2. Read diet-preferences.json to check photo_auto_log
  3. Analyze the image: identify each food item, estimate portion size
  4. Look up nutrition data per item (use the reference table below)
  5. If photo_auto_log is null: present result, ask preference (see above), then log
  6. If photo_auto_log is true: calculate totals, log directly, respond with summary
  7. If photo_auto_log is false: present recognized items — ask user to confirm or correct, then log
  8. Append record to diet-log.jsonl

Text Input

  1. Parse food description (e.g. "一碗牛肉面加个煎蛋")
  2. Break into individual items with estimated portions
  3. Look up nutrition and calculate totals
  4. Append record

Daily Summary

When user asks "今天吃了什么" or "daily summary":

python3 -c "
import json, datetime
today = datetime.date.today().isoformat()
with open('diet-log.jsonl') as f:
    meals = [json.loads(l) for l in f if today in l]
total = sum(m['total_calories'] for m in meals)
print(f'Today: {len(meals)} meals, {total:.0f} kcal')
for m in meals:
    items = ', '.join(i['name'] for i in m['items'])
    print(f\"  {m['meal_type']}: {m['total_calories']:.0f} kcal — {items}\")
"

Nutrition Reference (per 100g)

Common foods for quick lookup (no API needed):

FoodkcalProteinFatCarb
白米饭1162.60.325.9
面条(煮)1103.50.522
鸡胸肉133311.20
鸡蛋(煮)14413101.1
牛肉(瘦)125204.20.2
三文鱼20820130
豆腐738.13.71.5
西兰花342.80.45
番茄180.90.23.9
苹果520.30.213.8
香蕉891.10.322.8
牛奶(全脂)613.23.34.8
酸奶(原味)613.53.34.7
全麦面包247133.441
燕麦片379136.567

For unlisted foods, estimate based on similar items or ask the user for specifics.

Cooking Method Calorie Adjustments

  • 清蒸/水煮: baseline
  • 炒(少油): +10-15%
  • 炒(多油): +20-30%
  • 油炸: +30-50%
  • 烧烤: -5% (fat drips off)

Portion Estimation

  • 一碗米饭 ≈ 200g
  • 一盘菜 ≈ 200-300g
  • 一个拳头 ≈ 150g (水果/肉)
  • 一汤匙油 ≈ 10g (90 kcal)
  • 一杯(240ml)牛奶 ≈ 245g

Key Rules

  • Present results in a clean table format
  • When recognition confidence is low, ask user to confirm before logging
  • Auto-detect meal_type from time: 06-10 breakfast, 11-14 lunch, 17-20 dinner, else snack
  • Remind if daily protein is under 1.2g/kg body weight (when user weight is known)
  • Never make moral judgments about food choices

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

78.89%
按下载量换算727

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills