setup-billing

setup-billing is a skill for Claude Code from evgenii-studitskikh/Claude-Code-SaaS-Studio. It costs 39 tokens per session (702 once invoked), scanned A, original, MIT.

An implementation plan for Stripe billing, the payment service, including products, prices, checkout, customer self-service, and webhook handling. Webhooks are messages Stripe sends to report payment and subscription events.

In plain words
What is it for?
Use it to build plan configuration, checkout and customer-portal endpoints, and a verified webhook handler after an approved pricing specification is available.
Why use it?
It removes the need to design the billing flow and its server endpoints from scratch. It also includes signature checks and idempotency, which help reject forged events and avoid processing the same event twice.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; names the AskUserQuestion tool.

Install

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.

agentmods
npx agentmods add skills/evgenii-studitskikh/claude-code-saas-studio/setup-billing
Any agent
npx skills add evgenii-studitskikh/Claude-Code-SaaS-Studio --skill setup-billing
Clone the repo
git clone --depth 1 https://github.com/evgenii-studitskikh/Claude-Code-SaaS-Studio

Made for: Claude Code.

Wrote 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.

agentmods badge for setup-billing

README.md
[![agentmods](https://agentmods.dev/badge/skills/evgenii-studitskikh/claude-code-saas-studio/setup-billing.svg)](https://agentmods.dev/skills/evgenii-studitskikh/claude-code-saas-studio/setup-billing)
Your own site
<a href="https://agentmods.dev/skills/evgenii-studitskikh/claude-code-saas-studio/setup-billing"><img src="https://agentmods.dev/badge/skills/evgenii-studitskikh/claude-code-saas-studio/setup-billing.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 702 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00702
Opus 5 $0.00019 $0.00351
Sonnet 5 $0.00008 $0.00140
Haiku 4.5 $0.00004 $0.00070

Measured 5d ago against content hash e3fe63fc4b97, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

setup-billing 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 5d 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.

.claude/skills/setup-billing/SKILL.md · 23 lines

How it starts

The opening of the file, as written. The whole thing — 23 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Wire up the full Stripe billing integration based on the approved pricing spec: create Stripe products and prices programmatically from a config file, implement the checkout and portal flows, and build a webhook handler that is safe to deploy to production. Non-autonomous: implementation plan is presented and approved before any code is written.

Phases

  1. Load pricing spec — read docs/specs/pricing.md. If it is missing or incomplete, stop and direct to /design-pricing. Confirm the Stripe account mode (test vs. live) and that STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET are present in .env.example.
  2. Present implementation plan — show the files that will be created: lib/stripe/config.ts (plan definitions), lib/stripe/client.ts (server-side Stripe instance), app/api/stripe/checkout/route.ts (checkout session endpoint), app/api/stripe/portal/route.ts (customer portal endpoint), app/api/stripe/webhook/route.ts (webhook handler), and any UI components for pricing and upgrade buttons. Get approval before writing.
  3. Implement config and client — write lib/stripe/config.ts with plan definitions loaded from environment variables or a static config object (no hardcoded price IDs in business logic). Write lib/stripe/client.ts exporting a server-only Stripe instance. Show files before writing.
  4. Implement checkout and portal — write the checkout session route handler (creating or retrieving the Stripe Customer, setting success_url and cancel_url, attaching metadata for tenant/user ID) and the customer portal handler. Both must validate that the requesting user is authenticated via Supabase Auth.
  5. Implement webhook handler — write app/api/stripe/webhook/route.ts that: (a) reads the raw request body using request.text(), (b) calls stripe.webhooks.constructEvent with STRIPE_WEBHOOK_SECRET, (c) handles checkout.session.completed, customer.subscription.updated, and customer.subscription.deleted events, (d) uses an upsert or idempotency key pattern in Supabase to prevent duplicate processing, and (e) returns 200 immediately — any heavy processing is deferred.
  6. Verify and review — run tsc --noEmit to confirm no TypeScript errors. Invoke /code-review on the billing files. Update docs/specs/pricing.md with any implementation notes. Next step: point to /setup-deploy. Honor the review intensity: under full, walk through each implementation file for sign-off; under lean, get a single confirmation before writing; under solo, proceed and summarize after.

Read the full file on GitHub · 23 lines

Changes

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.

  1. 5d ago First seen · 23 lines · 39 tokens per session scan A e3fe63fc4b97

Subscribe to this mod's changes

setup-billing is a skill published in the GitHub repository evgenii-studitskikh/Claude-Code-SaaS-Studio (1 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 702 once invoked, about $0.0002 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-08-31.

Related

Other skills, from other repositories

billing-automation

Build automated billing systems for recurring payments, invoicing, subscription lifecycle, and dunning management. Use when implementing subscription billing, automating invoicing, or managing recurring payment systems.

seaworld008/Commonly-used-high-value-skills · 40 tokens

favcrm-billing-commerce

Use for invoices, payments, products, orders, promotions, subscriptions, overdue follow-up, and commerce operations in FavCRM.

favcrm/mcp · 31 tokens

gumroad-support-refund-request

Handle buyer refund requests on Gumroad — standard, subscription, and duplicate-charge cases. Use when a ticket asks for money back, reports a double charge, or a seller is unresponsive to a refund. Decides eligibility, executes, and replies.

antiwork/skills · 57 tokens

asc-ppp-pricing

Set territory-specific pricing for subscriptions and in-app purchases using current asc setup, pricing summary, price import, and price schedule commands. Use when adjusting prices by country or implementing localized PPP strategies.

rorkai/app-store-connect-cli-skills · 45 tokens

stripe

Stripe API integration with managed OAuth. Manage customers, subscriptions, invoices, products, prices, and payments. Use this skill when users want to process payments, manage billing, or handle subscriptions with Stripe. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).…

CraftOS-dev/CraftBot · 79 tokens

ai-slop

Operational rubric that turns "don't make AI slop" into observable properties, severity levels, evidence requirements, and repair actions for interface design. Use as the reference rubric when building or reviewing marketing sites, product interfaces, dashboards, portfolios, or e-commerce pages, especially alongside…

waybarrios/opencode-power-pack · 61 tokens