---
name: shop-from-a-pantry-meal-plan
description: "Turn a dated meal plan and what is already in the fridge, freezer and cupboards into a shopping list, using stock before its use-by date and rounding to real pack sizes. Use when someone asks for a shopping list from their meal plan, what to buy given what they have, or how many packs or tins they need."
license: CC-BY-4.0
metadata:
  author: Raq.com
  version: "2026-11-22"
  homepage: https://skills.raq.com/skills/shop-from-a-pantry-meal-plan
---

# Build a shopping list from planned meals and stock

Allocate existing ingredients to dated meals first, then combine the remaining shortfalls into a shopping list.

## When to use this skill

- Someone has a week of planned meals and a list of what is in the fridge, freezer and cupboards.
- Someone wants to use food before its use-by date and buy only the shortfall.
- Someone asks how many tins, bags or packs to buy across several recipes.

## When not to use it

- Judging whether food past its use-by date is still safe. In the UK a use-by date marks when food is no longer safe to eat, so expired stock is left out, not assessed.
- Costing the meals. Use the cost-a-portion-from-pack-prices skill.
- Nutrition or special-diet planning. This skill matches quantities only.

## What you need

- Dated meals with per-meal ingredient quantities, stock lots with quantities and use-by dates, and any items already reserved.
- Pack sizes and units for items that need buying, plus whether the purchases can serve all the planned dates.

## Ask before you start

If any of these are missing or unclear, ask before doing the work.

- What is in stock, how much of each item, and what use-by or best before date is on each? Is any of it set aside for something else?
- When will you shop, and will items bought then still be in date for the later meals?
- What pack sizes does your shop sell, and for tins, is the recipe amount drained or including the liquid?

## Method

1. Put the meals in date order and list each ingredient's quantity per meal in the recipe's unit and form (fresh, frozen, tinned, drained, dry).
2. List stock lots with quantity, unit and date, and take out anything reserved for another use. Keep different forms separate unless a stated yield converts them; for drained ingredients use the can's drained weight, not its net weight, for both stock and new packs.
3. Allocate stock meal by meal in date order, using the lot with the earliest date first. A lot can serve a meal only on or before its use-by date. Carry each lot's remainder forward so nothing is counted twice.
4. Treat date labels correctly. Under UK guidance a use-by date marks when food is no longer safe to eat, while food is usually safe after its best before date but may be lower in quality. Leave out use-by stock past its date and flag unknown or unreadable dates rather than judging by look or smell. Food frozen before its use-by date can be used, within 24 hours of defrosting.
5. Total each ingredient's shortfall across the shopping period in one unit, then round up once to whole packs. Do not round each meal's shortfall separately.
6. Check the new packs will stay in date until the last meal they serve. If not, split the shop by date or leave that pack count open until the shopping date is settled.

## Checks before you deliver

- An unopened pack marked for another recipe is unavailable to the current plan.
- Rounding each day's small shortfall to a whole pack independently can double the purchase.
- Counting a can by its net weight when the recipe wants drained weight: 600 g of drained chickpeas at 240 g a can needs three cans, not two.
- Using leftover stock from a lot for a meal after its use-by date because some is still there.

## How to present the result

Give the shopping list first: item, number of packs and pack size. Then a short 'use from stock' list by meal (which lot, how much, by when), and a note of anything left out as past its use-by, reserved, or needing a date check.

## Worked example

**Request:** Make one shopping list. New packs are suitable through Wednesday.

**Supplied material:**

```text
Monday soup needs carrots 450 g. Wednesday stew needs carrots 350 g. Lot C1 carrots 500 g use by Monday. C2 carrots 200 g use by Thursday, 50 g reserved. Shop carrots in 500 g packs.
```

**Answer:** Buy one 500 g pack of carrots. Use 450 g from C1 for Monday, then 150 g from C2 and 200 g from the new pack on Wednesday. The 50 g reserved from C2 stays available for its other meal.

## Structured output for tests

For an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.

Return stock_used as quantities keyed by lot ID in its original unit, including zero; shortfall keyed by ingredient as the amount required beyond stock, including zero; buy_packs keyed by ingredient as integer packs or null if pack size or dated suitability is unknown. Assume no substitutions unless stated.

## Sources

- [US Environmental Protection Agency: preventing wasted food at home](https://www.epa.gov/recycle/preventing-wasted-food-home): Advises checking the fridge, freezer and pantry before shopping, planning the week's meals and buying only what those meals need. This is the order the skill follows.
- [GOV.UK: best before and use-by dates](https://www.gov.uk/understanding-food-labelling/best-before-and-use-by-dates): UK guidance that use-by dates show when food is no longer safe to eat, best before dates are about quality, food frozen before its use-by date does not deteriorate, and defrosted food should be used within 24 hours. This is why expired use-by stock is never allocated.
- [USDA Food Buying Guide, Appendix B: using the yield column](https://foodbuyingguide.fns.usda.gov/Content/TablesFBG/USDA_FBG_Appendix_B.pdf): Works out the drained yield of a can from its listed yield and rounds purchase quantities up so enough food is bought. The skill uses drained weight for tinned stock and new tins on the same basis.

Test cases and an answer checker for this skill: https://skills.raq.com/skills/shop-from-a-pantry-meal-plan
