Order your WeBox meals autonomously with Claude Code — API-first, budget-aware, variety-conscious, fully transparent.
webox-autopilot is a set of seven Claude Code skills that order food from WeBox by talking to Claude in plain language. Every read and write goes through WeBox's JSON API — no DOM scraping, no scroll loops. Fetching the entire menu takes ~1 second. Placing an order is one POST.
Order lunch and dinner Mon–Fri next week, Chinese and Japanese only.
Get me 5 organic milks across the week + lunch for Thursday and Friday.
Hide all sugary drinks.
这个超级咸,别再点了
- Claude Code (any recent version)
- A direct Anthropic plan (Pro, Max, Team, or Enterprise)
- Google Chrome with the Claude in Chrome extension installed and signed in
- An active WeBox account, logged in in that Chrome (the skill reuses your browser session — it never asks for credentials)
This is required for the fast path. Without it, the skill works but falls back to chunked retrieval that's ~10× slower at onboarding time (and noticeably slower per order).
Steps:
- Open Chrome and go to
chrome://settings/content/automaticDownloads - Under "Allowed to automatically download multiple files", click Add
- Enter
[*.]webox.comand save
You only do this once. The permission persists across reinstalls, Chrome restarts, and skill updates.
How the data flow works (so you know why this is needed):
WeBox API → JS in browser tab → Blob download
│
▼
~/Downloads/webox-*.json ← intermediate, automatic
│
▼ (Bash mv, run by Claude Code right after)
~/Documents/WeBox/<file> ← real destination
Every webox-*.json file the skill triggers in your ~/Downloads is immediately moved by Claude Code's Bash into ~/Documents/WeBox/ (favorites, hidden, menu cache, order history). The file in ~/Downloads is transient — by the time the skill returns control to you, the file has been moved and the ~/Downloads copy deleted. If for any reason you see stale webox-*.json files lingering in ~/Downloads, you can safely delete them; they aren't read by anything.
Chrome silently blocks the 2nd+ automatic download per origin unless you allow it explicitly — hence this step.
git clone https://github.com/boyugou/webox-autopilot.git /tmp/webox-autopilot && bash /tmp/webox-autopilot/install.sh && rm -rf /tmp/webox-autopilotThis installs seven skill directories into ~/.claude/skills/webox*/ and creates an empty ~/Documents/WeBox/ data directory. It does NOT touch any existing data in ~/Documents/WeBox/.
Alternative — let Claude Code do it for you: in any Claude Code session, paste:
Install webox-autopilot from https://github.com/boyugou/webox-autopilot, then run /webox-onboard.
claude --chromeIn Claude Code:
/webox-onboard
Or say "set up WeBox". Onboarding takes ~30 seconds and:
- Asks one open-ended question about your food preferences (answer in any language)
- Fetches your profile, address, favorites, hidden list, and order history via the WeBox API
- Writes everything to
~/Documents/WeBox/(config.yaml, preferences.md, identity caches, per-week order JSON)
You're now ready to order. Try Order my lunch for tomorrow.
Standard update (everything in ~/Documents/WeBox/ is preserved):
git clone https://github.com/boyugou/webox-autopilot.git /tmp/webox-autopilot && bash /tmp/webox-autopilot/install.sh && rm -rf /tmp/webox-autopilotThen restart Claude Code so the new skill files are loaded.
Full reinstall — wipe local data + reinstall + re-onboard (one line):
rm -rf ~/Documents/WeBox ~/.claude/skills/webox ~/.claude/skills/webox-onboard ~/.claude/skills/webox-order ~/.claude/skills/webox-favorite ~/.claude/skills/webox-sync ~/.claude/skills/webox-reset ~/.claude/skills/webox-update && git clone https://github.com/boyugou/webox-autopilot.git /tmp/webox-autopilot && bash /tmp/webox-autopilot/install.sh && rm -rf /tmp/webox-autopilotThen restart Claude Code and run /webox-onboard.
~/Documents/WeBox/ (config.yaml, preferences.md, item-reviews.md, etc.) is not recoverable. To preserve your reviews/notes, back them up first:
mv ~/Documents/WeBox ~/Documents/WeBox.backup.$(date +%Y%m%d-%H%M%S)Your WeBox account itself (orders, hearts, hidden list) is untouched — it all lives on webox.com and /webox-onboard refetches.
The Chrome "automatic downloads" permission from setup step 2 is persistent — you don't need to re-grant it after updates or full reinstalls.
| Skill | Trigger | Purpose |
|---|---|---|
webox-onboard |
/webox-onboard or "set up WeBox" |
First-time setup: fetches profile, address, favorites, hidden list, order history via API. Run this first. |
webox-order |
"Order my lunch for tomorrow" | Primary ordering. API menu fetch → plan within budget honoring preferences/dietary/reviews → place via POST /api/orders. |
webox-favorite |
"Order from my usuals" / "Stick to favorites" | Narrow variant — same flow, filtered to your hearted items. |
webox-sync |
"Show my WeBox calendar" / "Sync everything" | Refresh history + favorites/hidden + upcoming-slot menus via API, then display the weekly calendar. |
webox-reset |
"Reset WeBox" / "Start over" | Wipe all local data in ~/Documents/WeBox/ and re-onboard. |
webox-update |
"Update webox-autopilot" / "Pull the latest" | Pull the latest skill files from GitHub. Preserves all your data in ~/Documents/WeBox/. Restart Claude Code after to activate. |
webox |
"What's available friday?" / "Hide all sugary drinks" / ad-hoc | General API loader for free-form tasks — search, inspect, bulk hide/favorite, browse. |
Start Claude Code with Chrome integration:
claude --chrome/webox-onboard
Answer one open-ended question about your food preferences. Claude fetches profile + addresses + favorites + history via API (~15s total).
Order my lunch for tomorrow.
Order lunch and dinner Mon–Fri next week.
Order dinner tonight — something healthy, under $20.
Order next week, Chinese and Japanese only, confirm before placing.
Get me 5 milks across this week.
Order from my usuals for tomorrow.
Quick favorite order for Thursday lunch.
What's available for dinner Friday?
Search for noodles on Tuesday.
Hide all sugary drinks.
Favorite every Korean main dish.
What's in my cart?
The Mongolian Beef bento is amazing — 5/5.
这个超级咸,肉太少
The poke bowl was overpriced for what you get.
Update my budget to $25.
I'm vegetarian now.
Stop ordering Korean food for a while.
Settings live in two files in ~/Documents/WeBox/ (visible in Finder — edit anytime):
config.yaml— schema-locked structured fields documented in the tables below. Edit values; never add new fields — downstream skills only read the canonical keys.preferences.md— free-form notes. Anything that doesn't fit a structured field above: meal composition rules ("1 main + sides"), portion hints ("not a big eater"), ratios ("5/10 Chinese"), incident notes. Claude reads this as a soft constraint.
| Setting | Type | Default | Description |
|---|---|---|---|
budget |
number | 30.00 |
Hard cap per meal slot (food only, excludes fees/tax) |
budget_mode |
string | spend-up-to |
spend-up-to: fill the budget with variety. ceiling-only: best picks, no fill-up. |
validate_budget |
bool | false |
If true, runs a Python sum × qty check before each order |
| Setting | Type | Default | Description |
|---|---|---|---|
confirm_before_order |
bool | false |
false: auto-order in one shot. true: show plan, wait for OK. |
default_meals |
list | [Lunch, Dinner] |
Meal types to order when not specified |
skip_weekends |
bool | true |
Skip Sat/Sun for multi-day ranges |
| Setting | Type | Default | Description |
|---|---|---|---|
avoid_repeat_days |
int | 7 |
Don't re-order the same main within this many days |
history_window_days |
int | 28 |
Days of order-history loaded into context |
allow_repeat_categories |
list | [Beverage, Appetizer, Snacks, Salads] |
Item categories exempt from variety rules (filler items can repeat freely) |
| Setting | Type | Default | Description |
|---|---|---|---|
restrictions |
list | [none] |
vegetarian, vegan, gluten-free, halal, kosher, ... |
avoid_allergens |
list | [none] |
nuts, shellfish, dairy, eggs, soy, ... |
preferred_cuisines |
list | [] |
Cuisines to prioritize (empty = no bias) |
cuisines_to_avoid |
list | [none] |
Cuisines to never order |
foods_i_like |
list | [none] |
Free-text patterns |
foods_to_avoid |
list | [none] |
Free-text patterns |
| Setting | Type | Default | Description |
|---|---|---|---|
order_drinks |
bool | true |
Include drinks in orders |
avoid_sugary_drinks |
bool | false |
Skip sodas and sweetened drinks |
preferred_drinks |
list | [water, unsweetened tea] |
Drink preferences |
All in ~/Documents/WeBox/ — plain text + JSON, edit freely.
| File | Purpose |
|---|---|
preferences.md |
Free-form notes (soft constraints — anything that doesn't fit config.yaml). Created by onboarding, editable forever. |
user-profile.json |
{firstName, lastName, phone, email, timezone} — needed for Place Order. |
address-info.json |
{addressId, userAddressId, kitchenId, timezone, ...} — needed for Place Order. addressId is the canonical address record (e.g., 240212); userAddressId is your account's link (e.g., 459170). Distinct concepts. |
shipping-windows.json |
Per-meal constants (shippingTimeSectionId, extFormCutoff) derived from past orders. Required for Place Order body assembly. |
favorites.json |
Hearted items, enriched: {products: [{id, name, brand, category}], unresolvedProductIds, brands, synced_at}. Human-readable in Finder. |
hidden.json |
Same shape — "Not Interested" items. |
orders/YYYY-Www.json |
Per-ISO-week order history (active orders only). |
menu-cache/YYYY-MM-DD-Meal.json |
Per-slot menu snapshot. TTL 60 min, auto-pruned after 24h. |
item-reviews.md |
Personal ratings + free-form comments per dish (any language). Comments stack as a timeline. Heavily injected into selection. |
User prompt
│
▼
0. Prerequisite check (Chrome connected, identity caches exist)
If anything missing → tell user to run /webox-onboard first
│
▼
1. Load preferences + identity caches + item-reviews + order-history (recent)
│
▼
2. Sync order history if stale (> 1 day) via /api/orders/list paginated
│
▼
3. For each target slot:
- Check menu-cache (TTL 60 min) → reuse if fresh
- Else: GET /api/productSpecials/v8/... (~1s) → join lunchSpecials+products+brands,
filter sold-out, filter hidden, mark in_favorites, write to menu-cache
│
▼
4. Build the plan
Inject: preferences + reviews (5/5 top, 1/5 exclude, free-text synthesized)
+ variety rules (fillers exempt) + budget + quantity × N
│
▼
4b. Optional Python budget validation (uv run python)
│
▼
5. confirm_before_order = false → place orders
confirm_before_order = true → show plan, wait for OK
│
▼
6. Write plan to orders/YYYY-Www.json (planned: true)
│
▼
7. For each slot: POST /api/orders with the assembled body (one slot = one POST, ~1s)
On success: update entry to active with orderId
Sequential, never parallel — avoids race conditions
│
▼
8. Final summary + invite free-form feedback
Reviews appended to item-reviews.md
For favorites-only scope, use webox-favorite — same flow but Step 3 filters items to in_favorites: true only.
- 1 open-ended preferences question; skill waits for your reply
- After reply: API parallel-fetch of profile + address + favorites + hidden
- Paginated fetch of full order history (~4s for 400 orders)
- Tomorrow's menu warm-cached for instant first order
- All files created in
~/Documents/WeBox/
- preferences.md, identity caches → loaded instantly
- orders/YYYY-Www.json → reused if synced within 1 day
- menu-cache/SLOT.json → reused if cached_at < 60 min
- item-reviews.md → loaded instantly; new feedback appended each session
All operations are pure API or pure JS — no slow image+coordinate clicks.
| Operation | Method | Time |
|---|---|---|
| Menu (cached) | Read local JSON | instant |
| Menu (fresh) | GET /api/productSpecials/v8/... (one call, ~2000 items) |
~1s |
| Order history (full) | GET /api/orders/list paginated |
~4s for 400 orders |
| Favorites / hidden | GET /api/fav/my / GET /api/hide/my |
~200ms |
| Budget validation | Python sum(p × q) via uv run |
✅ 100% |
| Place Order | POST /api/orders with assembled body |
~1s per slot |
| Bulk hide / favorite | API loop (one POST per match) | ~200ms × N |
- 7-day window: Orders up to 7 days ahead only.
- Meal cutoffs: The menu API only returns items for slots whose cutoff hasn't passed.
- Weekends: No subsidized Lunch/Dinner; skipped by default.
- Budget per slot: Each date+meal is a separate POST.
Q: Will it double-order a slot I've already ordered?
A: No — orders/YYYY-Www.json is checked first; slots with active or planned entries are skipped.
Q: What if an item is sold out?
A: Filtered by the API (stockStatus). If something went out of stock between menu fetch and Place Order, the API returns an error and the skill substitutes from the cached menu.
Q: What if I want 5 bottles of water in one slot? A: Just say it: "order 5 waters with Thursday lunch". Quantities are first-class.
Q: I keep wanting milk every day — won't variety rules block that?
A: No. Fillers (Beverage, Appetizer, Snacks, etc.) are exempt via allow_repeat_categories.
Q: Can I cancel an order it placed? A: Yes — at webox.com/order/list/normal. On next sync, the slot will be marked open again.
Q: How do I review a dish?
A: Tell Claude in any form: "the Mongolian beef was too dry", "love this 5/5", "这个超级咸". Stored in item-reviews.md verbatim and weighted in future selection.
Q: Can I bulk-hide ("Not Interested") a bunch of items?
A: Yes — say "hide all sugary drinks" or "hide everything by Brand X". The /webox general skill loops POST /api/userHide/addHide over matched items. Confirms with you first.
For most version bumps (schema unchanged):
- Run the Standard update one-liner from the Updating section above. Skill files at
~/.claude/skills/webox-*/get overwritten in place. - Restart Claude Code so the new skill files are loaded. (Claude Code reads skills at session start — a session already in progress continues with the old version.)
- Continue using normally. Your
~/Documents/WeBox/data (preferences, history, identity caches, reviews) is preserved.
For version bumps that change the local file schema (rare; release notes will say so explicitly):
- Back up your reviews and notes:
cp ~/Documents/WeBox/item-reviews.md ~/Documents/WeBox/item-reviews.md.bak cp ~/Documents/WeBox/preferences.md ~/Documents/WeBox/preferences.md.bak cp ~/Documents/WeBox/config.yaml ~/Documents/WeBox/config.yaml.bak
- Run the Full reinstall one-liner from the Updating section.
- Run
/webox-onboard— it rebuilds the identity caches and history from the WeBox API (your WeBox account is the source of truth and is never touched). - Manually merge your reviews/notes from the
.bakfiles into the freshconfig.yamlandpreferences.md.
PRs welcome. Areas for improvement:
- HappyHour / weekend ordering (templated, not yet wrapped)
webox-cancelskill (templated endpoints exist in SITEMAP.md, not yet wrapped)- Multi-week planning with persistent state across sessions
- Budget tracking across multiple orders
- Smarter sentiment analysis on reviews
Apache 2.0 — see LICENSE.