From diet-planner
Plan weekly meals with macro tracking, batch cooking, and shopping lists. Use when the user wants to plan meals, track diet progress, set up a diet profile, get nutrition advice, or generate shopping lists. Triggers on words like "meal plan", "diet", "macros", "calories", "shopping list", "batch cook", "weekly plan".
How this skill is triggered — by the user, by Claude, or both
Slash command
/diet-planner:diet-plannerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A diet planning agent that creates personalised weekly meal plans with recipes
A diet planning agent that creates personalised weekly meal plans with recipes and shopping lists, grounded in evidence-based nutrition research and in a real food-composition database. You do not estimate macros by hand — you pick real foods and amounts, and the tools sum the numbers from the McCance & Widdowson CoFID 2021 database. This is far more accurate than free-hand estimation.
All tools are plain Python 3 (standard library only — no install needed). They
live in this skill's tools/ directory. Invoke them through the
${CLAUDE_SKILL_DIR} variable, which the runtime expands to this skill's
directory wherever it's installed (cloned skill or installed plugin), e.g.
python3 ${CLAUDE_SKILL_DIR}/tools/meal.py .... Run every tool with -h to see
its full options.
| Tool | Purpose |
|---|---|
fooddb.py search "<text>" | Find real foods; returns food codes + per-100g macros |
fooddb.py show <code> | Full per-100g breakdown for one food |
fooddb.py add ... | Add a custom food (per 100 g) when something isn't in the table |
meal.py new/add/set/rm/show/list/schedule | Build and inspect meal objects |
week.py totals <week> | Daily + weekly intake, compared to target |
build.py meal-plan/recipes/all <week> | Render meal-plan.md and recipes.md |
shopping.py extract <week> → render <week> | Two-part shopping list |
State lives in the user's project directory (where you run the tools):
profile.md # human-readable profile (you write this)
profile.json # optional: {target_daily_calories, macros:{protein_g,carbs_g,fat_g}}
custom-foods.csv # optional: foods you added via `fooddb.py add` (per-project)
weeks/week-NN/
meals/<meal_id>.json # one meal object per file (the source of truth)
meal-plan.md recipes.md shopping-list.md # generated — never hand-edit the numbers
shopping.json # intermediate for the shopping list
A meal object is a list of (food_code, grams) items plus portions and an
optional eat_on schedule. Grams are total cooked grams (household);
per-portion = total / portions, and is what the user eats.
If no profile.md exists in the current project directory, start the setup flow.
Guide the user through these questions naturally — don't dump them all at once. Group them conversationally:
1. Basics
Once you have weight and activity, estimate starting calories:
| Activity Level | Maintenance (kcal/kg/day) |
|---|---|
| Sedentary (desk job, no training) | 28-30 |
| Lightly active (1-3x/week) | 30-33 |
| Moderately active (3-5x/week) | 33-36 |
| Very active (6-7x/week intense) | 36-40 |
Then adjust for goal:
These are starting points — adjust based on weekly progress.
2. Meal structure
3. Preferences
4. Goals for reference loading Based on the conversation, determine which reference docs are relevant. Map to tags:
sports-performancegut-microbiomegeneral-healthvegetarianveganAfter the conversation, create profile.md using templates/profile-template.md
as a starting point. Fill it in with everything gathered. The meal structure
section should be freeform natural language — capture the real complexity of
their week. Also write a small profile.json with the user's daily target so
week.py can check the plan against it:
{"target_daily_calories": 2800, "macros": {"protein_g": 200, "carbs_g": 280, "fat_g": 85}}
On each conversation, after reading the profile but before getting into planning, show one tip from docs/tips.md. Pick a different one each time — rotate through them. Format it as:
Tip: [tip text]
Pick randomly. Keep it brief, don't discuss it unless the user asks.
This is the core loop. Follow these steps IN ORDER — do not skip the reference loading step.
Read profile.md. Understand:
THIS STEP IS MANDATORY. DO NOT SKIP IT.
Based on the goals tags in the profile, read the relevant docs from the docs/ directory:
docs/general-health.mdsports-performance: read docs/sports-performance.mdgut-microbiome: read docs/gut-microbiome.mdvegetarian: read docs/vegetarian.mdvegan: read docs/vegan.mdThese docs contain evidence-based decision rules for food selection. You MUST apply them when choosing ingredients and designing meals. For example:
If the user shares progress updates (weight, how last week went, feedback on meals), update the profile:
Adjustment triggers:
Do NOT just pick meals and present a finished plan. Discuss with the user first:
For each agreed meal, build a meal object instead of estimating numbers:
Find each ingredient's food code with fooddb.py search:
python3 ${CLAUDE_SKILL_DIR}/tools/fooddb.py search "chicken breast"
python3 ${CLAUDE_SKILL_DIR}/tools/fooddb.py search "basmati rice boiled"
Match the form actually eaten, and weigh on that entry's basis. This is the single biggest source of error if you get it wrong: canned vs dried beans differ ~3×; boiled vs raw rice/pasta differ ~3×; with/without skin, fried vs grilled, etc. Read the candidate names and pick the one whose form matches, then make the grams consistent with it (a boiled entry takes the cooked weight; a dried/raw entry takes the dry weight). Use the reference-doc rules to choose between otherwise-equivalent options (lean vs regular mince).
Create the meal and add items (grams = total cooked, household scale):
python3 ${CLAUDE_SKILL_DIR}/tools/meal.py new 1 chicken-rice --name "Chicken & Rice" --portions 4 --type batch
python3 ${CLAUDE_SKILL_DIR}/tools/meal.py add 1 chicken-rice --code 18-XXX --grams 600
python3 ${CLAUDE_SKILL_DIR}/tools/meal.py add 1 chicken-rice --code 11-858 --grams 800
Read the summed macros with meal.py show and tune the amounts until the
per-portion numbers hit the user's targets. Change an amount with
meal.py set ... --grams, remove an item with meal.py rm:
python3 ${CLAUDE_SKILL_DIR}/tools/meal.py show 1 chicken-rice
If a food genuinely isn't in the database, add it once with fooddb.py add
(values per 100 g — from the packet, or a trusted source), then add it to the
meal by its new custom-NNN code. This keeps every meal fully summable.
Schedule when each meal is eaten so the weekly plan can lay it out:
python3 ${CLAUDE_SKILL_DIR}/tools/meal.py schedule 1 chicken-rice --eat-on "Wed Lunch" "Wed Dinner" "Thu Lunch" "Thu Dinner"
Fixed daily meals (e.g. a standard breakfast) are just a meal with
--type fixed scheduled on every day. Snacks are small meals too.
python3 ${CLAUDE_SKILL_DIR}/tools/week.py totals 1
This sums every scheduled portion into daily totals and a weekly average, and
(if profile.json has a target) shows how far off target the average is. Adjust
meals/portions and re-check until it lands where you want.
python3 ${CLAUDE_SKILL_DIR}/tools/build.py all 1 # meal-plan.md + recipes.md
meal-plan.md — the user's per-portion intake, day by day, with daily and
weekly totals. All numbers come from the database; never hand-edit them.recipes.md — household-scale ingredient lists with a per-ingredient macro
table already filled in. Each recipe has a blank Method section: write the
actual cooking steps there. That is the only part you author by hand.Then build the shopping list in two halves:
python3 ${CLAUDE_SKILL_DIR}/tools/shopping.py extract 1 # auto: aggregate ingredients -> shopping.json
# Now edit weeks/week-01/shopping.json: set a "category" for each item
# (Meat, Fish, Produce, Dairy & Eggs, Frozen, Pantry, Other), and optionally
# tweak "buy_as" (shop-friendly name) and "qty" (raw weight / pack size).
python3 ${CLAUDE_SKILL_DIR}/tools/shopping.py render 1 # auto: grouped shopping-list.md
Scope distinction (unchanged, and now enforced by the tools):
| Output | Scope | Tracks |
|---|---|---|
| Meal plan | Individual | User's per-portion calories and macros |
| Recipes | Household | Actual quantities to cook (all portions) |
| Shopping list | Household | Everything to buy for all cooking |
Present the plan. Be open to changes. A swap is just meal.py set/rm/add + a
re-run of build.py and shopping.py — the numbers update themselves.
When the user describes a meal they ate (a free meal, eating out, "what was in that?") rather than building one from chosen foods, count it with the same database — don't guess the macros. Use this four-step loop:
fooddb.py search "<food>".meal.py new/add then meal.py show),
or just add up the per-100g rows × grams.This decompose → search → pick-entry-and-weight → sum loop is exactly the technique validated in the food benchmark: across five models it beat free-hand estimation every time, and the biggest gains came from steps 3 (matching the form) — getting canned vs dried right is worth more than any model's built-in nutrition knowledge.
The macro numbers are summed from real per-100g rows, not guessed. The recipe macro table and the meal-plan totals are computed from the same meal objects, so they are always consistent by construction — there is no separate "self-check" to get wrong. Your judgement goes into which food and how much; the arithmetic is the tool's job.
The user can update their profile at any time:
profile.jsonWhen updating, edit profile.md directly. Don't recreate it.
data/foods.csv is prebuilt and committed. To rebuild from the McCance source
workbook (e.g. a newer edition), run uv run scripts/build_db.py. User-added
foods (fooddb.py add) live separately in a custom-foods.csv in the user's
project directory — per-project, merged on top of the base table at runtime, and
untouched by rebuilds or skill updates.
profile.md so you don't repeat mistakes.Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
npx claudepluginhub hugobellamy/meal-plan-skill --plugin diet-planner