← 返回 Skills 市场
aaa2531349

calorie-detective-v1

作者 aaa2531349 · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
380
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install calorie
功能描述
热量侦探 v1.0.2 - AI 食物卡路里计算器。通过照片识别食物并自动计算卡路里、蛋白质、碳水、脂肪等营养数据。支持 Kimi 视觉识别,内置常见食物营养数据库。用于健康饮食管理、减肥健身追踪。再隐蔽的热量也逃不过我的眼睛!
使用说明 (SKILL.md)

🔍 热量侦探 v1.0.0

🕵️ 再隐蔽的热量也逃不过我的眼睛!

通过 AI 视觉识别技术,像侦探一样找出食物中隐藏的热量,自动计算卡路里和营养成分,帮助你更好地管理饮食健康。

✨ 功能特性

  1. 📸 拍照识别 - 上传食物照片,AI 自动识别食物种类
  2. 🔥 卡路里计算 - 自动计算总卡路里和宏量营养素
  3. 📊 营养报告 - 生成详细的营养分析报告
  4. 💡 健康建议 - 提供饮食改进建议
  5. 🌐 中文优化 - 专为中餐优化,识别更准确
  6. 💾 本地数据库 - 内置常见食物营养数据

🚀 快速开始

方式 1:Kimi Claw 一键部署(推荐)

# 1. 访问 Kimi 控制台
https://platform.moonshot.cn/console/claw

# 2. 上传 skill 包
# 选择 calorie-detective-v1.0.2.zip

# 3. 使用 config/kimi_claw.yaml 配置

# 4. 部署完成后,在 Kimi 中使用:
/卡路里 [上传食物照片]

优点:

  • ✅ 一键部署,无需配置环境
  • ✅ 自动扩展,无需管理服务器
  • ✅ 使用 K2.5 模型(Allegretto 套餐包含)
  • ✅ 支持自然语言触发

方式 2:本地安装

# 解压 skill
unzip calorie-detective-v1.0.2.zip -d calorie-detective
cd calorie-detective

# 安装依赖
pip install -r requirements.txt

# 配置 API Key
export KIMI_API_KEY="your_kimi_key"

# 运行
./run.sh data/food.jpg

⚙️ 配置

配置 API Key

方式 1:环境变量(推荐)

export KIMI_API_KEY="your_kimi_key"

方式 2:配置文件 编辑 config/config.local.yaml

api_keys:
  kimi: "your_kimi_key"

获取 Kimi API Key:

  1. 访问 https://platform.moonshot.cn
  2. 注册/登录账号
  3. 进入控制台 → API Keys
  4. 创建新 Key
  5. 新用户注册送免费额度

config/config.yaml

# 视觉识别配置
vision:
  provider: kimi        # 推荐使用 Kimi
  model: moonshot-v1-auto
  
# 使用限制
usage:
  max_requests_per_day: 10
  max_requests_per_user: 5

📤 输出示例

🕵️ **热量侦探 - 营养分析报告**

📝 一碗牛肉拉面,配有青菜和红油汤底

📊 **营养分析**

🔥 总卡路里:**696 大卡**
💪 蛋白质:26.4g
🍚 碳水化合物:50.9g
🥑 脂肪:43.1g

📋 **详细分解**

• **面条** (1 碗)
  - 卡路里:220 大卡
  - 蛋白质:5.0g | 碳水:50g | 脂肪:1.0g

• **牛肉** (80 克)
  - 卡路里:200 大卡
  - 蛋白质:20.8g | 碳水:0g | 脂肪:12.0g

• **青菜** (30 克)
  - 卡路里:6 大卡
  - 蛋白质:0.6g | 碳水:0.9g | 脂肪:0.1g

• **红油汤底** (300ml)
  - 卡路里:270 大卡
  - 蛋白质:0g | 碳水:0g | 脂肪:30.0g

──────────────────────────────
💡 侦探建议:
• 红油汤底热量较高,建议少喝汤
• 蛋白质含量充足,适合作为主食
• 可搭配凉拌菜增加膳食纤维

📅 定时任务管理

# 查看所有定时任务
openclaw cron list

# 手动立即运行一次
openclaw cron run \x3Cjob-id>

# 暂停任务
openclaw cron update \x3Cjob-id> --enabled false

# 删除任务
openclaw cron remove \x3Cjob-id>

📁 文件结构

calorie-detective/
├── SKILL.md                  # 本文件
├── config/
│   ├── config.yaml           # 配置文件
│   ├── config.local.yaml     # 本地配置(含 API Key)
│   └── kimi_claw.yaml        # Kimi Claw 部署配置
├── src/
│   └── calorie_calculator.py # 主程序
├── data/
│   ├── food.jpg              # 示例图片
│   └── calorie.log           # 运行日志
├── requirements.txt          # 依赖列表
├── run.sh                    # 运行脚本
└── test.sh                   # 测试脚本

🍎 内置食物数据库

已内置 100+ 种常见食物营养数据(每 100 克):

类别 食物举例
🍚 主食 米饭、面条、馒头、面包、土豆
🥚 蛋白质 鸡蛋、牛奶、鸡肉、猪肉、牛肉、鱼
🍎 水果 苹果、香蕉、橙子、葡萄、草莓
🥬 蔬菜 青菜、番茄、黄瓜、胡萝卜、西兰花
🍔 快餐 汉堡、薯条、炸鸡、披萨

🔧 支持的视觉服务

服务商 模型 价格 需要 API Key 推荐度
Kimi moonshot-v1-auto ¥0.008/张 ⭐⭐⭐⭐⭐
Kimi k2.5 套餐包含 ⭐⭐⭐⭐⭐
OpenAI GPT-4o / GPT-4V $0.01/张 ⭐⭐⭐⭐
Claude Claude 3 Vision $0.003/张 ⭐⭐⭐⭐

推荐使用 Kimi:

  • ✅ 中文识别最好
  • ✅ 价格便宜(约 OpenAI 的 1/10)
  • ✅ 国内直接访问
  • ✅ 注册送免费额度

🛠️ 故障排除

1. 依赖安装失败

pip install --break-system-packages -r requirements.txt

2. API Key 无效

  • 检查 API Key 是否正确
  • 确认账户有可用额度
  • 检查网络连接
# 测试 API Key
curl https://api.moonshot.cn/v1/chat/completions \
  -H "Authorization: Bearer $KIMI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "moonshot-v1-auto", "messages": [{"role": "user", "content": "Hello"}]}'

3. 图片识别不准确

  • 确保图片清晰、光线充足
  • 尽量拍摄食物特写
  • 避免过多餐具干扰

4. 营养数据不准确

  • 内置数据库为估算值
  • 建议接入专业营养 API 获取精确数据
  • 可在代码中添加自定义食物

📊 使用统计

在 Kimi 控制台查看:

  1. 访问 https://platform.moonshot.cn/console/claw
  2. 选择 calorie-detective
  3. 查看"使用统计"标签页

统计数据包括:

  • 📈 调用次数
  • ⏱️ 平均响应时间
  • 💰 额度消耗
  • 👥 用户数

🔄 扩展开发

添加新食物

编辑 src/calorie_calculator.py 中的 COMMON_FOODS 字典:

COMMON_FOODS = {
    '你的食物': {'calories': 100, 'protein': 5, 'carbs': 15, 'fat': 3},
    ...
}

添加新的视觉服务

继承 VisionRecognizer 类并实现 _recognize_xxx 方法。

📝 更新日志

v1.0.0 (2026-03-03) - 正式发布版

  • ✅ 基础功能实现
  • ✅ Kimi 视觉识别支持
  • ✅ 本地食物营养数据库(100+ 种食物)
  • ✅ 营养报告生成
  • ✅ 健康饮食建议
  • ✅ Kimi Claw 一键部署支持
  • ✅ 中文食物识别优化
  • ✅ 品牌:热量侦探

⚠️ 免责声明

  • 本工具提供的营养数据仅供参考,不构成医疗或营养建议
  • 实际食物营养含量可能因烹饪方式、食材来源等因素有所不同
  • 如有特殊饮食需求或健康问题,请咨询专业营养师或医生
  • 开发者不对使用本工具造成的任何损失承担责任

📄 License

MIT

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📧 联系方式

如有问题或建议,请提交 Issue 或联系开发者。


🕵️ 热量侦探,再隐蔽的热量也逃不过我的眼睛! 🍽️

安全使用建议
This skill appears to implement photo-based food recognition and local nutrition estimation and will send image data to third‑party vision APIs (api.moonshot.cn and optionally api.openai.com). Before installing or deploying: - Expect to provide a KIMI_API_KEY (and optionally OPENAI/NUTRITIONIX keys). The registry metadata did not declare these required env vars — set and protect keys yourself. - Understand privacy implications: images are base64-encoded and POSTed to external APIs; do not use with sensitive images if you require full local-only processing. - Review the src/calorie_calculator.py network calls and endpoints (api.moonshot.cn, api.openai.com) and confirm these services' data retention/TOS meet your requirements. - Run the skill in an isolated environment first (local VM or container) and monitor network traffic and logs to confirm behavior and costs. - Note the SKILL.md/metadata version mismatch and lack of homepage/contact info; if you need higher assurance, ask the publisher for a canonical source or updated package with declared env requirements. - Remember nutrition results are estimations (the docs already warn this); do not treat outputs as medical advice.
功能分析
Type: OpenClaw Skill Name: calorie Version: 1.0.0 The skill is classified as suspicious due to potential prompt injection vulnerabilities against the OpenClaw agent itself, found in the `SKILL.md` file. This file contains direct `openclaw cron` commands (e.g., `openclaw cron remove <job-id>`, `openclaw cron run <job-id>`) presented as documentation. If the AI agent interprets these as direct instructions, it could lead to unauthorized management (deletion, execution) of platform tasks, which is beyond the skill's stated purpose of calorie calculation. While the Python code is generally benign and focused on its stated purpose, the presence of these executable commands in the agent's instructions constitutes a significant risk.
能力评估
Purpose & Capability
Name/description, code, and docs all describe photo-based food recognition and calorie/nutrition estimation. The code calls expected vision APIs (moonshot/api.moonshot.cn, optional OpenAI endpoints) and uses a local nutrition DB fallback — these are coherent with the stated purpose. Minor inconsistencies: package header and SKILL.md show different version labels (v1.0.2 vs v1.0.0) and registry metadata lists version 1.0.0 while top-level summary said v1.0.2.
Instruction Scope
Runtime instructions are focused on using a vision API and computing nutrition. They instruct the user to set KIMI_API_KEY and demonstrate curl against api.moonshot.cn. The SKILL.md and scripts direct images to remote services (Kimi/OpenAI) — expected for a cloud vision integration, but worth noting for privacy. There are also deployment instructions referencing Kimi/Claw and openclaw cron management which are consistent with a hosted deployment flow.
Install Mechanism
No install spec is provided (instruction-only install), and requirements.txt lists small Python dependencies (requests, pyyaml, Pillow). No remote download or obscure installers are used in the provided files. DEPLOY.md suggests optional third‑party CLI (kimi-claw) if you deploy to Kimi; that's normal for that platform.
Credentials
The registry metadata declares no required env vars, but the code and SKILL.md clearly expect API keys (KIMI_API_KEY, optionally OPENAI_API_KEY, NUTRITIONIX keys). The environment/credentials requested by the code match its purpose (vision API keys), but the metadata omission is an inconsistency that could mislead users about required secrets.
Persistence & Privilege
Skill does not request always:true, does not declare system-wide persistence, and does not attempt to modify other skills or global agent settings. Running locally uses provided scripts only.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install calorie
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /calorie 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
# 🕵️ 热量侦探 - AI 食物卡路里计算器 🕵️ **再隐蔽的热量也逃不过我的眼睛!** 像侦探一样找出食物中隐藏的热量!通过 AI 视觉识别技术,一键分析食物照片,自动计算卡路里和营养成分。 ## ✨ 核心功能 - 📸 拍照识别食物 - 🔥 秒算卡路里 - 📊 蛋白质/碳水/脂肪分析 - 💡 健康饮食建议 - 🕵️ 侦探式报告风格 ## 🎯 适用场景 - 🏋️ 健身减脂人群 - 🥗 健康饮食管理 - 🍔 外卖热量查询 - 📱 日常饮食记录 ## 🚀 使用方法 1. 上传食物照片 2. AI 自动识别 3. 查看营养报告 ## 💡 温馨提示 识别结果为 AI 估算,实际营养含量可能因烹饪方式有所不同。 --- **🕵️ 热量侦探,再隐蔽的热量也逃不过我的眼睛!** 🍽️
元数据
Slug calorie
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

calorie-detective-v1 是什么?

热量侦探 v1.0.2 - AI 食物卡路里计算器。通过照片识别食物并自动计算卡路里、蛋白质、碳水、脂肪等营养数据。支持 Kimi 视觉识别,内置常见食物营养数据库。用于健康饮食管理、减肥健身追踪。再隐蔽的热量也逃不过我的眼睛!. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 380 次。

如何安装 calorie-detective-v1?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install calorie」即可一键安装,无需额外配置。

calorie-detective-v1 是免费的吗?

是的,calorie-detective-v1 完全免费(开源免费),可自由下载、安装和使用。

calorie-detective-v1 支持哪些平台?

calorie-detective-v1 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 calorie-detective-v1?

由 aaa2531349(@aaa2531349)开发并维护,当前版本 v1.0.0。

💬 留言讨论