When should you use it?
- You let an agent buy things
- You want limits on what it can spend
- You use a password manager
Not for: Anyone without a virtual card option; Agents that do not need to pay
What do you need, and what do you get?
You need
- Low-limit virtual card
- Machine secrets in a password manager
- Rules for what it may buy
You get
- Purchases capped by the card
- Credentials kept out of prompts
- Alerts on your phone
How does it work, step by step?
- Make a cardCreate a virtual card with a low limit for agent purchases.
- Store secretsPut the logins it needs in a machine secrets vault.
- Set rulesSay which stores and what spend per order are allowed.
- Get alertsHave your phone notify you of each charge.
- Review monthlyCheck orders and lower the limit if needed.
The prompt
Our own prompt, inspired by Frannky on Hacker News and written to work in Custom agent. Values in lime are placeholders.
Fill in the blanks (optional; the copied prompt uses your values)
You may buy {items} from {stores} using the card and logins provided through the secrets vault. Never print or repeat card numbers or passwords. Keep each order under {limit}. Before checkout, show me the cart and total and wait for my yes.
Inspired by Frannky on Hacker News: Comment in Claude Code now reads AGENTS.md if there is no Claude.md. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- A card limit caps damage but not mistakes; review orders.
- Never paste card numbers or passwords into chat.
- Freeze the card if the agent misbehaves.
Our take
Once an agent can spend money, the useful question changes from whether it will ever err to how large an error can get. Frannky answers it with two plain controls. A virtual card with a low ceiling sets the worst case before anything happens, and Bitwarden machine secrets keep passwords and tokens out of prompts, chat history and logs. Tying the card to a phone adds the third piece: an instant alert on every charge, so a strange order is spotted within minutes instead of at statement time. The rest of the setup, with several cheap models handling issues, code and tests, is ambitious and not for everyone, but the payment pattern applies to anyone letting an assistant shop. Create a separate card for the agent alone, set its limit to an amount you would shrug off losing, and restrict it to the merchants you expect. Give the agent its own vault collection containing only what it needs. Review charges monthly and lower the limit if it never comes close.
Where the time goes back: The agent can run errands that cost money while any mistake stays small.
FAQ
Why a virtual card?
What else did the developer automate?
Source and credit
Inspired by Frannky on Hacker News. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- Comment in Claude Code now reads AGENTS.md if there is no Claude.md
- Creator
- Frannky on Hacker News
- Published on
- Hacker News
- Original date
- Sep 19, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Custom agent
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends, bookings or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.