3.9 KiB
name, description
| name | description |
|---|---|
| cook | Capture and search recipes and tea notes (brewing parameters, origins, tasting notes) in the cook/ directory — one markdown file per item. Triggers on: "cook: X", "zapiš recept X", "save recipe X", "co mám na X" (tea/food lookup), "čaj X", tea temperature/time questions against stored notes. For growing personal food & tea knowledge — not a one-off task or a durable user fact. |
Cook
Recipes and tea notes in cook/, one markdown file per item. No inbox, no
pipeline, no background compile — capture is inline in the same turn.
All file mutations go through the safety script. Frontmatter is generated only by the script, never by hand — it cannot drift.
uv run skills/cook/scripts/cook.py <cmd> ...
Layout
cook/
├── recepty/ ← recepty/<slug>.md (type: recept)
├── caj/ ← caj/<slug>.md (type: caj)
└── assets/ ← cook/assets/<slug>/ (only if a document/photo ever arrives)
Slugs: kebab-case, descriptive (gulas-classic.md, sencha-japonsko.md).
Subdirs are created by the script on first add.
Frontmatter (script-generated)
type: recept | caj # the only fixed value
category: volná hodnota # polévka, hlavní-chod / zelený, černý...
cuisine: volná # recepts only
origin: volná # caj only
tags: [chata, zima] # user hashtags, no '#'
added: 2026-09-08 # auto
Taxonomy is deliberately free-form — it settles over time, don't force enums.
Capture (inline, same turn)
add <slug> --type recept|caj [--category C] [--cuisine C] [--origin O] [--tags a,b]with the body on stdin (heredoc). The script creates the file with frontmatter + body and prints the path. Exit 1 if the slug exists.- Slug collision →
showthe existing item, ask the user: update it viaedit, or file as a new slug (gulas-hrachova). Never auto-suffix-2. - Commit:
git add cook/ && git commit -m "cook: add <slug>". Stage onlycook/— nevergit add -A. - Confirm the file path and quote what was filed.
Language: user's (Czech), verbatim where sensible. New content appends at the end of a file; never insert into the middle.
Body formats — conventions, not rigid schemas
Recipe: # <název>, Ingredience, Postup, Zdroj, Poznámky.
Tea: # <název čaje>, Země/Typ/Teplota/Čas, Poznámky (chuť, vůně,
odkud koupeno). Adapt to what the user sends; don't force empty fields.
Search / answer
- Narrow via script:
list [--type T] [--category C] [--tag X](frontmatter filters) and/orsearch <text>(fulltext across bodies). - Read the shortlisted files (
show <slug>orread_file), answer from the files only — no confabulation. If not covered, say so. - Read-only: never modify files in a search turn.
Edit / delete — hard-gated TWO-TURN flow
- Turn 1 (no mutation):
edit <slug>prints the path + full text. Show the user the exact verbatim text (or before → after), ask to confirm. STOP. - Turn 2 (explicit confirmation only): apply body changes with a surgical
edit_fileon the script-printed path (frontmatter stays untouched), ordelete <slug>/rename <old> <new>. Then commit:git add cook/ && git commit -m "cook: edit|delete|rename <slug>".
rename also moves cook/assets/<old>/ if present. delete removes the
assets dir only when empty — non-empty assets block silent data loss.
House rules
- Script guards:
addon existing slug,edit/delete/renameon missing slug → exit 1. Never bypass the script bywrite_file-ing intocook/(except surgical body edits viaedit_file/apply_patchafteradd). validatechecks frontmatter integrity — run it if files were touched by anything other than the script.- Surgical edits only — never reformat or rewrite stored recipes/notes unless asked.