recipe-diagrams
Recipe diagrams: convert any recipe into a Cooking for Engineers-style ASCII process-flow table with aligned ingredient streams, preparation branches, joins, temperatures, timings, and finish steps. Use when the user asks for a recipe diagram.
- License 许可
- MIT
- 所属仓库
- sanurb/.dotfiles
- 最近更新
- 2026-11-13
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- recipe-diagrams
- description
- Recipe diagrams: convert any recipe into a Cooking for Engineers-style ASCII process-flow table with aligned ingredient streams, preparation branches, joins, temperatures, timings, and finish steps. Use when the user asks for a recipe diagram.
- compatibility
- Requires Python 3.
- disable-model-invocation
- true
02 资源文件 1
- 脚本scripts/render_recipe_diagram.py14.8 KB
03 SKILL.md 正文
Recipe diagrams
Convert the recipe into a dependency graph, then render that graph as a Cooking for Engineers-style ASCII table. Read the table left to right: ingredient rows are streams, columns are stages, and vertically merged action cells are joins.
Steps
-
Normalize the source. Read the complete recipe, including yield, ingredient headings, ingredient preparation, numbered method, notes that alter execution, and any linked source the user supplied. Preserve quantities, equipment, temperatures, times, sensory completion cues, resting/cooling, and serving steps. The source is normalized when every execution-relevant source statement has one prospective home in the diagram.
-
Build the dependency graph. Separate global setup from ingredient streams and operations. Treat an ingredient's inline preparation (for example,
onion, diced) as an operation unless it is purchased in that state. Split an ingredient into labeled portions when the source uses it at different stages. Keep independent preparations in the same column when order does not matter; place dependent operations in later columns. The graph is complete when every ingredient reaches every operation that consumes it and all operations lead to the finished result. -
Make the graph planar. Order ingredient rows so every operation consumes one contiguous row range. Each later join spans the complete ranges of the intermediates it combines. Add columns until actions in one column have disjoint row ranges. The layout is complete when no action range is discontinuous and no two action ranges overlap within a column.
-
Encode the layout. Write a temporary JSON file using the schema below. Keep labels imperative and compact, but retain execution details. Use plain strings; the renderer transliterates symbols to ASCII.
{
"title": "Recipe name",
"yield": "about 10 servings",
"setup": [
"Butter and flour a loaf pan",
"Preheat oven to 350 deg F (170 deg C)"
],
"ingredients": [
"2 large (250 g) ripe bananas",
"6 Tbsp (90 mL) butter"
],
"columns": [
{
"actions": [
{ "rows": [0, 0], "label": "mash" },
{ "rows": [1, 1], "label": "melt" }
]
},
{
"actions": [
{ "rows": [0, 1], "label": "mix until smooth" }
]
}
]
}
rows is an inclusive, zero-based ingredient-row range. A blank stage cell means that stream carries forward unchanged. A cell spanning several rows consumes those ingredients or the intermediates already produced from them. Put pan preparation, preheating, and other recipe-wide prerequisites in setup; put cooking, cooling, garnishing, and serving in action columns at their actual dependency point.
-
Audit before rendering. Compare the JSON against the source. Verify every ingredient and portion, every operation, all ordering constraints, and all execution details exactly once. Preserve genuine alternatives in the relevant label. Mark source uncertainty with
[?]and explain it after the diagram rather than inventing a resolution. The audit is complete only when every source item is accounted for. -
Render and return. Resolve
scripts/render_recipe_diagram.pyrelative to thisSKILL.md, then run:
python3 scripts/render_recipe_diagram.py /tmp/recipe-diagram.json --width 120
Increase --width when the renderer reports that the diagram is too narrow. Return its stdout in a fenced text block without editing spacing. If [?] appears, follow the block with a short Uncertainties list. The output is complete when the renderer exits successfully, every line between the outer borders has identical length, and every output character is ASCII.
04 同仓库更多 Skills
turnstile-spin
Set up Cloudflare Turnstile end-to-end in a project — scan the codebase, create the widget via the Cloudflare API, deploy the managed siteverify Worker, write the frontend snippets, validate, and persist the skill. Load this when a user asks to add Turnstile, set up CAPTCHA, protect a form from bots, or fix a Turnstile integration. Mirrors developers.cloudflare.com/turnstile/spin.
writing-great-skills
Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.
write-discoverable-code
Rules for writing code that coding agents (and humans) can find and understand through plain-text search. Apply whenever writing or renaming code: functions, types, constants, files, error messages, doc comments. Grounded in measurement: agents navigate by plain-text search, not by AST or language server, so every identifier is a search query and every search miss costs wasted reads.
wrangler
Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
workers-best-practices
Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
web-perf
Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (LCP, INP, CLS) and supplementary metrics (FCP, TBT, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.