Skip to content
Skillpedia
Automations33k Β· #8828

doordash-spend-guard

What it does

This skill sets a spending policy for your agent's DoorDash orders and checks every cart and checkout against it. It is for people who want firm spending limits on AI-driven food orders.

When to use it

  • βœ“When you let your agent order food and want a firm daily or monthly limit.
  • βœ“When you want to block orders during certain hours or require a cooldown between orders.
  • βœ“When you want to see how much budget is left before a checkout.

Skill link

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/doordash/doordash-spend-guard/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/doordash/doordash-spend-guard/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œLet me order food this week, but never more than 60 dollars in total and nothing after 10 pm.”

5 new skills a week. 1 minute to read.

How it works

Every cart change and checkout goes through a wrapper script that prices the cart, compares it with your policy and a spending record, and refuses anything out of policy.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

DoorDash Spend Guard

A budget stated in a prompt is advisory β€” the model can forget it mid-session and prompt injection can override it. This skill makes the budget deterministic: every checkout and cart mutation goes through one audited wrapper (dd-guard.sh) that prices the cart, checks the policy, and refuses out-of-policy actions with a machine exit code. The companion PreToolUse hook (doordash-spend-guard hook component) denies raw dd-cli order checkout-url / dd-cli cart add-items calls that try to bypass the wrapper.

Unofficial community skill built on DoorDash's doordash-oss/doordash-cli. Requires dd-cli installed and logged in. Wrapper needs python3.

Honest scope

  • Caps apply to the pre-fee subtotal that cart show exposes; fees, tip and tax land on the DoorDash payment page. Documented headroom, not loopholes.
  • The ledger records intent when a checkout URL is issued; the human may abandon the page. /doordash-budget reconciles intents against dd-cli order history, marking entries paid or abandoned.
  • Enforcement teeth come from the hook + wrapper combo. Install both; the skill alone is guidance.

Components in this bundle

Piece Role
this skill protocol: always route through dd-guard, report headroom
scripts/dd-guard.sh β†’ installs to .claude/skills/doordash-spend-guard/scripts/dd-guard.sh the deterministic gate
hook doordash/doordash-spend-guard denies bypasses of the wrapper
command /doordash-budget view/edit policy, reconcile ledger

State (created on first run)

  • ~/.claude/dd-guard/limits.json β€” policy. Human-edited only. Never edit this file yourself; when the user asks for a change, direct them to /doordash-budget which confirms interactively.
{
  "per_order_max": 40,
  "daily_max": 60,
  "weekly_max": 150,
  "monthly_max": 400,
  "cooldown_minutes": 45,
  "allowed_hours": { "start": 7, "end": 23 }
}
  • ~/.claude/dd-guard/ledger.jsonl β€” one line per priced action: {"ts": "...", "cart_uuid": "...", "subtotal": 24.5, "status": "intent"} (status becomes paid / abandoned after reconciliation).

Protocol (follow ALWAYS while this skill is installed)

  1. Session start / before building a cart: report headroom β€” bash .claude/skills/doordash-spend-guard/scripts/dd-guard.sh status prints spend-to-date vs each cap. Tell the user their remaining budget before adding items.
  2. Adding items: route through the wrapper β€” bash .claude/skills/doordash-spend-guard/scripts/dd-guard.sh add-items <the exact dd-cli cart add-items args> The wrapper execs the real dd-cli cart add-items ... and re-prices the cart afterwards.
  3. Checkout: NEVER call dd-cli order checkout-url directly. Use bash .claude/skills/doordash-spend-guard/scripts/dd-guard.sh checkout <cart-uuid>
    • exit 0 β†’ it printed the checkout URL and appended a ledger intent line.
    • exit 2 β†’ blocked; it printed a human-readable reason (which cap, by how much). Relay the reason verbatim, then help within policy β€” e.g. suggest a cheaper reorder from dd-cli order history or trimming the cart with dd-cli cart remove-item.
  4. When blocked, do not negotiate with the wrapper. No editing limits.json, no retrying with a fresh cart to reset the cooldown, no splitting one order into several to duck the per-order cap. If the user wants a different policy, point them to /doordash-budget.
  5. If the wrapper reports the cart subtotal as unparseable, it blocks by design (conservative default). Show the user the raw cart show output and ask them to confirm the total explicitly before any manual override.

Reading the ledger

Answer "how much have I spent this week?" from the ledger, not memory:

bash .claude/skills/doordash-spend-guard/scripts/dd-guard.sh status
# or raw:
cat ~/.claude/dd-guard/ledger.jsonl | jq -s '[.[] | select(.status != "abandoned")] | map(.subtotal) | add'

Remind the user that subtotals exclude fees/tips and intents may not have been paid β€” /doordash-budget reconciles.

FAQ

Does this cover fees and tax?

No. The caps apply to the subtotal before fees, tip and tax, which appear on DoorDash's payment page.

What if I abandon a checkout page?

The spending record counts a checkout link as an intent. A budget command can later match it against your order history and mark it paid or abandoned.

Is the skill enough on its own?

No. The skill is guidance, and enforcement depends on installing the companion hook and wrapper script together.

Details

Original description by the author

Hard spending policy for agent-driven DoorDash ordering through the DoorDash CLI (dd-cli). Per-order ceiling, daily/weekly/monthly caps, cooldown between orders, and blocked hours β€” enforced deterministically by routing every cart-mutation and checkout through the dd-guard wrapper script, which prices the cart, checks the policy against a persistent spend ledger, and refuses out-of-policy checkouts with exit code 2. Use when the user wants budget limits on agent food ordering, asks "how much have I spent on DoorDash", wants to set spending caps, or whenever building carts / checking out with d

repo: davila7/claude-code-templates

Popularity

GitHub stars
33k
Ranking position
#8828
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills