stripe
Skill2 starsChanged 4 months agoMITView on GitHub
Use to accept payments — Checkout, Payment Intents, subscriptions — and to securely handle webhooks with signature verification.
- Reads credentials
- Installs packages
15 other projects use a version of this.
Adopted by
Most recently taken up by
- obra/muse-skillstheir own version, first seen Sep 26, 2026
- SnowBeatRain/skillstheir own version, first seen Sep 15, 2026
- schroneko/skillstheir own version, first seen Sep 3, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- Shanksg/clawskillstheir own version, first seen Aug 2, 2026
- magnus919/agent-skillstheir own version, first seen Jul 21, 2026
Used with
Projects with it also use hubspot and notion.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
refly-aiSkillhubspot
Integrate with HubSpot for CRM management. Use when you need to: (1) manage contacts and deals, (2) track sales pipelines, or (3) automate marketing and CRM workflows.
Also in 3 projects that use this
SentrySkillnotion
Search, fetch, create, update, and move Notion pages and data sources. Use when users ask to look up docs, specs, notes, meeting notes, project context, roadmaps, trackers, or internal references stored in Notion, or when they explicitly ask to create or edit Notion content.
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 15
- vercel-labs/emulate★ 1.9ksame name
- Mindrally/skills★ 266same name
- refly-ai/refly-skills★ 203same name
- HybridAIOne/hybridclaw★ 157same name
- magnus919/agent-skills★ 109same name
- algoderiv/agent-skills★ 59same name
- alanalvestech/hitank★ 38same name
- kumaran-is/claude-code-onboarding★ 36same name
- obra/muse-skills★ 14same name
- YepAPI/skills★ 8same name
5 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- anthropicSkill
- clerkSkill
- cloudflare-workersSkill
- dockerSkill
- fly-ioSkill
- github-actionsSkill
- neonSkill
- netlifySkill
- nextjsSkill
- openaiSkill
- prismaSkill
- railwaySkill
- renderSkill
- resendSkill
- sentrySkill
- supabaseSkill
- tailwindcssSkill
- terraformSkill
- upstash-redisSkill
- vercelSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Use when: you need one-time payments, subscriptions, or a checkout flow.
- Distinctive: line 22
Use when: you must react to payment events (fulfill orders, grant access).
- Distinctive: line 23
Don't use for: storing raw card numbers yourself (let Stripe handle PCI scope).
- Distinctive: line 124
Verify every webhook signature — otherwise an attacker can POST fake "payment succeeded" events.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stripe — Skillship
Accept payments online. The fastest path is Stripe Checkout (a hosted payment page); the durable source of truth for "did they actually pay?" is a webhook you verify with a signature.
🧭 When to use this skill
- Use when: you need one-time payments, subscriptions, or a checkout flow.
- Use when: you must react to payment events (fulfill orders, grant access).
- Don't use for: storing raw card numbers yourself (let Stripe handle PCI scope).
⚡ Quickstart
1. Install
npm install stripe @stripe/stripe-js2. Configure env (Dashboard → Developers → API keys)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_... # safe for the browser
STRIPE_SECRET_KEY=sk_test_... # SERVER ONLY — never expose
STRIPE_WEBHOOK_SECRET=whsec_... # from `stripe listen` or Dashboard3. Server client
// lib/stripe.ts
import "server-only";
import Stripe from "stripe";
export const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);🧩 Common recipes
Recipe: Create a Checkout Session (Next.js Route Handler)
// app/api/checkout/route.ts
import { stripe } from "@/lib/stripe";
import { NextResponse } from "next/server";
export async function POST(req: Request) {
const origin = req.headers.get("origin")!;
const session = await stripe.checkout.sessions.create({
mode: "payment", // "subscription" for recurring, "setup" to save a card
line_items: [{ price: process.env.PRICE_ID!, quantity: 1 }], // never trust client-sent prices
success_url: `${origin}/success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${origin}/?canceled=true`,
automatic_tax: { enabled: true },
});
return NextResponse.redirect(session.url!, 303);
}Always set the amount/price on the server from a trusted price ID — never from the request body.
Recipe: Verify a webhook (this is the important one)
// app/api/webhooks/stripe/route.ts
import { stripe } from "@/lib/stripe";
export async function POST(req: Request) {
const body = await req.text(); // RAW body — do not JSON.parse first
const sig = req.headers.get("stripe-signature")!;
let event;
try {
event = stripe.webhooks.constructEvent(body, sig, process.env.STRIPE_WEBHOOK_SECRET!);
} catch (err) {
return new Response(`Webhook Error: ${(err as Error).message}`, { status: 400 });
}
// Return 2xx FAST; do heavy work async / idempotently
switch (event.type) {
case "checkout.session.completed":
// fulfill the order — key off event.id to dedupe
break;
case "payment_intent.succeeded":
break;
default:
break;
}
return new Response(null, { status: 200 });
}Recipe: Test webhooks locally
stripe login
stripe listen --forward-to localhost:3000/api/webhooks/stripe
# copy the printed whsec_... into STRIPE_WEBHOOK_SECRET
stripe trigger payment_intent.succeededRecipe: Test cards
| Scenario | Card |
| Success | 4242 4242 4242 4242 |
| Requires 3DS auth | 4000 0025 0000 3155 |
| Declined | 4000 0000 0000 9995 |
🚀 Ship to production
- Switch from
sk_test_/pk_test_to live keys, set in the host secret store. - Webhook endpoint is public HTTPS and registered in the Dashboard for the events you need.
- Signature verification uses the raw request body (disable body parsing / don't
JSON.parsefirst). - Handler returns
2xxquickly; fulfillment runs async and is idempotent (dedupe byevent.id). - Don't assume event ordering; refetch objects via the API when needed.
- Exempt the webhook route from CSRF protection.
- Fulfill only after payment success events — never on the client redirect alone.
🔐 Security & secrets
STRIPE_SECRET_KEYandSTRIPE_WEBHOOK_SECRETare server-only. Never bundle them to the client.- Verify every webhook signature — otherwise an attacker can POST fake "payment succeeded" events.
- Stripe includes a timestamp in the signature (default 5-min tolerance) to block replay attacks; keep server clocks synced (NTP). Never set tolerance to
0. - Roll the signing secret periodically or if compromised.
🐛 Common errors & fixes
| Symptom | Likely cause | Fix |
No signatures found matching the expected signature | Body was parsed/modified before verify | Use the raw body (await req.text()), not parsed JSON |
| Webhook shows as failed / timeout | Doing heavy work before responding | Return 200 first, process async |
| Duplicate fulfillment | Stripe retried the event | Dedupe by event.id; make handlers idempotent |
| Order fulfilled but no payment | Fulfilling on client redirect | Fulfill on checkout.session.completed webhook |
Invalid API Key provided | Test vs live key mismatch | Match key mode to environment |
📚 Sources
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

