When to Use
User needs help with grocery shopping logistics — creating lists, tracking pantry inventory, remembering household quantities, or checking items against dietary restrictions. Focus: the shopping itself, not meal planning.
Architecture
Memory lives in ~/grocery/. See memory-template.md for setup.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Memory setup | INLINECODE2 |
| List operations |
lists.md |
Data Storage
All data stored in ~/grocery/. Create on first use:
CODEBLOCK1
Scope
This skill ONLY:
- - Maintains shopping lists from user input
- Tracks pantry inventory user reports
- Remembers dietary restrictions and preferences
- Suggests quantities based on household size
This skill NEVER:
- - Accesses real store inventories or prices
- Makes purchases or places orders
- Scans barcodes or receipts
- Reads files outside INLINECODE5
Core Rules
1. Learn Household Context
| What to capture | Example |
|---|
| Household size | "2 adults, 1 picky toddler" |
| Dietary restrictions |
"gluten-free, no shellfish" |
| Preferred stores | "Mercadona primary, Carrefour backup" |
| Typical quantities | "4L milk/week, not 1L" |
Store in memory.md on first mention. Never ask repeatedly.
2. Quantity Intelligence
- - Default to household-appropriate portions (solo = small, family = bulk)
- Remember past quantities: "You usually get 2kg chicken"
- Flag unusual requests: "That's 3x your normal pasta amount — meal prep?"
3. Restriction Safety
- - Always check new items against stored restrictions
- Know hidden names: caseína = dairy, gluten in soy sauce
- When uncertain: "Contains wheat — checking your restrictions: you're gluten-free. Skip?"
4. List Organization
- - Group by store section when requested (produce, dairy, frozen)
- Support multiple active lists (weekly, party, camping)
- Deduplicate automatically, merge quantities
5. Pantry Awareness
When user reports what's home:
- - Update pantry.md with quantities and dates
- Cross-check against list to avoid duplicates
- "You have 6 eggs at home — still adding 12 more?"
6. Recipe Input (Not Planning)
If user shares a recipe or meal:
- - Extract ingredients to add to list
- Adjust for pantry stock
- Scale to household size
- Note: meal PLANNING belongs to
meals skill — grocery just receives ingredient lists
Common Traps
- - Suggesting 4-person recipes to single person → check household size first
- Recommending exotic ingredients unavailable locally → stick to user's stores
- Forgetting restrictions between sessions → always load memory.md
- Ignoring "picky eater" family members → track per-person preferences
Boundary with meals Skill
| grocery (this skill) | meals (different skill) |
|---|
| What to BUY | What to EAT |
| Pantry inventory |
Weekly meal plan |
| Quantities, brands | Recipes, variety |
| Restriction safety | Dietary balance |
| Store organization | Meal scheduling |
If user asks "what should I eat this week?" → suggest meals skill.
This skill handles: "what do I need to buy?"
何时使用
用户需要购物清单管理方面的帮助——创建清单、追踪食品储藏室库存、记住家庭用量,或根据饮食限制检查商品。重点:购物本身,而非膳食规划。
架构
记忆文件存储在 ~/grocery/ 目录下。设置方法参见 memory-template.md。
~/grocery/
├── memory.md # 热数据:偏好、限制、当前清单
├── pantry.md # 温数据:家中库存、数量、保质期
├── history.md # 冷数据:历史购买记录、消费模式
└── stores.md # 用户偏好的商店、货架布局
快速参考
| 主题 | 文件 |
|---|
| 记忆设置 | memory-template.md |
| 清单操作 |
lists.md |
数据存储
所有数据存储在 ~/grocery/ 目录下。首次使用时创建:
bash
mkdir -p ~/grocery
范围界定
本技能仅:
- - 根据用户输入维护购物清单
- 追踪用户报告的食品储藏室库存
- 记住饮食限制和偏好
- 根据家庭人数建议购买数量
本技能绝不:
- - 访问真实商店的库存或价格
- 进行购买或下单
- 扫描条形码或收据
- 读取 ~/grocery/ 目录外的文件
核心规则
1. 了解家庭背景
| 需记录的信息 | 示例 |
|---|
| 家庭人数 | 2个大人,1个挑食的幼儿 |
| 饮食限制 |
无麸质,不吃贝类 |
| 偏好商店 | 首选Mercadona,备选Carrefour |
| 常规用量 | 每周4升牛奶,不是1升 |
首次提及时存入 memory.md。切勿重复询问。
2. 数量智能判断
- - 默认使用适合家庭的分量(独居=小份,家庭=大份)
- 记住历史数量:你通常买2公斤鸡肉
- 标记异常请求:这比你平时买的面食多3倍——是在备餐吗?
3. 饮食限制安全
- - 始终将新商品与已存储的限制条件进行核对
- 识别隐藏成分:酪蛋白=乳制品,酱油含麸质
- 不确定时:含有小麦——正在核对你的饮食限制:你需无麸质饮食。跳过?
4. 清单整理
- - 按需按商店区域分组(生鲜、乳制品、冷冻)
- 支持多个活跃清单(每周采购、派对、露营)
- 自动去重,合并数量
5. 食品储藏室感知
当用户报告家中库存时:
- - 更新 pantry.md 中的数量和日期
- 与清单交叉核对以避免重复
- 家里还有6个鸡蛋——还要再加12个吗?
6. 食谱输入(非规划)
如果用户分享食谱或餐食:
- - 提取食材添加到清单
- 根据食品储藏室库存调整
- 按家庭人数缩放
- 注意:餐食规划属于 meals 技能——购物清单仅接收食材列表
常见陷阱
- - 向独居者推荐4人份食谱 → 先核对家庭人数
- 推荐本地买不到的异国食材 → 坚持用户常去的商店
- 会话间忘记饮食限制 → 始终加载 memory.md
- 忽略挑食家庭成员 → 记录每个人的偏好
与 meals 技能的界限
| grocery(本技能) | meals(不同技能) |
|---|
| 买什么 | 吃什么 |
| 食品储藏室库存 |
每周餐食计划 |
| 数量、品牌 | 食谱、多样性 |
| 饮食限制安全 | 膳食均衡 |
| 商店组织 | 餐食安排 |
如果用户问这周该吃什么? → 建议使用 meals 技能。
本技能处理:我需要买什么?