Named, context-bound saved DoorDash orders ("post-gym", "late-night deploy") recalled through the DoorDash CLI (dd-cli) with a mandatory cart-diff before any ch
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-doordash-order-playbooks-a4bbfba26f17 ,按照其中的说明把「doordash-order-playbooks」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Saved orders with names and contexts, recalled safely. A playbook maps a
human name ("post-gym", "late-night deploy", "Friday ramen") to a concrete
DoorDash order that can be rebuilt with dd-cli order reorder — plus enough
stored detail to detect drift (menu changes, price hikes, substitutions)
before the user is ever handed a checkout link.
Unofficial community skill built on DoorDash's
doordash-oss/doordash-cli.dd-climust be installed, on PATH, and logged in (dd-cli login).
dd-cli order history already lists past orders — but Claude has no
cross-session memory of which order is "the post-gym one", and plain
reordering silently accepts whatever the restaurant's menu says today:
substituted items, missing items, higher prices. This skill stores the
mapping AND makes a cart-diff against the stored baseline mandatory
before emitting any checkout URL. Silent drift becomes a caught event.
Single JSON file: ~/.claude/dd-cli/playbooks.json
{
"playbooks": {
"post-gym": {
"order_uuid": "<uuid from dd-cli order history>",
"restaurant": "Sweetgreen",
"items_summary": [
{ "name": "Harvest Bowl", "qty": 1, "price": 13.95 },
{ "name": "Lemonade", "qty": 1, "price": 3.5 }
],
"baseline_total": 17.45,
"tolerance_pct": 10,
"contexts": ["post-gym", "gym", "workout"],
"last_used": "2026-07-19",
"times_used": 4
}
},
"preflight": { "verified": false, "notes": "" }
}
Create the directory and file on first use (mkdir -p ~/.claude/dd-cli).
Prices are pre-fee subtotals — say so when presenting totals.
This skill assumes dd-cli order reorder --order-uuid Y returns a cart-uuid
that cart show and order checkout-url accept. That handoff is
load-bearing and must be verified empirically once per install:
dd-cli order reorder --help and dd-cli order checkout-url --help
to confirm flags.reorder, confirm the output
contains a cart-uuid and that dd-cli cart show --cart-uuid <it> works.preflight.verified (+ any format notes in
preflight.notes) so future sessions skip this step.If the handoff does NOT work as assumed, fall back to rebuilding the cart
manually (dd-cli search → cart add-items) and record that in
preflight.notes.
User says something like "order my post-gym bowl" / "the usual after the gym":
Match: fuzzy-match the request against playbook names and contexts.
Ambiguous → ask. No match → offer Flow 2 (capture) instead.
Rebuild: dd-cli order reorder --order-uuid <stored uuid>. Capture
the cart-uuid from the output.
MANDATORY diff: run dd-cli cart show --cart-uuid <cart-uuid> and
compare against the stored items_summary + baseline_total:
| Stored | Current | |
|---|---|---|
| Harvest Bowl | $13.95 | $14.95 ⬆ |
| Lemonade | $3.50 | ❌ missing |
| Subtotal | $17.45 | $14.95 |
Present the diff table to the user. Never skip this step, even when everything matches — say "matches your baseline" explicitly.
Gate: if items are missing/substituted, or the subtotal exceeds
baseline_total by more than tolerance_pct, STOP and ask the user how
to proceed (accept, edit cart via cart remove-item/cart add-items, or
abort). Do NOT hand over a checkout link silently.
Checkout: only after the diff is shown (and approved when the gate
tripped): dd-cli order checkout-url --cart-uuid <cart-uuid>. Hand the
URL to the user — payment always happens on the DoorDash page, by the
human.
Update: bump last_used / times_used; if the user accepted new
prices, offer to refresh items_summary and baseline_total.
After ANY completed order (via playbook or bespoke), offer once — don't nag: "Want to save this as a playbook?" If yes:
dd-cli order history — take the most recent order's uuid.items_summary and baseline_total from the cart
that was just built (or from the history entry if it shows detail).tolerance_pct: 10.When order reorder fails or the diff shows the restaurant no longer offers
the stored items:
dd-cli search --query "<restaurant name>" — confirm the restaurant still
exists on DoorDash. Gone → offer to retire the playbook or find a
replacement.cart add-items, navigating with --help as
needed), confirm with the user, and after a successful checkout-url
handoff refresh the playbook's order_uuid from dd-cli order history.dd-cli reports auth/waitlist errors, stop and tell the user to run
dd-cli login — don't retry in a loop.