
// Agents and skills //
Subscriptions with Stripe
runs in Claude Code
A Claude Code skill that has Claude build, or review, subscription billing for an app with Stripe. It's for people charging for the first time and for people who already charge and don't fully trust what they built. Claude writes the code and the tests; creating the product, price, coupon, and endpoint in the Stripe dashboard and pasting the production key are on you, and the skill hands you the checklist. The core rule: only the webhook writes the subscription state. The checkout return page doesn't unlock anything, the user's actions change Stripe and wait, and a single function decides who has the plan, the same way in the database and in the app. It starts by reading the project and figuring out where billing stands (no billing, access granted without a webhook, the customer's account page missing, retention for people who want to leave, or going to production) and acts accordingly. What it delivers: checkout with a recurring price, a one-time entry price, and a trial period, only for people who have never subscribed; the webhook as the only writer, with the raw body, signature verification, an events table so nothing gets processed twice, and the right response to out-of-order events; an access function in SQL and in TypeScript, with the same list of test cases on both ends; portal, pause, and resume; cancellation with a form and retention, with the gate on the server and the offer calculated from the coupon; five reference sheets (checkout, webhook, portal, cancellation, and production), six templates ready to adapt, and a checker, conferir.py, that only reads the project and flags Stripe keys in files, writes to the subscriptions table outside the webhook, and webhooks without signature verification. Limitations: the skill doesn't create anything in the Stripe dashboard, doesn't paste keys, and doesn't make real purchases, refunds, or cancellations. It covers one plan per person; plan changes, multiple seats, usage-based billing, marketplaces, tax invoices, and taxes are out of scope. The templates are TypeScript and Postgres. Parameters were checked against the types in version 23 of the stripe package for Node, the SQL ran on Postgres 18, and the boundary test ran in Vitest, but no template was run against a Stripe account: the final test is in your test mode. Whatever the sheets mark as "to check in the Stripe docs" hasn't been verified. The mandatory form before canceling carries a risk of friction and of running into consumer-protection rules: the skill warns you and records your decision, but doesn't assess legality. The checker reads text, doesn't follow imports, and doesn't understand writes made through an ORM; not finding something doesn't prove it isn't there. Requirements: Python 3.8 or newer, only for the checker, which uses only the standard library, doesn't access the network, and never prints a key's value. To install, unzip the .zip into ~/.claude/skills/.
- Runs in Claude Code
- Intermediate
A Claude Code skill that has Claude build, or review, subscription billing for an app with Stripe. It's for people charging for the first time and for people who already charge and don't fully trust what they built. Claude writes the code and the tests; creating the product, price, coupon, and endpoint in the Stripe dashboard and pasting the production key are on you, and the skill hands you the checklist. The core rule: only the webhook writes the subscription state. The checkout return page doesn't unlock anything, the user's actions change Stripe and wait, and a single function decides who has the plan, the same way in the database and in the app. It starts by reading the project and figuring out where billing stands (no billing, access granted without a webhook, the customer's account page missing, retention for people who want to leave, or going to production) and acts accordingly. What it delivers: checkout with a recurring price, a one-time entry price, and a trial period, only for people who have never subscribed; the webhook as the only writer, with the raw body, signature verification, an events table so nothing gets processed twice, and the right response to out-of-order events; an access function in SQL and in TypeScript, with the same list of test cases on both ends; portal, pause, and resume; cancellation with a form and retention, with the gate on the server and the offer calculated from the coupon; five reference sheets (checkout, webhook, portal, cancellation, and production), six templates ready to adapt, and a checker, conferir.py, that only reads the project and flags Stripe keys in files, writes to the subscriptions table outside the webhook, and webhooks without signature verification. Limitations: the skill doesn't create anything in the Stripe dashboard, doesn't paste keys, and doesn't make real purchases, refunds, or cancellations. It covers one plan per person; plan changes, multiple seats, usage-based billing, marketplaces, tax invoices, and taxes are out of scope. The templates are TypeScript and Postgres. Parameters were checked against the types in version 23 of the stripe package for Node, the SQL ran on Postgres 18, and the boundary test ran in Vitest, but no template was run against a Stripe account: the final test is in your test mode. Whatever the sheets mark as "to check in the Stripe docs" hasn't been verified. The mandatory form before canceling carries a risk of friction and of running into consumer-protection rules: the skill warns you and records your decision, but doesn't assess legality. The checker reads text, doesn't follow imports, and doesn't understand writes made through an ORM; not finding something doesn't prove it isn't there. Requirements: Python 3.8 or newer, only for the checker, which uses only the standard library, doesn't access the network, and never prints a key's value. To install, unzip the .zip into ~/.claude/skills/.
How to use
01
Copy the prompt
Use the Copy prompt button on this page.
02
Paste it into your AI
Open Claude Code in the project folder and paste the prompt.
03
Install the skill you downloaded
Install the downloaded file in Claude and call the skill in any chat.
In the package
- Prompt ready to copy and paste
- Skill as a .zip to install in Claude