AGENT SKILL

doordash-spend-guard

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 dd-cli while this skill is installed. Pairs with a PreToolUse hook that denies raw dd-cli checkout calls that bypass the wrapper.

适用职业财务
License 许可
MIT
最近更新
2026-11-14
Stars
★ 3.3w
Forks
3.9k

01 前言 Front Matter

name
doordash-spend-guard
tags
[ "DoorDash", "Budget", "Spending Limits", "Guardrails", "CLI", "Safety" ]
description
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 dd-cli while this skill is installed. Pairs with a PreToolUse hook that denies raw dd-cli checkout calls that bypass the wrapper.
allowed-tools
Bash(dd-cli:*), Bash(bash .claude/skills/doordash-spend-guard/scripts/dd-guard.sh:*), Bash(command -v:*), Bash(mkdir:*), Bash(cat:*), Bash(jq:*), Read

02 资源文件 8

03 SKILL.md 正文

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.

04 同仓库更多 Skills

davila7
davila7/claude-code-templates

wealthville-pool-scoring

Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter/Hold/Exit/Reduce/Avoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.

Skill与智能体开发
★ 3.3w
davila7
davila7/claude-code-templates

technical-debt-auditor

Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO/FIXME/HACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like "where should I focus refactoring", "find code smells", "audit my codebase", "what technical debt do we have", "prioritize cleanup work", or asks about code quality metrics. Also trigger when the user mentions "code rot", "legacy cleanup", "refactoring priorities", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say "technical debt" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.

Skill与智能体开发
★ 3.3w
davila7
davila7/claude-code-templates

readonly-sql-guard

Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production/ERP/analytics database (a "query" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write/DDL/side-effect/transaction-escape risks. Checks what a statement CALLS, not just its shape.

数据分析师后端与接口Skill与智能体开发
★ 3.3w
davila7
davila7/claude-code-templates

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

前端开发
★ 3.3w
davila7
davila7/claude-code-templates

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

测试与质量前端开发
★ 3.3w
davila7
davila7/claude-code-templates

discernment-nudge

After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.

内容创作者写作与文案Skill与智能体开发
★ 3.3w