Helps add, edit, validate, and manage recipe data in recipes.js. Use this when the user wants to create new recipes, modify existing ones, fix recipe formatting, or validate recipe structure.
You specialize in managing recipe data for CookMode V2. You help users create, edit, and maintain recipe entries in the recipes.js file following the established schema and patterns.
Invoke this skill when the user wants to:
'recipe-slug': {
name: 'Display Name',
category: 'Entree' | 'Side' | 'Soup' | 'Dessert',
components: {
'Component Name': [
{
amount: number | string, // 2, 0.5, '1/4', '1/3'
unit: string, // 'cup', 'tbsp', 'oz', 'lb', etc.
ingredient: string, // 'carrots', 'olive oil'
prep: string // Optional: 'diced', 'minced'
}
]
},
instructions: [
'Step 1 instructions',
'Step 2 instructions'
],
notes: 'Single string' | ['Array', 'of', 'strings'],
images: ['url1.jpg', 'url2.jpg'] // optional
}
name (string): Display name of the recipecategory (string): One of: Entree, Side, Soup, Dessertcomponents (object): Ingredient lists grouped by component (array of objects)instructions (array): Step-by-step cooking instructionsnotes (string or array): Additional tips or informationimages (array): URLs to recipe photosamount: Number or fraction string
2, 0.5, 1.5'1/2', '1/4', '1/3'unit: Unit of measurement
'cup', 'tbsp', 'tsp''oz', 'lb', 'g', 'kg''large', 'medium', 'small', 'cloves', 'whole''recipe', 'pinch', 'dash'ingredient: The ingredient name
'all-purpose flour', 'cremini mushrooms''carrots', 'garlic', 'olive oil'prep: Preparation instructions
'diced', 'minced', 'sliced', 'chopped''softened', 'melted', 'room temperature''divided', 'plus more to taste', 'Pinot Noir recommended'// Simple ingredient
{ amount: 2, unit: 'cups', ingredient: 'flour' }
// With preparation
{ amount: 1, unit: 'large', ingredient: 'onion', prep: 'diced' }
// Fraction amount
{ amount: '1/4', unit: 'tsp', ingredient: 'salt' }
// Complex prep note
{ amount: 5, unit: 'large', ingredient: 'carrots', prep: 'peeled and sliced into large chunks' }
// Non-standard unit
{ amount: 1, unit: 'recipe', ingredient: 'mashed potatoes', prep: 'or serve with rice' }
Much simpler with object format!
function scaleIngredient(ingredientObj, multiplier) {
const scaledAmount = parseAmount(ingredientObj.amount) * multiplier;
return {
...ingredientObj,
amount: scaledAmount
};
}
function parseAmount(amount) {
if (typeof amount === 'number') return amount;
if (amount.includes('/')) {
const [num, den] = amount.split('/').map(Number);
return num / den;
}
return parseFloat(amount);
}
function formatIngredient(obj, orderCount = 1) {
const scaledAmount = parseAmount(obj.amount) * orderCount;
const prep = obj.prep ? `, ${obj.prep}` : '';
return `${scaledAmount.toFixed(2)} ${obj.unit} ${obj.ingredient}${prep}`;
}
// Examples:
// { amount: 2, unit: 'cups', ingredient: 'flour' }
// → "2.00 cups flour"
// { amount: 1, unit: 'large', ingredient: 'onion', prep: 'diced' }
// → "1.00 large onion, diced"
// { amount: '1/4', unit: 'tsp', ingredient: 'salt', prep: 'plus more to taste' }
// → "0.25 tsp salt, plus more to taste"
Recipes display in this category order:
Defined in /js/components/RecipeGrid.js:20
The RecipeModal.js component handles notes in two formats:
// Single note
Toast — restaurant POS, orders, menus, employees, revenue centers, and reporting.