Token导航 LogoToken导航TokenDH.com
效率需要联网clawhub未标认证来源可访问clear审计提醒

foodlensfoodlens 分析

Agent Skill

foodlens 用于处理图像、截图、视觉识别或图片素材相关工作,适合在 OpenClaw 中需要让 Agent 分析图片、整理视觉素材或辅助图像流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,236

周安装

139

GitHub Stars

公开资料未说明

下载量

1,134
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

ClawHubOpenClaw
openclaw skills install foodlens

简介

通过 AI 识别食物照片并提供营养跟踪与分析。

  • 支持早餐、午餐、晚餐与小吃的自动分类。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 需上传清晰食物图片以获得准确识别结果。
  • 输出卡路里与营养成分估算值供健康管理参考。
  • 建议结合个人健康目标调整摄入建议。foodlens 属于效率类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
foodlens
description
>

FoodLens — AI Meal Photo & Nutrition Tracker

Trigger Conditions

User sends a meal/food photo with context such as:

  • breakfast / lunch / dinner / snack / supper / 早饭 / 午饭 / 晚饭 / 加餐 / 零食

Configuration

Set these paths for your deployment (defaults shown):

FOODLENS_DIR=~/.openclaw/workspace/skills/foodlens
FOODLENS_DATA=$FOODLENS_DIR/data          # daily JSON logs: YYYY-MM-DD.json
FOODLENS_VENV=$FOODLENS_DIR/venv

Nutrition goals are user-configurable. Defaults (edit foodlens_config.json):

  • Calories: 2000 kcal/day
  • Protein: 80g | Carbs: 250g | Fat: 65g

Core Flow

Step 1 — Analyze Photo (Primary)

Save the inbound photo to a temp path, then run:

cd $FOODLENS_DIR && source venv/bin/activate
python3 analyze_photo.py /path/to/photo.jpg "lunch"

This script:

  1. Calls GPT-4o Vision (fallback: Gemini) to identify foods and estimate

portion sizes using container/utensil references

  1. Cross-validates against nutrition_db (778 foods + 197 aliases);

if deviation > 30%, trusts the database

  1. Appends the meal to data/YYYY-MM-DD.json
  2. Outputs a formatted nutrition report

Forward the script output directly to the user.


Step 2 — Fallback (API unavailable)

If analyze_photo.py fails, use the image tool:

image(
  image="/path/to/photo.jpg",
  prompt="You are a professional nutritionist. Identify all foods in this meal
  photo. Observe container size and utensils to estimate actual grams per item.
  Reference: standard takeout box 500–800 ml, bowl of rice ~150–200 g,
  stir-fried noodles ~400–500 g. List each food: name, estimated grams,
  kcal per 100 g, protein/carb/fat per 100 g."
)

Then write results via Python:

cd $FOODLENS_DIR && source venv/bin/activate && python3 - <<'EOF'
import json, uuid, sys
sys.path.insert(0, '.')
from foodlens import (ensure_item_nutrition, calc_total,
                      health_score_and_comment, load_day, save_day,
                      today_str, recalc_day_totals)
from datetime import datetime

date_str = today_str()
day = load_day(date_str)

# Replace with image tool results
items = [
    ensure_item_nutrition({'name': 'food name', 'grams': 300, 'source': 'image_tool'}),
]

meal_total = calc_total(items)
score, comment = health_score_and_comment(meal_total, len(items))
meal = {
    'meal_id': f'meal_{uuid.uuid4().hex[:10]}',
    'timestamp': datetime.now().isoformat(),
    'label': 'lunch',
    'items': items,
    'meal_total': meal_total,
    'health_score': score,
    'comment': comment,
}
day['meals'].append(meal)
recalc_day_totals(day)
save_day(date_str, day)
print(json.dumps({'meal': meal, 'daily_total': day['daily_total']}, ensure_ascii=False, indent=2))
EOF

Step 3 — Format Reply

🍽️ [Lunch] Nutrition Analysis

🔍 Identified foods:
  • Stir-fried noodles ~400g (720 kcal)
  • Shrimp ~30g (27 kcal)
  • Chicken slices ~60g (90 kcal)

📊 Meal total:
  • Calories: 837 kcal
  • Protein: 38g | Carbs: 102g | Fat: 29g

⭐ Health score: 7/10
  Comment: ...

📈 Daily total (meal N):
  • Calories: X / [goal] kcal (X%)
  • Protein: X / [goal]g (X%)

Step 4 — User Corrections

If user says "that's not X it's Y" or "only about Xg":

  1. Re-query nutrition_db for the corrected food
  2. Update the JSON entry
  3. Reply with corrected nutrition totals

Step 5 — Duplicate Detection

If the same photo is sent again, alert the user it was already logged and ask whether to record again.


Summaries

Daily summary:

cd $FOODLENS_DIR && source venv/bin/activate
python3 analyze_photo.py --summary today

Weekly trend (last 7 days):

cd $FOODLENS_DIR && source venv/bin/activate
python3 analyze_photo.py --weekly-summary yesterday 7

Data Layout

PathDescription
data/YYYY-MM-DD.jsonDaily meal logs
nutrition_db.py778 foods + 197 aliases
analyze_photo.pyMain entry point
foodlens_config.jsonUser nutrition goals
venv/Python virtual environment

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

能力 5

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

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

平台分布

OpenClaw

72.81%
按下载量换算826

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills