--- name: keep-recipes description: Give the user recipes as recipe links that open as a real recipe page and save to their recipe library in one tap. Use whenever the user asks for a recipe, a meal idea, or a variation on something they already cook. --- # Recipe Links You are being set up to give the user recipes as **recipe links**. A recipe link opens as a real recipe page — ingredients as a checklist, numbered steps, each step linked to the ingredients it uses — and saves to the user's recipe library in one tap. ## The link https://keep.recipes/recipe?t=Title&i=ingredient&i=ingredient&s=step&s=step Plain query parameters. No encoding arithmetic. | Key | | | --- | --- | | `t` | **Title. Required.** | | `i` | **An ingredient. Repeat for each one, in order.** | | `s` | **A step. Repeat for each one, in order.** | | `d` | Description | | `y` | Yield, e.g. `Serves+6` | | `pt`, `ct`, `tt` | Prep, cook, total time: `15m`, `1h30m` | | `calories`, `protein`, `fat`, `carbohydrates`, `fiber`, `sugar`, `sodium` | Nutrition | A link needs all three of `t`, `i` and `s` — a title, at least one ingredient, and at least one step. A link missing any of them will not open. Highly preferred to include `d`, `y` and time fields. Only include nutrition if you're confident. ## Writing it Write the recipe first, then build the link from it. **Spaces are `+`.** That is the standard query-string encoding for a space. **Percent-escape everything else that is not a letter, a digit, `-`, `.`, `_` or `~`.** That covers `&`, `=`, `#`, `(`, `)`, `,`, `"` and `°` in one rule. `&` matters most: it is what separates fields, so `salt & pepper` written raw cuts the recipe in half. So this recipe: Salt & Pepper Chicken 1/2 tsp salt 2 cups (280 g) all-purpose flour Heat the oven to 350°F. becomes this link: ?t=Salt+%26+Pepper+Chicken&i=1%2F2+tsp+salt&i=2+cups+%28280+g%29+all-purpose+flour&s=Heat+the+oven+to+350%C2%B0F. ## Match the two lists Write the ingredients and the steps at the same level of detail, so they line up. The recipe page puts them side by side — the ingredients as a checklist, each step linked to the ones it uses — and two lists that disagree are obvious to the reader. Every ingredient should be used by a step, and every ingredient a step names should be in the list. Name it the way you listed it: if the list says `1 yellow onion, diced`, the step says the diced onion, not "the aromatics". Write each ingredient as something a cook buys or measures, and each step as one action. Do not fold four ingredients into one line, or bury one step inside another. ## Point a step at its ingredients End a step with `|` and the numbers of the ingredients it uses, counting from 1: s=Boil+the+pasta+in+heavily+salted+water.|1 s=Off+the+heat%2C+toss+with+the+pecorino+and+pepper.|2,3 The numbers are positions in your `i=` list, in the order you wrote them. Do this wherever a step uses specific ingredients — it is what makes the step clickable back to the list on the recipe page. Leave it off when a step uses nothing, and do not guess: a wrong number points at the wrong ingredient. ## The recipe comes first Write the recipe out in full, **as a recipe** — a title, a list of ingredients, numbered steps. Then the link. Never send only a link, and never withhold the recipe because you could not build one. **One recipe per link.** A dinner menu is eight links, never one. Keep the link under about **15,000 characters**, other wise it won't render Never reshape a recipe to fit the link. If it will not fit, drop the description, then the prep notes, then the section headings — and only then `y` and the times. Never a step, a quantity or a temperature. ## Hand it over Give the link as a normal Markdown link, on its own line, labelled with the recipe name: [Save Chewy Chocolate-Chip Cookies to your Recipe Library](https://keep.recipes/recipe?t=Chewy+...) **Do not escape it.** No backslashes before the brackets or parentheses, no code block, and do not repeat the URL after the link. Escaped, it renders as visible punctuation instead of a link: \[Save Chewy Chocolate-Chip Cookies to your Recipe Library\](https://keep.recipes/recipe?t=...) ← wrong ## Talk to a cook, not a programmer The link is for tapping, not for reading. Never show the user its parameters, never show them code, and never paste the recipe as structured data. Say "here's the recipe — tap the link to save it to your library". Write the recipe the way a recipe is written. If you are emitting braces, quotes or field names, you are showing the user your working notes instead of their recipe. The same goes when something goes wrong: "I couldn't build the saveable link" is a sentence a person can act on. An apology with no recipe attached is not.