agentleFS
cooklangcooklang/cooklang-skills/skills/validate-recipes/SKILL.md

validate-recipes

Skill8 starsChanged 10 months agoMITView on GitHub

Check Cooklang recipes for syntax errors, warnings, and best practice issues

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check .cook files for problems using CookCLI's doctor command.

    line 10
  2. Distinctive:

    Use this skill when:

    line 15
  3. Distinctive:

    Ask: "What should I validate?"

    line 25
  4. Very specific:

    Directory: - Check all .cook files in a folder

    line 27
  5. Distinctive:

    Entire collection: - Check everything from current directory

    line 28
  6. Distinctive:

    Errors: - Must fix (invalid syntax, broken references)

    line 50
  7. Distinctive:

    Warnings: - Should fix (deprecated syntax)

    line 51
  8. Distinctive:

    Ask: "Would you like me to fix these issues?"

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Validate Recipes

Overview

Check .cook files for problems using CookCLI's doctor command. Reports:

  • Syntax errors (invalid Cooklang)
  • Warnings (deprecated syntax, missing recommended fields)
  • Best practice issues (missing servings, inconsistent formatting)

Use this skill when:

  • You've written new recipes and want to check them
  • Something isn't working as expected
  • Setting up CI/CD for a recipe collection
  • Auditing an existing recipe library

Process

Step 1: Determine Scope

Ask: "What should I validate?"

  • Single recipe - Specify file path
  • Directory - Check all .cook files in a folder
  • Entire collection - Check everything from current directory

Step 2: Run Validation

For syntax validation:

cook doctor validate

For strict mode (CI/CD):

cook doctor validate --strict

For specific directory:

cook doctor validate -b /path/to/recipes

Step 3: Report Results

Present findings organized by severity:

  1. Errors - Must fix (invalid syntax, broken references)
  2. Warnings - Should fix (deprecated syntax)
  3. Suggestions - Nice to fix (missing metadata)

Step 4: Offer Fixes

For common issues, offer to fix automatically:

IssueFix
Deprecated >> metadataConvert to YAML frontmatter
Missing servingsAdd with sensible default
Multi-word ingredient without {}Add braces
Missing blank lines between stepsAdd them

Ask: "Would you like me to fix these issues?"

Step 5: Additional Checks

Check aisle configuration completeness:

cook doctor aisle

This reports ingredients not categorized in aisle.conf.

Examples

User: "Validate my recipes"

Run:

cook doctor validate

Output interpretation:

Checking recipes...

ERROR in dinner/Pasta.cook:15
  Invalid ingredient syntax: @ground black pepper
  Fix: Use @ground black pepper{} for multi-word ingredients

WARNING in breakfast/Pancakes.cook:1
  Deprecated metadata syntax: >> title: Pancakes
  Fix: Use YAML frontmatter instead

INFO in desserts/Cake.cook
  Missing 'servings' in metadata
  Suggestion: Add servings for proper scaling

Checked 24 recipes: 1 error, 1 warning, 1 suggestion

Offering fix: "I found 1 error and 1 warning. Would you like me to fix them?

  • Convert @ground black pepper to @ground black pepper{}
  • Convert deprecated >> metadata to YAML frontmatter"

Reference

Common Validation Errors

ErrorCauseSolution
Invalid ingredientMulti-word without {}Add braces: @olive oil{}
Invalid quantityMissing % for unitAdd: {500%g} not {500g}
Deprecated metadataUsing >> syntaxConvert to YAML frontmatter
Broken referenceRecipe file not foundCheck path in @./path/Recipe{}
Invalid timerBad formatUse ~{15%minutes}

Strict Mode

Strict mode (--strict) treats warnings as errors. Use for:

  • CI/CD pipelines
  • Pre-commit hooks
  • Enforcing standards in shared collections

CookCLI Doctor Commands

cook doctor              # Run all checks
cook doctor validate     # Syntax validation only
cook doctor validate --strict  # Strict mode
cook doctor aisle        # Check aisle.conf coverage
cook doctor -b ~/recipes # Specify recipe directory

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.