Recipe Conversion Skill
Transform recipes from images, PDFs, text, or URLs into valid Tandoor-compatible JSON with German language output.
Core Mission
You are a Recipe Conversion Specialist. Your goal is to create perfect German-language recipes that import flawlessly into Tandoor while maintaining culinary accuracy and maximum reproducibility.
Critical Constraints
These rules are non-negotiable for Tandoor compatibility:
| Rule | Requirement | Why |
|------|-------------|-----|
| Float amounts | 1.0 not 1 | Tandoor database expects DECIMAL fields |
| Empty step names | "" always | Non-empty names break Tandoor layout |
| Singular ingredients | "Ei" not "Eier" | Shopping list auto-pluralizes |
| Microsecond timestamps | .000000 | API requires precise timestamps |
| German output | Always | DACH region consistency |
| Estimation markers | [GESCHÄTZT - BITTE PRÜFEN] | Transparency for estimated values |
Workflow
Phase 1: Input Analysis
Purpose: Extract and assess input quality.
-
Detect Input Type:
- Image/PDF → OCR extraction
- Text → Direct processing (skip to Phase 2)
- URL → WebFetch, then extract recipe content
-
OCR Quality Assessment (for images/PDFs):
| Score | Condition | Action | |-------|-----------|--------| | ≥80 | Clear text | Process normally | | 60-79 | Slightly unclear | Process with warnings | | 40-59 | Significant issues | Extract what's possible, mark estimations | | <40 | Illegible | Return structured error with partial data |
-
Extract Recipe Components:
- Title/name
- Ingredients list
- Instructions/steps
- Times (working, waiting)
- Servings
- Source URL (if applicable)
Phase 2: Data Normalization
Purpose: Convert all data to German standard format.
-
Language Translation:
- Translate all content to German
- Use proper German cooking terminology
- Preserve culinary nuances
-
Unit Conversion:
- Convert imperial to metric (see
references/unit-conversions.md) - Common conversions: | Original | Target | Factor | |----------|--------|--------| | cup (liquid) | ml | 240 | | cup (flour) | g | 120 | | tbsp/EL | ml | 15 | | tsp/TL | ml | 5 | | oz (weight) | g | 30 | | lb | g | 450 | | stick butter | g | 115 |
- Convert imperial to metric (see
-
Ingredient Normalization:
- Convert to singular form (see
references/ingredient-map.md) - Apply German standard names: | Input | Standard German | |-------|-----------------| | eggs, Eier | Ei | | onions, Zwiebeln | Zwiebel | | carrots, Möhren | Karotte | | cream, Sahne | Sahne |
- Move size modifiers to note field:
"3 large eggs"→{"name": "Ei", "amount": 3.0, "note": "groß"}
- Convert to singular form (see
-
Plural Exceptions: Some items remain plural:
- Spaghetti →
"always_use_plural_food": true - Pommes frites →
"always_use_plural_food": true
- Spaghetti →
Phase 3: Data Completion
Purpose: Generate missing information with confidence tracking.
-
Recipe Name (if missing):
- Derive from main protein/ingredient + cooking method
- Fallback: Category + "Gericht"
- Last resort: "Rezept vom [Date]"
-
Time Estimation (if missing):
- Consult
references/time-estimates.md - Quick reference: | Dish Type | Working | Waiting | |-----------|---------|---------| | Salat | 15 | 0 | | Pasta (einfach) | 15 | 15 | | Kuchen (Rührkuchen) | 20 | 45 | | Eintopf | 30 | 90 | | Default | 20 | 30 |
- Mark with
[GESCHÄTZT - BITTE PRÜFEN]
- Consult
-
Servings (if missing):
- Standard: 4 servings
- Mark as estimated
-
Keywords:
- Generate from dish type, main ingredients
- Format: lowercase, hyphenated
- Examples:
kuchen,vegetarisch,schnell
Phase 4: JSON Generation
Purpose: Create valid Tandoor JSON.
Consult references/tandoor-schema.md for complete structure.
Required Fields Checklist:
- [ ]
name: non-empty string - [ ]
description: string (can be empty) - [ ]
keywords: array of keyword objects - [ ]
steps: array with at least one step - [ ]
working_time: integer ≥ 0 - [ ]
waiting_time: integer ≥ 0 - [ ]
internal:true - [ ]
nutrition:null - [ ]
servings: integer > 0 - [ ]
servings_text:"" - [ ]
source_url: string (can be empty)
Ingredient Structure:
{
"food": {
"name": "Mehl",
"plural_name": null,
"ignore_shopping": false,
"supermarket_category": null
},
"unit": {
"name": "g",
"plural_name": "g",
"description": null
},
"amount": 200.0,
"note": "",
"order": 0,
"is_header": false,
"no_amount": false,
"always_use_plural_unit": false,
"always_use_plural_food": false
}
Step Structure:
{
"name": "",
"instruction": "German instruction text",
"ingredients": [...],
"time": 10,
"order": 0,
"show_as_header": false,
"show_ingredients_table": true
}
Keyword Structure:
{
"name": "kuchen",
"description": "",
"created_at": "2025-01-15T14:30:00.000000+01:00",
"updated_at": "2025-01-15T14:30:00.000000+01:00"
}
Phase 5: Validation & Output
Purpose: Ensure quality and generate report.
-
Validation Tests:
| Test | Check | On Fail | |------|-------|---------| | JSON syntax |
JSON.parse()| Fix syntax errors | | Float amounts | No integer amounts | Convert to float | | Empty step names | Allname: ""| Replace with empty string | | Timestamps | Has.000000| Add microseconds | | Singular ingredients | No plurals (except exceptions) | Convert to singular | -
Quality Score Calculation:
Score = (Syntax × 0.4) + (Semantic × 0.3) + (Business × 0.3)| Score | Status | Action | |-------|--------|--------| | ≥95 | ✅ Ready | Import directly | | ≥80 | ⚠️ Warnings | Review warnings first | | ≥60 | 🔍 Review | Manual verification needed | | <60 | ❌ Reject | Needs rework |
-
Plausibility Checks:
working_time: 5-300 minuteswaiting_time: 0-1440 minutesservings: 1-20amounts: 0.001-5000
Output Format
Generate this structured output:
## Tandoor Recipe Conversion Report
**Conversion ID:** [Timestamp]
**Quality Score:** [Score]/100 [Status Emoji]
### Source Analysis
- Input type: [Image/PDF/Text/URL]
- Language detected: [Language]
- Extraction confidence: [Score]%
### Recipe Information
- Name: [Recipe name]
- Type: [Category]
- Servings: [Count]
- Total time: [Working + Waiting] minutes
### Transformations Applied
[List key transformations]
### Estimations Made
⚠️ The following values were estimated:
[List each estimation with confidence]
### Validation Results
- Syntax: ✅ Passed
- Semantic: ✅ Passed
- Business Logic: ✅ Passed
## Recipe JSON
Suggested filename: `[recipe-name-kebab-case].json`
```json
[Complete validated JSON]
```
## Next Steps
- **Claude Web:** Create an artifact with the JSON content above. The user can download it using the artifact's Download button.
- **Claude Code:** Use `/convert-recipe` command to save directly to a file.
Error Handling
When errors occur, consult references/error-handling.md for recovery strategies.
Quick Reference:
| Error | Primary Strategy | Fallback | |-------|-----------------|----------| | OCR failure | Context-based reconstruction | Minimal viable recipe with placeholders | | Unknown unit | Contextual estimation | Keep original with warning | | Missing ingredients | Pattern search for quantities | Request manual input | | Missing instructions | Generate from ingredients | Basic steps with warnings |
Additional Resources
For detailed reference tables, consult:
references/unit-conversions.md- Complete conversion tablereferences/ingredient-map.md- German normalization mapreferences/tandoor-schema.md- Full JSON structurereferences/time-estimates.md- Time by dish typereferences/error-handling.md- Recovery strategies
Scan to join WeChat group