← 返回 Skills 市场
charliex2

food nutrition facts search

作者 CharlieX · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
46
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install food-nutrition-facts-search
功能描述
Searches nutrition facts, food scores, and packaged product data via public AI-friendly endpoints. Invoke when users ask to find, compare, or inspect foods,...
使用说明 (SKILL.md)

Nutrition Facts Search

Use this skill when the user wants nutrition facts, food scores, product details, or barcode lookup data from a public food data website rather than codebase analysis.

When To Invoke

Invoke this skill when the user:

  • asks to find a food or packaged product
  • provides a brand name, barcode, or partial product name and wants the matching item
  • wants to compare two or more foods or products using nutrition facts or food scores
  • wants a structured summary of a food or product detail page

Do not invoke this skill for repository code search, implementation questions, or unrelated websites.

Public Endpoints

  • Search: https://foodbenchmark.com/api/ai/search?q=\x3Cquery>&type=\x3Call|foods|products>&limit=\x3C1-20>&offset=\x3C0-based>
  • Food detail: https://foodbenchmark.com/api/ai/foods/\x3Cslug>
  • Product detail: https://foodbenchmark.com/api/ai/products/\x3Ccode>

Food vs Product

  • food means a generic food concept or food entry such as banana, olive oil, or broccoli
  • product means a product record that can expose label-style fields such as nutrition facts, ingredients, additives, brand, barcode, and packaging data
  • These are different datasets and should not be treated as interchangeable records
  • foods are best for generic food entities, category-level food scores, and food-oriented summaries
  • products are best for packaged items and for any request that needs nutrition-facts-style label data
  • Important rule: if the user asks for nutrition facts, nutrition label, calories, protein, fat, carbs, serving-based nutrients, or similar nutrient fields for a specific item, use products
  • Even when the user names a broad food such as whole milk or banana, if the intent is to inspect nutrition facts, use products because only product records expose nutrition facts in this workflow
  • If the user wants an ingredients list, ingredient analysis, additive details, or barcode lookup, use products only
  • If the user wants a generic food entry or food score summary without asking for nutrition facts, prefer foods
  • If the user names a brand, barcode, or a specific packaged item, prefer products
  • If the user says only something ambiguous like Coca-Cola, oat milk, or cookies, search all first and then disambiguate

Type Selection Rules

Choose type based on user intent, not only the wording of the item name.

  • Use type=products when the user asks for nutrition facts, nutrition labels, calories, macros, serving-based nutrients, ingredients, additives, barcode results, or a packaged/branded item
  • Use type=products when the user wants nutrition facts for a specific food name, because only product records provide nutrition facts in this workflow
  • Use type=foods when the user wants a generic food entry, food category context, or summary food scoring data and is not asking for nutrition facts
  • Use type=all when the query is ambiguous and intent is unclear, then choose the most relevant result set after search

Quick intent mapping:

  • Find banana nutrition facts -> type=products
  • Show whole milk calories -> type=products
  • Compare oat milk nutrition labels -> type=products
  • Find banana food score -> type=foods
  • What category is olive oil in? -> type=foods
  • Coca-Cola -> type=all

Workflow

1. Search First

Always call the search endpoint before requesting details.

  • Use type=products when the user asks for nutrition facts or any label-style nutrient data
  • Use type=products when the user clearly wants a packaged product, brand, ingredient list, additive data, or barcode result
  • Use type=foods when the user clearly wants a generic food entity or food score summary and is not asking for nutrition facts
  • Use type=all when the query is ambiguous

Search returns compact result groups:

  • foods: matched food records
  • products: matched product records
  • meta: totals, pagination, and truncation information

2. Fetch Details Only When Needed

After search:

  • If a single obvious result exists, fetch its detail endpoint
  • If several close matches exist, show the best matches first and ask the user to choose
  • If the user wants comparison, fetch detail for each selected item

3. Keep Responses Compact

  • Prefer structured summaries over raw JSON dumps
  • Include the canonical website URL for each selected entity
  • When product detail includes identity.siteUrl, recommend that the user open it to view the full page details
  • Mention when results are truncated or ambiguous
  • If nothing matches, say so clearly and suggest a narrower query

Output Shape

For foods, prioritize:

  • title
  • category
  • Food Compass 2
  • Health Star Rating
  • Nutri-Score
  • NOVA group
  • canonical URL

For products, prioritize:

  • title
  • brand
  • Nutri-Score
  • NOVA group
  • environmental score summary
  • ingredient/additive highlights when relevant
  • canonical URL

Query Strategy

  • Barcode-only input: use type=products
  • Nutrition-facts requests for any named item, including a food name: use type=products
  • Clearly food-like input without nutrition-facts intent: use type=foods
  • Ingredients, additives, or packaged-label questions: use type=products
  • Ambiguous names such as brands or broad product names: use type=all
  • If results are truncated, summarize the best matches and mention that more results exist
  • When you need additional pages, keep the same q and type, then advance with offset (or page)

Platform Rules

  • Use only public URLs from foodbenchmark.com
  • Do not depend on local files, local scripts, or IDE-only context
  • Do not dump raw Open Food Facts JSON unless the user explicitly asks for raw data
  • Prefer a short structured answer over long prose
  • When nothing matches, say that clearly and suggest a narrower query or a barcode

Recommended Response Format

For a single match:

  • entity name
  • entity type: food or product
  • key scores
  • 1 short interpretation sentence if useful
  • canonical URL
  • For product details, mention that the user can open identity.siteUrl to view the full detail page

For multiple matches:

  • show the top matches first
  • include enough fields for disambiguation
  • ask the user which one to inspect if there is no clear winner

Examples

Find nutrition facts for a food name

User: Find whole milk nutrition facts

  1. Request https://foodbenchmark.com/api/ai/search?q=whole%20milk&type=products
  2. If a clear product match exists, request https://foodbenchmark.com/api/ai/products/\x3Ccode>
  3. Return a short summary with the canonical URL

Find a product by barcode

User: Check barcode 3017620422003

  1. Request https://foodbenchmark.com/api/ai/search?q=3017620422003&type=products
  2. If found, request https://foodbenchmark.com/api/ai/products/3017620422003
  3. Return the matched product with key scores and link

Compare products

User: Compare Coca-Cola and Pepsi nutrition facts

  1. Search both names
  2. If multiple matches exist, identify the best candidates
  3. Fetch details for the chosen products
  4. Return a concise comparison table or bullet summary
安全使用建议
This skill appears safe and purpose-aligned based on the provided artifacts. Before using it, understand that nutrition searches, product names, brands, or barcodes may be sent to foodbenchmark.com for lookup results.
功能分析
Type: OpenClaw Skill Name: food-nutrition-facts-search Version: 1.0.1 The skill bundle provides structured instructions for an AI agent to interact with the foodbenchmark.com API to retrieve nutrition facts and food scores. It contains no executable code and the markdown instructions in SKILL.md are strictly limited to the stated purpose of food data retrieval, with explicit prohibitions against accessing repository code or unrelated websites.
能力评估
Purpose & Capability
The stated purpose and instructions align: search and summarize food, product, nutrition, brand, and barcode data.
Instruction Scope
The skill is scoped to food and nutrition questions and explicitly excludes unrelated uses, but it does direct the agent to send user queries to an external public API.
Install Mechanism
There is no install spec, no required binaries, no helper scripts, and no code files.
Credentials
Network use is disclosed and limited in the provided SKILL.md to public foodbenchmark.com endpoints; no credentials, local files, or elevated permissions are requested.
Persistence & Privilege
No persistence, background behavior, credential use, privileged access, or local storage is shown.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install food-nutrition-facts-search
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /food-nutrition-facts-search 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Improved skill documentation for clear intent-based search and type selection (foods vs products). - Added detailed workflow and output guidelines for searching, fetching details, and summarizing results. - Clarifies handling of ambiguous queries, barcode lookups, comparisons, and result truncation. - Provides structured example workflows and formats for consistent responses. - Emphasizes using only public endpoints and not dumping raw data unless explicitly requested.
元数据
Slug food-nutrition-facts-search
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

food nutrition facts search 是什么?

Searches nutrition facts, food scores, and packaged product data via public AI-friendly endpoints. Invoke when users ask to find, compare, or inspect foods,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 46 次。

如何安装 food nutrition facts search?

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

food nutrition facts search 是免费的吗?

是的,food nutrition facts search 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

food nutrition facts search 支持哪些平台?

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

谁开发了 food nutrition facts search?

由 CharlieX(@charliex2)开发并维护,当前版本 v1.0.1。

💬 留言讨论