stripe-spend
FreeRuns bundled scriptsNot checkedCreate real Stripe test-mode charges for bounded business actions, with an authority-band budget cap and human escalation above the cap.
by KeyArgo★ 126 GitHub starsAbout this skill
Stripe Spend (bounded authority)
Create a real Stripe PaymentIntent (test mode) when you decide to spend money on an action — for example, starting a monitored worker, buying alerting credits, or charging a customer for a completed job. Every call is logged to the authority ledger and checked against the current authority band before the request is sent.
You are operating under bounded authority, not unlimited spend. Read references/authority-bands.md
before your first spend decision this session.
Quick Reference
| Action | Command |
|---|---|
| Check current authority band + remaining budget | python3 scripts/authority.py status |
| Propose + execute an in-budget spend | python3 scripts/spend.py --amount 0.50 --description "..." |
| Propose a spend that exceeds the cap (escalates) | same command — the script decides, you don't pre-check |
| View the audit log | python3 scripts/authority.py log |
How spend.py decides
- Reads the current band's cap from
references/authority-bands.md(band state lives instate/authority.json). - If
amount <= cap - already_spent_this_band: executes the Stripe PaymentIntent immediately. This is an autonomous, in-budget action — no human needed. - If
amountwould exceed the remaining budget: the script does not call Stripe. It writes anescalation_requiredrecord to the audit log and exits with a message telling you to surface this to the human operator and wait for an explicit approve/deny before retrying with--approved-by <name>. - Every outcome (executed, escalated, denied) is appended to
state/audit_log.jsonl— never overwritten, never deleted. This is the evidence trail.
Retry behavior
The underlying OpenShell sandbox proxy can occasionally drop the first connection to
api.stripe.com (NET:FAIL immediately after NET:OPEN ALLOWED in the sandbox logs). This is a
transient proxy issue, not a policy or auth failure. scripts/spend.py already retries once
automatically after a 1s backoff before reporting failure — you do not need to retry manually.
Example session
$ python3 scripts/authority.py status
Band: L2 (auto-approve up to $2.00/action, $10.00/session)
Spent this session: $0.45
Remaining: $9.55
$ python3 scripts/spend.py --amount 0.50 --description "Start monitoring worker for example.com"
[authority] L2 cap OK ($0.50 <= $9.55 remaining) — executing autonomously
[stripe] PaymentIntent created: pi_3Tk... ($0.50, test mode)
[audit] logged: executed
$ python3 scripts/spend.py --amount 5.00 --description "Scale monitoring to 100 targets"
[authority] L2 cap exceeded ($5.00 > $9.55 remaining is fine, but per-action cap is $2.00)
[authority] ESCALATION REQUIRED — this exceeds the L2 per-action authority band.
[audit] logged: escalation_required
Surface this to the human operator. Do not retry without --approved-by.
$ python3 scripts/spend.py --amount 5.00 --description "Scale monitoring to 100 targets" --denied-by operator
[audit] logged: denied (by operator)
No Stripe call made.
Files
references/authority-bands.md— the L0-L4 band definitions and current active bandscripts/authority.py— status/log CLIscripts/spend.py— the spend decision + Stripe callstate/authority.json— current band + session spend (read/write)state/audit_log.jsonl— append-only decision log (read-only to you; never edit by hand)
Install stripe-spend in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
FAQ
What does the stripe-spend skill do?
Create real Stripe test-mode charges for bounded business actions, with an authority-band budget cap and human escalation above the cap.
How do I install the stripe-spend skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the stripe-spend skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
by Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
by Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
by Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
by Anthropic