- Home
- Skills
- APIs & Backend
- Allergen Nutrition Extractor
Allergen Nutrition Extractor
by bd
Extracts allergens and nutrition facts from food PDFs into structured JSON using OCR and evidence-based mapping.
Free
Allergen Nutrition Extractor
Example session with this skill installed
Extract allergens and nutrition data from the attached 'snack_label.pdf'. Output in JSON format.
- Read your context and instructions
- Compiled the allergen nutrition extractor
I have processed the PDF using the text extraction script. The document was identified as a product label for "Almond Crunch Bar." I have mapped the ingredients and nutrition facts to the required JSON schema.
Extracted Product Data
{
"product_name": "Almond Crunch Bar",
"source_note": "Page 1",
"allergens": [
{
"group": "cereals_containing_gluten",
"status": "contains",
"notes": "Contains whole grain oats"
},
{
"group": "peanuts",
"status": "may_contain",
"notes": "Precautionary statement: 'Produced in a facility that also processes peanuts'"
},
{
"group": "nuts",
"status": "contains",
"notes": "Contains almonds"
},
{
"group": "milk",
"status": "unknown",
"notes": "Not specified in the document"
}
],
"nutrition": {
"serving_basis": "per 100g",
"energy_kj": 1845,
"energy_kcal": 441,
"fat_g": 18.2,
"saturates_g": 2.1,
"carbohydrates_g": 56.4,
"sugars_g": 22.0,
"protein_g": 8.5,
"salt_g": 0.45
}
}
Next steps
- Verify the
may_containstatus for peanuts against your specific regional labeling requirements. - Confirm the
milkstatus with the manufacturer as it was not mentioned in the specification. - Cross-reference the fat decimal precision with the physical label to ensure OCR accuracy.
Connects securely to your tools. The creator never sees your data.
About this skill
Extracting structured data from messy food labels and specification sheets is error-prone and slow. This skill automates the extraction of allergens and nutrition facts from text-based or scanned PDFs into valid JSON.
What it does
- Automated OCR handles scanned documents using Tesseract when embedded text is missing or insufficient.
- Bilingual processing supports English and Hungarian documents, identifying ingredient lists and precautionary statements.
- Evidence-based extraction classifies allergens into 14 regulatory groups based on specific document evidence.
- Nutrition mapping captures product names, decimal values, and units (per 100g or per serving) exactly as stated.
- Confidence labeling distinguishes between confirmed ingredients, precautionary "may contain" warnings, and unknown statuses.
How it works
- Run the
extract_text.pyscript on a local food product PDF to pull text or perform OCR. - The skill analyzes the extracted text against a reference allergen list and the provided JSON schema.
- It maps ingredients to specific allergen categories while preserving original nutrition decimals and units.
- It outputs a structured JSON object containing the product metadata, allergen status, and nutrition table.
Frameworks & tools
Built for Python environments requiring pypdf, pdf2image, pytesseract, and Pillow. It relies on system-level Poppler and Tesseract OCR utilities for processing scanned images.
Why this beats prompting it yourself
Generic prompts often hallucinate the absence of allergens or fail to distinguish between "contains" and "may contain" warnings. This skill enforces a strict evidence-only policy, preventing the AI from inferring safety where the document is silent.
Use cases
- Automating the intake of supplier product specification sheets.
- Building a database from scanned retail food labels.
- Auditing ingredient lists for regulatory allergen compliance.
Known limitations
Does not provide food-safety guarantees or professional reviews. Requires Tesseract and Poppler installed on the host system for OCR functionality.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 8 days ago
- Free with an Agensi account
- Software
Python
Permissions
What's inside
Creator
bd
Frequently Asked Questions
New in APIs & Backend
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.