AgentSkillsCN

pantry-pal

智能食品储藏室库存追踪器——支持 OCR 识别、到期提醒与食谱推荐

SKILL.md
--- frontmatter
name: pantry-pal
description: Smart pantry inventory tracker with OCR, expiration alerts, and recipe suggestions
homepage: https://github.com/nationalbank/pantrypal
metadata:
  clawdbot:
    emoji: "\U0001F96C"
    os: [darwin, linux]
    requires:
      python: ["requests", "Pillow"]
    commands:
      - /pantry

Pantry Pal

Track your groceries, get expiration reminders, and discover recipes using what you have on hand.

Features

  • Image Recognition - Send a photo of groceries or receipts; AI extracts items automatically
  • Expiration Tracking - Smart estimates based on food type and storage method
  • Recipe Suggestions - Get meal ideas using ingredients you have, prioritizing items expiring soon
  • Multi-Use Learning - Remembers staples like spices and condiments that last a long time
  • Soft Reminders - Alerts when items are expiring soon

Quick Start

code
/pantry add [image or text]

Send a photo of your groceries or type items manually:

  • "Add these groceries" + image
  • "I bought: chicken breast, spinach, eggs"

Commands

CommandDescriptionExample
/pantry addAdd groceries (image or manual)/pantry add chicken, eggs, milk
/pantry showShow current pantry contents/pantry show
/pantry expiringShow items expiring soon/pantry expiring 3 (within 3 days)
/pantry searchSearch for specific items/pantry search chicken
/pantry cookGet recipe suggestions/pantry cook --quick --strict
/pantry useMark item as used/pantry use chicken
/pantry freezeMove item to freezer/pantry freeze chicken
/pantry trashRemove spoiled item/pantry trash spinach
/pantry undoUndo last add/pantry undo
/pantry prefsSet preferences/pantry prefs --diet vegetarian
/pantry resetReset pantry data/pantry reset

Adding Groceries

Via Image

Send a photo with your message:

  • "Add these groceries" + photo of items on counter
  • "Scan this receipt" + photo of store receipt

The AI will extract items, estimate expiration dates, and ask for confirmation before adding.

Manual Entry

code
/pantry add chicken breast, spinach, 2 cartons of eggs

Supports quantities and units:

  • "2 lbs chicken"
  • "1 gallon milk"
  • "bunch of bananas"

Pantry Queries

What do I have?

code
/pantry show

Specific search:

code
/pantry search soy sauce
/pantry search proteins

Expiring soon:

code
/pantry expiring        # Default: 2 days
/pantry expiring 7      # Within 7 days

Recipe Suggestions

code
/pantry cook                    # Suggest meals using pantry items
/pantry cook --quick            # Under 30 minutes
/pantry cook --strict           # Only use what I have (no shopping)
/pantry cook --waste            # Prioritize expiring items
/pantry cook spinach chicken    # Use specific ingredients

Recipe Modes

  • Normal - May suggest 1-2 additional ingredients to buy
  • Strict - Only uses items currently in your pantry
  • Minimize Waste - Prioritizes items expiring soonest

Item Status

Items can have these statuses:

  • active - In pantry, ready to use
  • partial - Partially used
  • frozen - Moved to freezer (extends expiry)
  • consumed - Used up
  • trashed - Discarded (spoiled)

Storage Locations

Items are automatically assigned storage:

  • Fridge - Dairy, meat, produce
  • Freezer - Frozen items, items you freeze
  • Pantry - Dry goods, canned items, spices

Multi-Use Items

Some items last a long time and are typically "staples":

  • Soy sauce, vinegar, olive oil
  • Spices and seasonings
  • Condiments (ketchup, mustard)

Pantry Pal learns these and assumes you "likely still have" them even without recent additions.

Occasionally you may be asked: "Still have soy sauce?" to verify.

Reminders

code
/pantry prefs --reminder daily     # Daily digest
/pantry prefs --reminder critical  # Only within 48 hours
/pantry prefs --reminder off       # Disable reminders

If the host supports scheduling, reminders are sent at your preferred time. Otherwise, "soft reminders" appear when you message the bot after items are expiring.

Preferences

code
/pantry prefs --timezone America/New_York
/pantry prefs --diet vegetarian
/pantry prefs --allergies peanuts,shellfish
/pantry prefs --dislikes cilantro
/pantry prefs --cuisine italian,asian

Data Storage

All data is stored locally on your device:

  • ~/.config/clawdbot-pantry/pantry_state.json - Pantry inventory
  • ~/.config/clawdbot-pantry/shelf_life.json - Expiration estimates (customizable)
  • No images are stored; only extracted text and item data

Reset Data

To clear all pantry data:

code
/pantry reset

This removes all items but preserves your preferences.

To fully reset including preferences:

code
/pantry reset --all

Privacy

  • Local storage only - All data stays on your machine
  • No image storage - Photos are processed and discarded
  • Model-agnostic - Works with ChatGPT or Gemini (your choice)

Example Session

code
User: [sends photo of groceries]
User: Add these groceries

Bot: I found these items in your photo:

**Fridge:**
- Chicken breast (2 packs) - Expires ~Feb 3
- Spinach (1 bag) - Expires ~Feb 4
- Milk (1 gallon) - Expires ~Feb 8

**Pantry:**
- Pasta (1 box) - Expires ~Aug 2026
- Olive oil - Multi-use staple

Reply "Confirm" to add, or make corrections like:
- "spinach is 2 bags"
- "set milk expiry Feb 10"

User: Confirm

Bot: Added 5 items to your pantry.

User: What should I cook tonight?

Bot: Based on your pantry (prioritizing expiring items):

1. **Lemon Herb Chicken with Spinach**
   Uses: chicken breast, spinach (both expiring soon!)
   Time: 25 minutes

2. **Creamy Spinach Pasta**
   Uses: pasta, spinach, milk
   Time: 20 minutes

3. **Chicken Stir-Fry**
   Uses: chicken breast
   Missing: soy sauce (likely have), vegetables
   Time: 15 minutes

Reply with a number for the full recipe!

Dependencies

python
requests>=2.31.0    # API calls for vision models
Pillow>=10.0.0      # Image handling (optional)

Install: pip install requests Pillow

Model Configuration

Pantry Pal works with your configured AI model (ChatGPT or Gemini). The model is used for:

  • Extracting items from photos
  • Generating recipe suggestions
  • Understanding natural language queries

Pantry Pal helps reduce food waste by keeping track of what you have and when it expires. No more forgotten vegetables in the back of the fridge!