SuperAPI AI Directory

recipe-new

Agents & models

View repository

Updated 10-23 23:07

About this skill

Your objective is to save the current pipeline as a reusable CocoRecipe template.

Pre-flight Check

Check that .cocoplus/flow.json exists and is valid JSON. If not: Output: "No valid flow.json found. A completed pipeline is required to create a recipe. Run $plan and $build first." Then stop.

Check that ~/.coco/plugins/cocoplus/recipes/ exists (Windows: %APPDATA%\coco\plugins\cocoplus\recipes\). If not writable, output the error and stop.

Check for Name Conflict

If ~/.coco/plugins/cocoplus/recipes/<name>.json.template already exists: Output: "A recipe named '' already exists. Overwrite it or choose a different name? (overwrite/rename)" Wait for response.

Parameterization Wizard

Read .cocoplus/flow.json. For each stage, present the key configurable fields one at a time:

  • label — stage name
  • agent — assigned persona
  • model — model override (if present)
  • Any stage-specific prompt parameters

For each field, ask: "Should ': ' be a fixed value or a parameter that users supply when using this recipe? (fixed/param)"

If the developer chooses param:

  • Ask: "Parameter name (e.g., target_table):"
  • Ask: "Description (one line, shown to users):"
  • Ask: "Required or optional? (required/optional)"

Replace the field value with {{parameter_name}} in the working copy.

Collect Recipe Metadata

Ask for a one-line recipe description.

Build Template File

Assemble the final template:

  • Insert __recipe_meta block at the top with: name, description, stage_count, and the parameters array (each with name, description, required fields)
  • Apply all {{param}} substitutions
  • Remaining field values stay as-is

Write Template

Write to ~/.coco/plugins/cocoplus/recipes/<name>.json.template.

Output

✓ Recipe saved: ~/.coco/plugins/cocoplus/recipes/<name>.json.template
Parameters: <param1> (required), <param2> (required), <param3> (optional)

This recipe is now available in $recipe list and $recipe use <name>.

Anti-Rationalization

Shortcut / Temptation Why It Fails
Auto-detect parameterizable fields without asking The developer knows which values are project-specific vs pipeline-generic; don't guess
Write to project-local recipes/ instead of profile folder Profile-scoped recipes are available across all projects; that's the feature value

Exit Criteria

  • <name>.json.template written to profile recipes/ folder with __recipe_meta block
  • All {{param}} slots correspond to entries in the parameters array
  • Output confirms recipe name and parameter list
  • Recipe immediately visible in $recipe list