jpskill.com
💬 コミュニケーション コミュニティ

recipe-manager

レシピデータ(recipes.js)の追加、編集、検証、管理を支援し、ユーザーが新しいレシピ作成、既存レシピの修正、書式修正、構造検証を行いたい場合に活用できるSkill。

📜 元の英語説明(参考)

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.

🇯🇵 日本人クリエイター向け解説

一言でいうと

レシピデータ(recipes.js)の追加、編集、検証、管理を支援し、ユーザーが新しいレシピ作成、既存レシピの修正、書式修正、構造検証を行いたい場合に活用できるSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o recipe-manager.zip https://jpskill.com/download/16999.zip && unzip -o recipe-manager.zip && rm recipe-manager.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16999.zip -OutFile "$d\recipe-manager.zip"; Expand-Archive "$d\recipe-manager.zip" -DestinationPath $d -Force; ri "$d\recipe-manager.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して recipe-manager.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → recipe-manager フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] recipe-manager

レシピマネージャースキル

あなたの役割

あなたは CookMode V2 のレシピデータ管理を専門としています。確立されたスキーマとパターンに従って、ユーザーが recipes.js ファイル内のレシピエントリを作成、編集、および維持するのを支援します。

このスキルを使用するタイミング

ユーザーが以下を希望する場合、このスキルを発動してください。

  • 新しいレシピの追加
  • 既存のレシピの編集
  • レシピのフォーマットまたは構造の修正
  • レシピデータの検証
  • レシピ形式の変換
  • レシピプロパティの一括更新

レシピデータスキーマ(構造化オブジェクト形式)

標準的なレシピ構造

'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): レシピの表示名
  • category (string): 次のいずれか: Entree, Side, Soup, Dessert
  • components (object): コンポーネントごとにグループ化された材料リスト(オブジェクトの配列)
  • instructions (array): ステップごとの調理手順

オプションフィールド

  • notes (string または array): 追加のヒントまたは情報
  • images (array): レシピ写真への URL

材料オブジェクト構造

必須フィールド(材料ごと)

  • amount: 数値または分数文字列
    • 数値: 2, 0.5, 1.5
    • 分数: '1/2', '1/4', '1/3'
  • unit: 測定単位
    • 容量: 'cup', 'tbsp', 'tsp'
    • 重量: 'oz', 'lb', 'g', 'kg'
    • 個数: 'large', 'medium', 'small', 'cloves', 'whole'
    • その他: 'recipe', 'pinch', 'dash'
  • ingredient: 材料名
    • 説明的: 'all-purpose flour', 'cremini mushrooms'
    • 単純: 'carrots', 'garlic', 'olive oil'

オプションフィールド(材料ごと)

  • prep: 準備手順
    • 切り方: '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' }

スケーリングロジック(新規)

オブジェクト形式でははるかに簡単です!

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"

カテゴリの順序

レシピは次のカテゴリ順に表示されます。

  1. Entree
  2. Side
  3. Soup
  4. Dessert

/js/components/RecipeGrid.js:20 で定義されています。

Notes フィールドの処理

RecipeModal.js コンポーネントは、次の 2 つの形式で notes を処理します。

  1. String: 単一の段落としてレンダリング
  2. Array: 各項目を個別の段落としてレンダリング
// Single note
notes: "Use a hand mixer for whipped texture."

// Multiple notes
notes: [
    "Use a hand mixer for whipped texture.",
    "Pairs well with mushroom bourguignon."
]

コンポーネントグループ

一般的なコンポーネントパターン:

  • シンプルなレシピ: 単一のコンポーネント(例:'Ingredients')
  • 複雑なレシピ: 複数のコンポーネント(例:'Dough'、'Filling'、'Topping')
  • ソース: 多くの場合、別のコンポーネント(例:'Base'、'Sauce')

検証チェックリスト

レシピを追加/編集するときは、以下を確認してください。

  • [ ] Slug は kebab-case (小文字、ハイフン) であること
  • [ ] Name は人間が読める形式であること
  • [ ] Category は次のいずれかであること: Entree, Side, Soup, Dessert
  • [ ] すべての材料が amountunitingredient フィールドを持つオブジェクトであること
  • [ ] amount は数値または分数文字列 ('1/2', '1/4') であること
  • [ ] unit は文字列であること (空でないこと)
  • [ ] ingredient は文字列であること (空でないこと)
  • [ ] prep はオプションの文字列であること
  • [ ] Components オブジェクトに少なくとも 1 つのエントリがあること
  • [ ] 各コンポーネントに材料オブジェクトの配列があること
  • [ ] Instructions 配列に少なくとも 1 つのステップがあること
  • [ ] Notes フィールドは文字列または配列であること (オブジェクトではないこと)
  • [ ] Images は有効な URL であること (提供されている場合)
  • [ ] 配列/オブジェクトに末尾のカンマがないこと
  • [ ] 適切な JavaScript 構文であること

一般的なタスク

新しいレシピの追加

  1. kebab-case の slug を作成する
  2. スキーマ構造 (オブジェクト形式) に従う
  3. すべての材料に amountunitingredient フィールドがあることを確認する
  4. 準備に関する注記のためにオプションの prep フィールドを追加する
  5. 適切なカテゴリに追加する
  6. 構文を検証する

文字列形式からオブジェクト形式への変換

古い文字列形式:

'2 cups all-purpose flour, sifted'

**Ne

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Recipe Manager Skill

Your Role

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.

When to Use This Skill

Invoke this skill when the user wants to:

  • Add a new recipe
  • Edit an existing recipe
  • Fix recipe formatting or structure
  • Validate recipe data
  • Convert recipe formats
  • Bulk update recipe properties

Recipe Data Schema (Structured Object Format)

Standard Recipe Structure

'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
}

Required Fields

  • name (string): Display name of the recipe
  • category (string): One of: Entree, Side, Soup, Dessert
  • components (object): Ingredient lists grouped by component (array of objects)
  • instructions (array): Step-by-step cooking instructions

Optional Fields

  • notes (string or array): Additional tips or information
  • images (array): URLs to recipe photos

Ingredient Object Structure

Required Fields (per ingredient)

  • amount: Number or fraction string
    • Numbers: 2, 0.5, 1.5
    • Fractions: '1/2', '1/4', '1/3'
  • unit: Unit of measurement
    • Volume: 'cup', 'tbsp', 'tsp'
    • Weight: 'oz', 'lb', 'g', 'kg'
    • Count: 'large', 'medium', 'small', 'cloves', 'whole'
    • Other: 'recipe', 'pinch', 'dash'
  • ingredient: The ingredient name
    • Descriptive: 'all-purpose flour', 'cremini mushrooms'
    • Simple: 'carrots', 'garlic', 'olive oil'

Optional Fields (per ingredient)

  • prep: Preparation instructions
    • Cutting: 'diced', 'minced', 'sliced', 'chopped'
    • State: 'softened', 'melted', 'room temperature'
    • Additional: 'divided', 'plus more to taste', 'Pinot Noir recommended'

Examples

// 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' }

Scaling Logic (New)

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);
}

Display Formatting

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"

Category Order

Recipes display in this category order:

  1. Entree
  2. Side
  3. Soup
  4. Dessert

Defined in /js/components/RecipeGrid.js:20

Notes Field Handling

The RecipeModal.js component handles notes in two formats:

  1. String: Renders as single paragraph
  2. Array: Renders each item as separate paragraph
// Single note
notes: "Use a hand mixer for whipped texture."

// Multiple notes
notes: [
    "Use a hand mixer for whipped texture.",
    "Pairs well with mushroom bourguignon."
]

Component Groups

Common component patterns:

  • Simple recipes: Single component (e.g., 'Ingredients')
  • Complex recipes: Multiple components (e.g., 'Dough', 'Filling', 'Topping')
  • Sauces: Often separate component (e.g., 'Base', 'Sauce')

Validation Checklist

When adding/editing recipes, verify:

  • [ ] Slug is kebab-case (lowercase, hyphens)
  • [ ] Name is human-readable
  • [ ] Category is one of: Entree, Side, Soup, Dessert
  • [ ] All ingredients are objects with amount, unit, ingredient fields
  • [ ] amount is a number or fraction string ('1/2', '1/4')
  • [ ] unit is a string (never empty)
  • [ ] ingredient is a string (never empty)
  • [ ] prep is optional string
  • [ ] Components object has at least one entry
  • [ ] Each component has array of ingredient objects
  • [ ] Instructions array has at least one step
  • [ ] Notes field is string OR array (not object)
  • [ ] Images are valid URLs (if provided)
  • [ ] No trailing commas in arrays/objects
  • [ ] Proper JavaScript syntax

Common Tasks

Adding a New Recipe

  1. Create kebab-case slug
  2. Follow schema structure (object format)
  3. Ensure all ingredients have amount, unit, ingredient fields
  4. Add optional prep field for preparation notes
  5. Add to appropriate category
  6. Validate syntax

Converting String Format to Object Format

Old string format:

'2 cups all-purpose flour, sifted'

New object format:

{ amount: 2, unit: 'cups', ingredient: 'all-purpose flour', prep: 'sifted' }

Use ChatGPT/Claude to batch convert:

"Convert these recipe ingredients to structured format with amount, unit, ingredient, prep fields"

Converting Recipes

When importing from external sources:

  1. Extract name, category, ingredients, instructions
  2. Group ingredients into components
  3. Format ingredients with quantities first
  4. Convert steps to array
  5. Add to recipes.js

File Location

recipes.js: /Users/adamfehse/Documents/gitrepos/cookmodeV2/recipes.js

This file is loaded as a global window.RECIPES object and accessed by:

  • App.js - Passes to RecipeGrid and RecipeModal
  • RecipeGrid.js - Displays cards and filters
  • RecipeModal.js - Shows full recipe details

Best Practices

  1. Keep it simple: Pico CSS philosophy applies to data too
  2. Consistent formatting: Follow existing patterns
  3. Clear component names: 'Sauce', 'Dough', 'Filling' not 'Component 1'
  4. Precise quantities: Include unit of measure
  5. Actionable instructions: Each step should be clear

Example: Adding a New Recipe (New Object Format)

'chocolate-chip-cookies': {
    name: 'Chocolate Chip Cookies',
    category: 'Dessert',
    components: {
        'Dough': [
            { amount: 2, unit: 'cups', ingredient: 'all-purpose flour' },
            { amount: 1, unit: 'tsp', ingredient: 'baking soda' },
            { amount: 0.5, unit: 'tsp', ingredient: 'salt' },
            { amount: 1, unit: 'cup', ingredient: 'butter', prep: 'softened' },
            { amount: 0.75, unit: 'cup', ingredient: 'granulated sugar' },
            { amount: 0.75, unit: 'cup', ingredient: 'brown sugar' },
            { amount: 2, unit: 'large', ingredient: 'eggs' },
            { amount: 2, unit: 'tsp', ingredient: 'vanilla extract' }
        ],
        'Mix-ins': [
            { amount: 2, unit: 'cups', ingredient: 'chocolate chips' }
        ]
    },
    instructions: [
        'Preheat oven to 375°F.',
        'Mix flour, baking soda, and salt in a bowl.',
        'Cream butter and sugars until fluffy.',
        'Beat in eggs and vanilla.',
        'Gradually blend in flour mixture.',
        'Stir in chocolate chips.',
        'Drop rounded tablespoons onto ungreased cookie sheets.',
        'Bake 9-11 minutes or until golden brown.'
    ],
    notes: 'For chewier cookies, slightly underbake and let cool on baking sheet.'
}

ChatGPT Conversion Prompt

Use this to convert existing recipes:

Convert this recipe to JavaScript object format with the following structure:
- amount: number or fraction string ('1/2', '1/4')
- unit: string (cup, tbsp, tsp, oz, lb, etc.)
- ingredient: string (the ingredient name)
- prep: string (optional, preparation notes like 'diced', 'softened')

[Paste recipe here]

Remember: Keep recipes cook-friendly and maintainable!