| name | recipe-from-url |
| description | Create a recipe file from a URL by fetching content, formatting it according to the project template, and saving it to the appropriate category directory. Use when asked to add, create, or save a recipe from a URL. |
| allowed-tools | WebFetch, Read, Write, Glob, Grep, Bash, AskUserQuestion, mcp__claude-in-chrome__navigate, mcp__claude-in-chrome__get_page_text, mcp__claude-in-chrome__tabs_create_mcp, mcp__claude-in-chrome__tabs_context_mcp |
Recipe from URL
Instructions
When creating a recipe from a URL, follow these steps:
1. Check for Existing Similar Recipes
Before creating a new recipe:
- Use Glob/Grep to search for similar recipe names in relevant categories
- If duplicate found, ask user to update existing, create variant, or skip
- Only proceed if confirmed or clearly distinct
2. Fetch and Parse Recipe Content
Try fetching in this order, stopping at the first success:
Step 2a โ WebFetch (fast, no browser needed):
Use WebFetch. If it returns a 403, bot-detection page ("Just a moment...", "Checking your browser..."), or clearly empty/truncated content, proceed to Step 2b.
Step 2b โ claude-in-chrome (real browser, your existing session):
Invoke the claude-in-chrome skill, then:
tabs_create_mcp to open the URL in a new tab (your real Chrome session already passes bot/Cloudflare checks)
get_page_text to extract the rendered page content
- If a challenge page appears ("Just a moment...", CAPTCHA), tell the user to solve it in the open tab, then retry
get_page_text
If claude-in-chrome tools are unavailable (no extension connected) or the user prefers not to use it, ask the user to paste the page content directly into the chat.
3. Determine Category
Analyze the recipe type and select the appropriate category directory:
- main: Main dishes, proteins, curries, stews, casseroles, general entrees
- dessert: Desserts, cakes, cookies, treats, sweet items
- pasta: Pasta dishes
- soup: Soups, broths, stews (liquid-based)
- drinks: Cocktails, mocktails, beverages
- breakfast: Breakfast items, eggs, pancakes, waffles
- poultry: Chicken and other poultry dishes
- sushi: Sushi rolls and nigiri
- seafood: Fish, shrimp, and other seafood
- bread: Breads, focaccia, pretzels, baked goods
- sides: Side dishes
- reference: Guides, technique references, sauces, spice blends, how-tos
If unsure between categories, use AskUserQuestion to confirm.
4. Generate Filename
Convert title to snake_case (lowercase, no special chars): "Chocolate Chip Cookies" โ chocolate_chip_cookies.dj
5. Format Recipe Content
Use this template structure:
# [Recipe Title]
Based on [URL](URL)
{ rating=0 image="None" }
:::
:::
## Ingredients
- [ ] [first ingredient used - in preparation order]
- [ ] [second ingredient used]
- [ ] [third ingredient used]
(or with grouping for distinct components:)
### [Component 1]
- [ ] [ingredient]
- [ ] [ingredient]
### [Component 2]
- [ ] [ingredient]
- [ ] [ingredient]
## Recipe
1. [Step 1]
1. [Step 2]
## Notes
- [Optional notes, tips, variations]
Key Formatting Rules:
- Title: Original title in Title Case
- URL: Truncate if very long (
https://cooking.nytimes.com/recipes/...)
- Metadata:
rating=0 image="None"
- Ingredients:
- Checkbox format:
- [ ]
- Order in preparation order (as used in steps)
- Conversions (apply automatically):
- Fractional characters to plain text:
ยฝ โ 1/2, ยผ โ 1/4, ยพ โ 3/4, โ
โ 1/3, โ
โ 2/3, โ
โ 1/8, โ
โ 3/8, โ
โ 5/8, โ
โ 7/8
- Mixed numbers:
1 ยฝ โ 1.5, 2 ยผ โ 2.25, 1 โ
โ 1.33, 2 โ
โ 2.67
- "teaspoon(s)" โ
tsp
- "tablespoon" โ
Tbsp, "tablespoons" โ Tbsps
- Track quantity changes: Note any changes to measurements/amounts to report after saving
- Group using
### [Label] subheaders or nested lists (2-space indent) only for distinct components
- Recipe Steps: Numbered lists (
1.), preserve details, minimal rewording
- Notes: Include tips, variations, or important details
6. Writing Style
Kyle's style: Direct, concise, minimal changes. Preserve measurements and technical precision. Only adapt formatting, not content.
7. Save File and Report Changes
- Write file to:
content/[category]/[filename].dj
- Confirm file creation
- Report quantity changes only: If you modified any measurements/amounts from source (e.g., "1 cup butter" โ "2 sticks butter", combined duplicate ingredients with adjusted quantities), list these changes. Standard conversions (fractional characters, unit abbreviations) don't need to be reported.
Examples
Simple Recipe:
- WebFetch URL โ Extract title, ingredients (apply conversions: "ยฝ cup" โ "1/2 cup", "2 teaspoons" โ "2 tsp"), steps
- Category:
pasta, Filename: simple_pasta.dj
- Format and write to
content/pasta/simple_pasta.dj
- Report: "Created simple_pasta.dj" (standard conversions applied, no substantive quantity changes)
403/Bot-blocked Recipe:
- WebFetch returns 403 or bot-detection page
- Invoke
claude-in-chrome skill, open the URL in a new tab, extract with get_page_text
- Continue from step 3 (category) as normal
Recipe with Quantity Changes:
If source has "4 ounces butter" but you convert to "1 stick butter", report: "Changed '4 ounces butter' to '1 stick butter'"
Critical Rules
- Check for duplicates first (Glob/Grep existing recipes)
- Use only source URL information (no hallucination)
- Apply automatic conversions: fractional characters (ยฝ โ 1/2, โ
โ 1/8), mixed numbers (1 ยฝ โ 1.5), "teaspoon(s)" โ "tsp", "tablespoon(s)" โ "Tbsp/Tbsps"
- Order ingredients in preparation order
- Group only when components are clearly distinct
- Report only substantive quantity/measurement changes (not standard conversions)
- No emojis in recipe files
- snake_case filenames only