Install
openclaw skills install pantry-trackerTrack grocery purchases and monitor food freshness using Supabase. Use when monitoring grocery orders, checking what food is expiring, logging pantry items, getting morning freshness summaries, or managing food waste. Email scanning is done by the agent using its existing email skill (e.g. gog for Gmail) — this skill does not access email directly or require email credentials.
openclaw skills install pantry-trackerTrack grocery items from purchase to plate (or trash). Parses grocery order emails, stores items in Supabase with estimated expiry dates, and sends daily summaries of what needs eating.
Create a Supabase project and run the schema in references/supabase-schema.sql in the SQL editor.
Store credentials as env vars:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key
Use the anon key (not the service role key). The anon key is safe for client-side use and sufficient for all pantry operations. Never use the service role key — it bypasses Row Level Security.
Set up two cron jobs in OpenClaw:
Email scanner (every 2-4 hours):
Use the agent's existing email tool (e.g. gog for Gmail, or whatever email skill is installed) to search for grocery order confirmations. This skill does NOT access email directly — the agent reads email through its own authenticated tools, then passes parsed items to the pantry CLI.
Search email for recent grocery orders (Whole Foods, Instacart, Amazon Fresh, Costco, Walmart). Parse item names and quantities. For each item, look up shelf life in references/shelf-life.md and calculate expires_at from today. Write items to a JSON array and run: python3 scripts/pantry.py bulk-add /tmp/pantry-items.json
Morning summary (daily, e.g. 7am):
Run: python3 scripts/pantry.py summary
If output is not "PANTRY_OK", send the summary to the user.
All commands: python3 scripts/pantry.py <command>
| Command | Description |
|---|---|
add <name> -c <category> -q <qty> -e <days> | Add single item |
bulk-add <file.json> | Add items from JSON (email parse output) |
expiring [--days N] | Show items expiring within N days (default 3) |
status | Full pantry overview by category |
use <name> | Mark item as used |
toss <name> | Mark item as tossed/wasted |
refresh | Auto-update statuses (fresh → use-soon → expired) |
summary | Morning summary for cron (outputs PANTRY_OK if nothing urgent) |
[
{
"name": "Strawberries",
"category": "produce",
"quantity": "1 lb",
"expires_days": 5,
"source": "whole-foods",
"order_id": "111-1234567"
}
]
When scanning grocery emails, extract:
references/shelf-life.md. If not listed, estimate conservatively.Search email for these patterns. Parse the item list from the email body. When in doubt about an item's category or shelf life, use conservative estimates.
Users can also say things like:
Map these to the appropriate CLI commands.