{"skill":{"slug":"food-nutrition-facts-search","displayName":"food nutrition facts search","summary":"Searches nutrition facts, food scores, and packaged product data via public AI-friendly endpoints. Invoke when users ask to find, compare, or inspect foods,...","description":"---\nname: 'food-nutrition-facts-search'\ndescription: 'Searches nutrition facts, food scores, and packaged product data via public AI-friendly endpoints. Invoke when users ask to find, compare, or inspect foods, nutrition facts, brands, or barcodes.'\n---\n\n# Nutrition Facts Search\n\nUse 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.\n\n## When To Invoke\n\nInvoke this skill when the user:\n\n- asks to find a food or packaged product\n- provides a brand name, barcode, or partial product name and wants the matching item\n- wants to compare two or more foods or products using nutrition facts or food scores\n- wants a structured summary of a food or product detail page\n\nDo not invoke this skill for repository code search, implementation questions, or unrelated websites.\n\n## Public Endpoints\n\n- Search: `https://foodbenchmark.com/api/ai/search?q=<query>&type=<all|foods|products>&limit=<1-20>&offset=<0-based>`\n- Food detail: `https://foodbenchmark.com/api/ai/foods/<slug>`\n- Product detail: `https://foodbenchmark.com/api/ai/products/<code>`\n\n## Food vs Product\n\n- `food` means a generic food concept or food entry such as `banana`, `olive oil`, or `broccoli`\n- `product` means a product record that can expose label-style fields such as nutrition facts, ingredients, additives, brand, barcode, and packaging data\n- These are different datasets and should not be treated as interchangeable records\n- `foods` are best for generic food entities, category-level food scores, and food-oriented summaries\n- `products` are best for packaged items and for any request that needs nutrition-facts-style label data\n- 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`\n- 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\n- If the user wants an ingredients list, ingredient analysis, additive details, or barcode lookup, use `products` only\n- If the user wants a generic food entry or food score summary without asking for nutrition facts, prefer `foods`\n- If the user names a brand, barcode, or a specific packaged item, prefer `products`\n- If the user says only something ambiguous like `Coca-Cola`, `oat milk`, or `cookies`, search `all` first and then disambiguate\n\n## Type Selection Rules\n\nChoose `type` based on user intent, not only the wording of the item name.\n\n- 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\n- Use `type=products` when the user wants nutrition facts for a specific food name, because only `product` records provide nutrition facts in this workflow\n- 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\n- Use `type=all` when the query is ambiguous and intent is unclear, then choose the most relevant result set after search\n\nQuick intent mapping:\n\n- `Find banana nutrition facts` -> `type=products`\n- `Show whole milk calories` -> `type=products`\n- `Compare oat milk nutrition labels` -> `type=products`\n- `Find banana food score` -> `type=foods`\n- `What category is olive oil in?` -> `type=foods`\n- `Coca-Cola` -> `type=all`\n\n## Workflow\n\n### 1. Search First\n\nAlways call the search endpoint before requesting details.\n\n- Use `type=products` when the user asks for nutrition facts or any label-style nutrient data\n- Use `type=products` when the user clearly wants a packaged product, brand, ingredient list, additive data, or barcode result\n- Use `type=foods` when the user clearly wants a generic food entity or food score summary and is not asking for nutrition facts\n- Use `type=all` when the query is ambiguous\n\nSearch returns compact result groups:\n\n- `foods`: matched food records\n- `products`: matched product records\n- `meta`: totals, pagination, and truncation information\n\n### 2. Fetch Details Only When Needed\n\nAfter search:\n\n- If a single obvious result exists, fetch its detail endpoint\n- If several close matches exist, show the best matches first and ask the user to choose\n- If the user wants comparison, fetch detail for each selected item\n\n### 3. Keep Responses Compact\n\n- Prefer structured summaries over raw JSON dumps\n- Include the canonical website URL for each selected entity\n- When product detail includes `identity.siteUrl`, recommend that the user open it to view the full page details\n- Mention when results are truncated or ambiguous\n- If nothing matches, say so clearly and suggest a narrower query\n\n## Output Shape\n\nFor foods, prioritize:\n\n- `title`\n- `category`\n- `Food Compass 2`\n- `Health Star Rating`\n- `Nutri-Score`\n- `NOVA group`\n- `canonical URL`\n\nFor products, prioritize:\n\n- `title`\n- `brand`\n- `Nutri-Score`\n- `NOVA group`\n- `environmental score summary`\n- `ingredient/additive highlights` when relevant\n- `canonical URL`\n\n## Query Strategy\n\n- Barcode-only input: use `type=products`\n- Nutrition-facts requests for any named item, including a food name: use `type=products`\n- Clearly food-like input without nutrition-facts intent: use `type=foods`\n- Ingredients, additives, or packaged-label questions: use `type=products`\n- Ambiguous names such as brands or broad product names: use `type=all`\n- If results are truncated, summarize the best matches and mention that more results exist\n- When you need additional pages, keep the same `q` and `type`, then advance with `offset` (or `page`)\n\n## Platform Rules\n\n- Use only public URLs from `foodbenchmark.com`\n- Do not depend on local files, local scripts, or IDE-only context\n- Do not dump raw Open Food Facts JSON unless the user explicitly asks for raw data\n- Prefer a short structured answer over long prose\n- When nothing matches, say that clearly and suggest a narrower query or a barcode\n\n## Recommended Response Format\n\nFor a single match:\n\n- entity name\n- entity type: `food` or `product`\n- key scores\n- 1 short interpretation sentence if useful\n- canonical URL\n- For product details, mention that the user can open `identity.siteUrl` to view the full detail page\n\nFor multiple matches:\n\n- show the top matches first\n- include enough fields for disambiguation\n- ask the user which one to inspect if there is no clear winner\n\n## Examples\n\n### Find nutrition facts for a food name\n\nUser: `Find whole milk nutrition facts`\n\n1. Request `https://foodbenchmark.com/api/ai/search?q=whole%20milk&type=products`\n2. If a clear product match exists, request `https://foodbenchmark.com/api/ai/products/<code>`\n3. Return a short summary with the canonical URL\n\n### Find a product by barcode\n\nUser: `Check barcode 3017620422003`\n\n1. Request `https://foodbenchmark.com/api/ai/search?q=3017620422003&type=products`\n2. If found, request `https://foodbenchmark.com/api/ai/products/3017620422003`\n3. Return the matched product with key scores and link\n\n### Compare products\n\nUser: `Compare Coca-Cola and Pepsi nutrition facts`\n\n1. Search both names\n2. If multiple matches exist, identify the best candidates\n3. Fetch details for the chosen products\n4. Return a concise comparison table or bullet summary\n","tags":{"latest":"1.0.1"},"stats":{"comments":0,"downloads":314,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1777786471146,"updatedAt":1778492833926},"latestVersion":{"version":"1.0.1","createdAt":1777786471146,"changelog":"- Improved skill documentation for clear intent-based search and type selection (foods vs products).\n- Added detailed workflow and output guidelines for searching, fetching details, and summarizing results.\n- Clarifies handling of ambiguous queries, barcode lookups, comparisons, and result truncation.\n- Provides structured example workflows and formats for consistent responses.\n- Emphasizes using only public endpoints and not dumping raw data unless explicitly requested.","license":"MIT-0"},"metadata":null,"owner":{"handle":"charliex2","userId":"s178z01wadfdjh4zkpqtpk0tks860ycr","displayName":"CharlieX","image":"https://avatars.githubusercontent.com/u/2179160?v=4"},"moderation":null}