Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflowWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/bybren-llc/safe-agentic-workflow/16-stripe-payments)<a href="https://agentmods.dev/rules/bybren-llc/safe-agentic-workflow/16-stripe-payments"><img src="https://agentmods.dev/badge/rules/bybren-llc/safe-agentic-workflow/16-stripe-payments.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00779 |
| Opus 5 | $0.00000 | $0.00390 |
| Sonnet 5 | $0.00000 | $0.00156 |
| Haiku 4.5 | $0.00000 | $0.00078 |
Grade A, and why
16-stripe-payments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- 16-stripe-payments — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Stripe Payment Rules
These rules apply when working on Stripe payment integration, webhooks, checkout flows, or subscription management.
Test Mode Safety (CHECK FIRST)
Before ANY payment work:
- Verify
STRIPE_SECRET_KEYstarts withsk_test_ - Confirm test webhook secret (
whsec_...from Stripe CLI) - Use test card numbers only (4242 4242 4242 4242)
- Never use production keys in development
Webhook Handler Pattern
ALWAYS verify webhook signatures and handle idempotency:
import stripe
from fastapi import Request, HTTPException
async def handle_stripe_webhook(request: Request):
payload = await request.body()
signature = request.headers.get("stripe-signature")
try:
event = stripe.Webhook.construct_event(
payload, signature, settings.STRIPE_WEBHOOK_SECRET
)
except stripe.error.SignatureVerificationError:
raise HTTPException(status_code=400, detail="Invalid signature")
# Idempotency: check if event already processed
existing = await get_webhook_event(event.id)
if existing:
return {"status": "already_processed"}
# Process event and record
await process_event(event)
await record_webhook_event(event.id, event.type)
return {"status": "processed"}
Idempotency Checklist
For ALL webhook handlers:
- Store event ID before processing
- Check for duplicate events before processing
- Use database transactions for atomicity
- Return 200 OK even on idempotency skip (Stripe retries on non-200)
Common Webhook Events
SUBSCRIPTION_EVENTS = [
"customer.subscription.created",
"customer.subscription.updated",
"customer.subscription.deleted",
"invoice.payment_succeeded",
"invoice.payment_failed",
]
Local Webhook Testing
Use the Stripe CLI to forward events locally:
# Start webhook forwarding
stripe listen --forward-to localhost:8000/api/v1/webhooks/stripe
# Trigger test events
stripe trigger checkout.session.completed
stripe trigger invoice.payment_succeeded
stripe trigger customer.subscription.deleted
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 118 lines · 0 tokens per session scan A 257ef238d21b
16-stripe-payments is a cursor rule published in the GitHub repository bybren-llc/safe-agentic-workflow (406 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 779 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
paddle-integration
Conventions for Paddle integration code.
vtex-io-vtex-io-storefront-theme-app
Apply when designing or modifying a VTEX IO storefront theme app — the app that owns store/blocks.json, store/routes.json, store/templates/, store/contentSchemas.json, and the storefront page tree assembled from store.home, store.product, store.search, store.custom, and other native page templates. Covers how a theme…
react-composition-patterns
React composition patterns for scalable component architecture including compound components, context providers, state management, boolean prop alternatives, render props vs children, and React 19 API changes. Use when refactoring components with many boolean props, building component libraries, designing flexible…
cis-innovation-oracle
CIS Agent — Victor (Disruptive Innovation Oracle).
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.