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.
npx skills add Kevin-Liu-01/Agent-Machines --skill stripe-webhook-hardeninggit clone --depth 1 https://github.com/Kevin-Liu-01/Agent-MachinesWrote 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/skills/kevin-liu-01/agent-machines/stripe-webhook-hardening)<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/stripe-webhook-hardening"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/stripe-webhook-hardening/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/stripe-webhook-hardening"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/stripe-webhook-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00082 | $0.00655 |
| Opus 5 | $0.00041 | $0.00328 |
| Sonnet 5 | $0.00016 | $0.00131 |
| Haiku 4.5 | $0.00008 | $0.00065 |
Grade A, and why
stripe-webhook-hardening 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Stripe Webhook Hardening
Harden Stripe webhook handlers against the three ways generated webhook code most commonly fails in production.
The Three Invariants
1. Raw-Body Signature Verification
The route MUST read the raw request body and verify stripe-signature before any JSON parsing. stripe.webhooks.constructEvent(rawBody, sig, secret) is the only valid entry point.
Failure mode: parsing JSON before constructEvent makes signature verification impossible — the signature covers the raw bytes, not the parsed object.
2. Negative-Lifecycle Handling
Failure and cancellation events (invoice.payment_failed, customer.subscription.deleted) MUST change real product state, not just log.
Failure mode: treating these as log-only events means users keep access after payment failure or cancellation.
3. Idempotent Side Effects
Every side effect MUST be replay-safe. Stripe retries and may deliver the same event more than once.
Implementation options (all valid):
- Store processed event IDs (good default)
- Use a stable business idempotency key (e.g.,
checkout_session.id) - Use naturally idempotent state-setting updates (e.g.,
UPDATE SET status = 'canceled')
The stronger invariant is that the mutation itself must be replay-safe.
Review Checklist
- Does the route read raw request body and verify
stripe-signaturebefore any parsing? - Do failure and cancellation events change real product state, not just log?
- Is every side effect idempotent under replay?
- Are there tests and an operational verification path through the Stripe dashboard?
Architecture
Webhook routes should be thin ingress adapters. Shared billing helpers own verification, dispatch, idempotency, and state transitions. One shared billing path handles all billing mutations.
Dedalus Canon
apps/website/app/api/(webhooks)/stripe/route.ts— fail-closed ingress patternapps/website/services/stripe/webhooks/payment-handlers.ts—invoice.payment_failedstate update + checkout idempotency keyapps/website/services/stripe/webhooks/subscription-handlers.ts—customer.subscription.deleted→ downgrade to Hobby
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.
- 9d ago First seen · 65 lines · 82 tokens per session scan A 4831edaf1537
stripe-webhook-hardening is a skill published in the GitHub repository Kevin-Liu-01/Agent-Machines (29 stars, last pushed yesterday), licensed MIT. It adds 82 tokens to every session and 655 once invoked, about $0.0004 per session on Opus 5. 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 skills, from other repositories
marketplace-purchase-vetting
Use this when the user asks whether a local listing is a scam, "too good to be true," worth looking at, or a good deal. Also use this when he asks you to find options — search/discover candidates, then vet the best ones. The goal is not a generic buying guide; it is a practical risk read with clear next steps.
simmer-skill-builder
Generate complete, installable OpenClaw trading skills from natural language strategy descriptions. Use when your human wants to create a new trading strategy, build a bot, generate a skill, automate a trade idea, turn a tweet into a strategy, or asks "build me a skill that...". Produces a full skill folder (SKILL.md…
simmer
The prediction market interface for AI agents. Trade Polymarket and Kalshi through one API with self-custody wallets, safety rails, and smart context.
prediction-trade-journal
Auto-log trades with context, track outcomes, generate calibration reports to improve trading.
recurrent-payment
A recurring-payment workflow for T-Kassa, a payment service. It links a customer's card during an initial payment and later charges that saved payment authorisation for a subscription.
refund-flow
Refund a bKash payment safely — verify first, refund, then confirm refund status.