Recipe to List
简介
Recipe to List
原始描述
Turn recipes into a Todoist Shopping list. Extract ingredients from recipe photos (Gemini Flash vision) or recipe web pages (search + fetch), then compare against the existing Shopping project with conservative synonym/overlap rules, skip pantry staples (salt/pepper), and sum quantities when units match. Also saves each cooked recipe into the workspace cookbook (recipes/).
通过你的 Agent 添加
安装目录:recipe-to-list/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: recipe-to-list
description: Turn recipes into a Todoist Shopping list. Extract ingredients from recipe photos (Gemini Flash vision) or recipe web pages (search + fetch), then compare against the existing Shopping project with conservative synonym/overlap rules, skip pantry staples (salt/pepper), and sum quantities when units match. Also saves each cooked recipe into the workspace cookbook (recipes/).
Create Shopping List (Gemini Flash + Todoist)
Target flow:
- Input is either a photo or a recipe web search
- Extract ingredients (Gemini Flash for photos; web_fetch text → Gemini for websites)
- Pull current Todoist Shopping list
- Compare using overlap + synonym mapping (kept conservative; only merge high-confidence equivalents like coriander↔cilantro, panko↔breadcrumbs)
- Update Shopping (default: add only missing items; skip salt/pepper)
Use the bundled script to handle the photo → ingredients → Shopping update part.
It also automatically saves a markdown entry into recipes/ (your cookbook knowledge base) and appends to recipes/index.md.
For recipe-name → web search, do it confirm-first using web_search + web_fetch, then feed the ingredients into the same update logic (and save the recipe).
Prereqs
- Env:
GEMINI_API_KEY (or GOOGLE_API_KEY) for Gemini
- Env:
TODOIST_API_TOKEN for Todoist
- Bin:
todoist (todoist-ts-cli)
Output formatting + grouping
- Items are reformatted to start with the ingredient name, followed by a parenthetical quantity (e.g.,
egg yolks (8 large)).
- Items are assigned to grocery groups and moved into Todoist sections in the Shopping project: Produce, Dairy & Eggs, Meat & Fish, Frozen, Snacks & Sweets, Household & Non-Food, Drinks.
- Items classified as other are left in the general (no section).
Run
python3 skills/recipe-to-list/scripts/recipe_to_list.py \
--image /path/to/photo.jpg \
--title "<optional title>" \
--source "photo:/path/to/photo.jpg"
Optional flags
--model gemini-2.0-flash (default; falls back automatically) or any compatible Gemini vision model
--dry-run to print extracted items without creating tasks
--prefix "[Recipe] " to prefix each created task
--no-overlap-check to skip checking your existing Shopping list
--include-pantry to include salt/pepper
--no-save to skip saving into recipes/
What to send to the model
GEMINI_API_KEY (or GOOGLE_API_KEY) for GeminiTODOIST_API_TOKEN for Todoisttodoist (todoist-ts-cli)- Items are reformatted to start with the ingredient name, followed by a parenthetical quantity (e.g.,
egg yolks (8 large)). - Items are assigned to grocery groups and moved into Todoist sections in the Shopping project: Produce, Dairy & Eggs, Meat & Fish, Frozen, Snacks & Sweets, Household & Non-Food, Drinks.
- Items classified as other are left in the general (no section).
Run
python3 skills/recipe-to-list/scripts/recipe_to_list.py \
--image /path/to/photo.jpg \
--title "<optional title>" \
--source "photo:/path/to/photo.jpg"
Optional flags
python3 skills/recipe-to-list/scripts/recipe_to_list.py \
--image /path/to/photo.jpg \
--title "<optional title>" \
--source "photo:/path/to/photo.jpg"
--model gemini-2.0-flash(default; falls back automatically) or any compatible Gemini vision model--dry-runto print extracted items without creating tasks--prefix "[Recipe] "to prefix each created task--no-overlap-checkto skip checking your existing Shopping list--include-pantryto include salt/pepper--no-saveto skip saving intorecipes/
What to send to the model
The script prompts Gemini to return strict JSON:
{
"items": ["2 large globe eggplants", "kosher salt", "..."],
"notes": "optional"
}
If parsing fails, rerun with a clearer crop (ingredients list only) or provide a manual list.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。