openfoodfacts-cli

Search and retrieve food product data (nutrition, ingredients, Nutriscore) from OpenFoodFacts using the `off` CLI. Use when the user asks about food products, nutritional information, barcodes, or wants to look up grocery items.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "openfoodfacts-cli" with this command: npx skills add emmekappa/openfoodfacts-cli/emmekappa-openfoodfacts-cli-openfoodfacts-cli

OpenFoodFacts CLI

A command-line tool to query the OpenFoodFacts database. Install with:

npm install -g openfoodfacts-cli

The binary is called off.

Commands

Search products

off search <query> [--page <n>] [--page-size <n>] [--sort-by <field>]
  • <query>: product name or keyword (quote multi-word queries)
  • --page: page number, starts at 1 (default: 1)
  • --page-size: results per page (default: 10)
  • --sort-by: sort field, prefix with - for descending (e.g. -popularity)

Output: ASCII table with columns: Barcode, Name, Brand, Nutriscore, kcal, Fat, Carbs, Prot, Salt. Shows total count and pagination info. Missing values display as -.

Get product by barcode

off get <ean>
  • <ean>: product barcode (typically 13 digits, e.g. 3017620422003)

Output: same table format as search, single row.

Examples

# Search for a product
off search nutella

# Multi-word query
off search "organic chocolate" --page-size 5

# Paginate
off search pasta --page 2

# Sort by field
off search snacks --sort-by -popularity

# Get specific product
off get 3017620422003

Output format

Both commands produce a fixed-width ASCII table:

Found 42 results (page 1/5)
Barcode        Name                                      Brand                      Nutriscore  kcal  Fat   Carbs  Prot  Salt
-------------  ----------------------------------------  -------------------------  ----------  ----  ----  -----  ----  ----
3017620422003  Nutella                                   Ferrero                    E           539   30.9  57.5   6.3   0.1
...
Use --page 2 to see next page
  • Names truncated at 40 chars, brands at 25 chars (with ellipsis)
  • Integers show no decimals, decimals show 1 decimal place
  • Nutriscore: A-E uppercase, - if unknown
  • Exit code 1 on error, 0 on success

Error handling

  • Search with no results: prints No products found.
  • Invalid barcode / not found: prints Product not found.
  • API errors: prints error message and exits with code 1

Tips for agents

  1. Always quote multi-word search queries
  2. Check pagination output to know if more pages are available
  3. Use off get when you have an exact barcode, off search for discovery
  4. Nutritional values are per 100g
  5. The database is community-maintained; some products may have incomplete data

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated
Coding

clawhub-rate-limited-publisher

Queue and publish local skills to ClawHub with a strict 5-per-hour cap using the local clawhub CLI and host scheduler.

Archived SourceRecently Updated