doordash-spend-guard
Skill này làm gì
Skill này đặt ra chính sách chi tiêu cho các đơn DoorDash của agent, và kiểm tra mọi giỏ hàng cùng bước thanh toán theo chính sách đó. Skill dành cho người muốn giới hạn chi tiêu chặt chẽ cho các đơn đồ ăn do AI đặt.
Khi nào nên dùng
- ✓Khi bạn cho phép agent đặt đồ ăn và muốn có giới hạn cứng theo ngày hoặc theo tháng.
- ✓Khi bạn muốn chặn đặt hàng trong một số khung giờ hoặc yêu cầu thời gian chờ giữa các đơn.
- ✓Khi bạn muốn xem ngân sách còn lại bao nhiêu trước khi thanh toán.
Liên kết skill
https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/doordash/doordash-spend-guard/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Cho tôi đặt đồ ăn trong tuần này, nhưng tổng không vượt quá 60 đô la và không đặt gì sau 10 giờ tối.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Mỗi thay đổi giỏ hàng và mỗi lần thanh toán đều đi qua một script bao. Script này tính giá giỏ hàng, so sánh với chính sách của bạn và bản ghi chi tiêu, rồi từ chối mọi thứ nằm ngoài chính sách.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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. Requiresdd-cliinstalled and logged in. Wrapper needspython3.
Honest scope
- Caps apply to the pre-fee subtotal that
cart showexposes; 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-budgetreconciles intents againstdd-cli order history, marking entriespaidorabandoned. - 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-budgetwhich 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"}(statusbecomespaid/abandonedafter reconciliation).
Protocol (follow ALWAYS while this skill is installed)
- Session start / before building a cart: report headroom —
bash .claude/skills/doordash-spend-guard/scripts/dd-guard.sh statusprints spend-to-date vs each cap. Tell the user their remaining budget before adding items. - 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 realdd-cli cart add-items ...and re-prices the cart afterwards. - Checkout: NEVER call
dd-cli order checkout-urldirectly. Usebash .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 historyor trimming the cart withdd-cli cart remove-item.
- 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. - If the wrapper reports the cart subtotal as unparseable, it blocks by
design (conservative default). Show the user the raw
cart showoutput 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.
Câu hỏi thường gặp
Điều này có tính phí và thuế không?
Không. Giới hạn chỉ áp dụng cho tạm tính trước phí, tiền boa và thuế, các khoản này hiện ở trang thanh toán của DoorDash.
Nếu tôi bỏ dở trang thanh toán thì sao?
Bản ghi chi tiêu tính liên kết thanh toán là một ý định. Sau này một lệnh kiểm tra ngân sách có thể đối chiếu nó với lịch sử đơn hàng và đánh dấu là đã trả hoặc đã bỏ.
Chỉ skill này có đủ không?
Chưa đủ. Skill chỉ là hướng dẫn, việc thực thi phụ thuộc vào việc cài đặt đồng thời hook và script bao đi kèm.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 33k
- Vị trí xếp hạng
- #8828
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
owasp-security
33kDạy agent hướng dẫn bảo mật OWASP cho ứng dụng web, API, di động, container và agent AI, để nhận ra các điểm yếu phổ biến và gợi ý cách sửa.
agent-management
33kCho phép agent của bạn tạo, liệt kê, cho ngủ đông, đánh thức, đổi tên và xóa các agent AI bằng dòng lệnh AI Maestro, quản lý vòng đời của từng agent.
agent-messaging
33kCho phép agent của bạn gửi, nhận và trả lời tin nhắn có chữ ký giữa các agent AI, dùng Agent Messaging Protocol, chủ yếu trên máy của bạn.
docs-search
33kCho phép agent của bạn tìm trong tài liệu code được tạo tự động, như chữ ký hàm, định nghĩa lớp và chú thích, để kiểm tra API thật trước khi sửa code.
Skill tương tự
knowledge-automation
394kGiúp agent của bạn thiết lập tác vụ định kỳ đưa nội dung mới vào kho Knowledge theo lịch, rồi kiểm tra tác vụ có chạy không.
knowledge-source-ingest
394kGiúp agent của bạn cập nhật Knowledge vault với các mục mới từ kênh chat, nguồn tin hoặc hộp thư, mà không thêm lại những gì đã có.
benchmark
280kGiúp agent của bạn đo tốc độ và hiệu suất của code, hữu ích để đảm bảo mọi thứ nhanh và tìm ra những chỗ chậm.