← Cursor Skills · ENGINEERING
Stripe Billing Skill for Cursor
.cursor/skills/stripe-billing-webhooks
Checkout, raw-body webhook verification, idempotent handlers, and subscription state sync with a test checklist.
Where it installs
# .cursor/skills/stripe-billing-webhooks/SKILL.md
---
name: stripe-billing-webhooks
description: ...
---# .claude/skills/stripe-billing-webhooks/SKILL.md
---
name: stripe-billing-webhooks
description: ...
---
# identical content, skills are the same file in both editorsWhat it does
Stripe Billing Skill for Cursor is a Cursor skill: a SKILL.md playbook that AgenticKit installs at .cursor/skills/stripe-billing-webhooks. Cursor's agent loads it when the task matches the skill description, instead of stuffing the same rules into every chat.
A Cursor Stripe skill for the failure modes agents hit most: Checkout sessions created without metadata, webhook signatures verified against a parsed body, duplicate events applied twice, and subscription state that drifts from Stripe. Ends with a test checklist to run before you take real payments.
Checkout, raw-body webhook verification, idempotent handlers, and subscription state sync with a test checklist. The file is domain knowledge, not a slash macro. You do not type it. The agent reads it when the job is stripe billing webhooks.
Why it exists
Default Cursor has no memory of how your team ships code, schema, and tests. Founders paste the same conventions into chat, then watch the model drift on the next turn. This skill exists so those conventions live on disk and load only when relevant.
It ships in the Engineering Kit. It is wired to Third-Party Integration Lead (integration-engineer), Senior Backend Architect (backend-architect), and App Security Auditor (security-auditor). It is wired to the /stripe-billing: Stripe Billing & Subscription Setup and /audit: Codebase Quality & Security Auditor commands. That graph is the point: the skill is the standard, the agent is the role, the command is the trigger.
When to use it
- Use Stripe Billing Skill for Cursor when the work is specifically about checkout, raw-body webhook verification, idempotent handlers, and subscription state sync with a test checklist.
- Load it before a long session that will touch this surface more than once. A one-line edit does not need the full playbook.
- Use it on production SaaS work (multi-tenant apps, paid features, anything that will be reviewed) rather than a throwaway prototype.
When not to use it
- Do not treat the skill as a replacement for a slash command. Skills teach. Commands run a pipeline.
- Do not paste the whole SKILL.md into chat. If Cursor is not loading it, fix the description or invoke the matching command.
- Do not use it as a generic 'write better code' rule. Scope is this domain only.
Example workflow
- Install the Engineering Kit so .cursor/skills/stripe-billing-webhooks lands in the repo.
- Open a new Cursor agent chat pointed at the files this skill governs.
- Ask the Third-Party Integration Lead (integration-engineer) to read the skill, or run /stripe-billing: Stripe Billing & Subscription Setup.
- Review the first artifact against the practices below. If it violates one, stop and correct the file. Do not prompt 'just finish it'.
- Commit the skill-guided files with the rest of the slice so the next session inherits the same standard.
Example usage
Example prompt: "Read .cursor/skills/stripe-billing-webhooks and apply it to this change. Do not invent extra conventions."
Or trigger the pipeline: /stripe-billing: Stripe Billing & Subscription Setup. That command is written to load this skill.
Check the output against: Read the webhook body with request.text() before any JSON parsing, then pass that raw string to stripe.webhooks.constructEvent; a re-serialized body fails verification
Example output
- The skill itself does not write a single output file. It changes what the agent is allowed to produce in code, schema, and tests.
- When you run /stripe-billing: Stripe Billing & Subscription Setup, expect repo files plus notes under docs/, not a chat-only answer.
Best practices
- Read the webhook body with request.text() before any JSON parsing, then pass that raw string to stripe.webhooks.constructEvent; a re-serialized body fails verification
- Store the Stripe event ID in a unique-constrained table and insert it before side effects, so a retried delivery is a no-op instead of a second upgrade
- Treat the database as a cache of Stripe: update plan, status, and current_period_end from customer.subscription.created/updated/deleted, never from the Checkout success redirect
- Pass client_reference_id and metadata (user or org ID) when creating the Checkout session so checkout.session.completed can be tied to an account without matching on email
- Return 2xx quickly and push slow work to a queue; handle out-of-order events by re-fetching the object from Stripe instead of trusting the event payload alone
- Keep separate test-mode and live-mode webhook secrets per environment and fail loudly at boot if STRIPE_WEBHOOK_SECRET is missing
- Test checklist: bad signature returns 400, replayed event ID changes nothing, payment_failed moves the account to past_due, cancel at period end keeps access until the period ends, and the Stripe CLI can replay each event locally
- Before launch, run the free security scan tool on your deployed URL to catch exposed keys or missing headers around the billing routes
Common mistakes
- Ignoring "Read the webhook body with request.text() before any JSON parsing, then pass that raw string to stripe.webhooks.constructEvent; a re-serialized body fails verification" and hoping a later prompt will clean it up.
- Copying the skill into .cursor/rules as always-on. That burns context and fights Cursor's load-on-match design.
- Running two overlapping skills that contradict each other in the same turn.
- Letting the agent skip tests or types because 'the skill is about architecture'.
Frequently asked questions
What is the Stripe Billing Skill for Cursor Cursor skill?
A Cursor Stripe skill for the failure modes agents hit most: Checkout sessions created without metadata, webhook signatures verified against a parsed body, duplicate events applied twice, and subscription state that drifts from Stripe. Ends with a test checklist to run before you take real payments. It lives at .cursor/skills/stripe-billing-webhooks after you install the Engineering Kit.When should I use stripe-billing-webhooks instead of a Cursor rule?
Use a rule for always-on or glob-scoped constraints. Use this skill for the full playbook that should load only when the task matches.Which agents read stripe-billing-webhooks?
Third-Party Integration Lead (integration-engineer); Senior Backend Architect (backend-architect); App Security Auditor (security-auditor). Those roles are told to open this file before they edit.Which commands use stripe-billing-webhooks?
/stripe-billing: Stripe Billing & Subscription Setup; /audit: Codebase Quality & Security Auditor.Does this skill work outside AgenticKit?
Yes. A SKILL.md in .cursor/skills/stripe-billing-webhooks is a normal Cursor skill. AgenticKit is the packaged version plus the agent and command graph.
Add stripe-billing-webhooks and the other 48 Cursor skills
AgenticKit installs 61 skills, 46 agents, and 47 slash commands into .cursor/. One license, lifetime updates.