/engineering-advanced-skills:stripe-integration-expertfrom engineering-advanced-skills
Implements production-grade Stripe billing: subscriptions, checkout, proration, usage-based metering, idempotent webhooks, customer portal, dunning, and SCA/3D Secure. Provides patterns for Next.js, Express, and Django.
Ships in engineering-advanced-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
The agent builds production-grade Stripe integrations for SaaS billing: subscription lifecycle management with trials and proration, idempotent webhook handlers, usage-based metered billing, Checkout sessions, Customer Portal, dunning recovery, and SCA/3D Secure compliance. Provides patterns for Next.js, Express, and Django with emphasis on real-world edge cases.
Before building the integration, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Three stdlib CLIs. The two checkers are regex-based: they confirm the common safeguards are present, not that they are correct, so read the flagged handler before declaring it fixed.
| Tool | Purpose | Example (runs as written) |
|---|---|---|
scripts/webhook_validator.py | Webhook handler check: signature verification, event dedup, required billing events, 200-on-error, hardcoded whsec_ secrets (--json, --strict fails on warnings) | python scripts/webhook_validator.py assets/sample_project_flawed |
scripts/integration_auditor.py | Integration audit: hardcoded keys, unpinned apiVersion, missing idempotency keys, hardcoded price IDs, checkout without metadata, .env exposure (--json, --severity critical/warning/info) | python scripts/integration_auditor.py assets/sample_project_sound |
scripts/checkout_scaffolder.py | Generate checkout, webhook, subscription, portal and usage (meter events) code for nextjs, express or django (--features, --all, --json, --list-features) | python scripts/checkout_scaffolder.py --framework nextjs --features checkout,webhooks |
Exit codes: 0 pass; 1 critical findings (validator: also warnings under --strict, or
no webhook handler found); 2 bad input (path is not a directory, unknown feature). The
auditor exits 0 with status NO_STRIPE_CODE when the target contains no Stripe code, so
check the status rather than the exit code alone.
Samples: assets/sample_project_flawed/ (unverified payload, no dedup, 5 billing events
missing, unpinned version, no checkout metadata) exits 1 on both checkers;
assets/sample_project_sound/ exits 0 on both.
Before writing code that names an API version or a newer Stripe feature, check Stripe's API changelog: pinned versions and billing APIs change yearly, and the references here are a snapshot.
checkout_scaffolder.py (or adapt the reference code).python scripts/webhook_validator.py path/to/project --strict
python scripts/integration_auditor.py path/to/project --severity warning
stripe listen --forward-to localhost:3000/api/webhooks/stripe, then stripe trigger invoice.payment_failed) and verify that each handled event changes local state exactly once, including on a replay.apiVersion is the version your SDK ships with (2026-10-28.endive for stripe-node 23.1.0, as of November 2026).Load the reference that matches the task — keep this file lean and pull detail on demand:
| Skill | Use When |
|---|---|
| ab-test-setup | Testing pricing page variants and checkout flows |
| analytics-tracking | Tracking checkout and subscription conversion events |
| email-template-builder | Building dunning and billing notification emails |
| api-design-reviewer | Reviewing your billing API endpoints |
This skill covers:
This skill does NOT cover:
ra-qm-team/ compliance skills for regulatory guidanceskill-security-auditor for security review patternsMistake: Acting on JSON.parse(body) without constructEvent, or on stale object state in the event.
Why it happens: Local testing works without signatures, and the payload already contains the object.
Instead: Verify the signature against the raw body, then re-fetch the subscription or invoice from the API before writing state. Events arrive out of order and can be replayed.
Mistake: Catching every error in the webhook handler and answering 200.
Why it happens: It silences Stripe's retry emails.
Instead: Return 5xx on processing failure so Stripe retries, and make the handler idempotent on event.id so retries are safe.
Mistake: Keying meter events or idempotency keys on Date.now().
Why it happens: It looks unique.
Instead: Use a stable business identifier (request ID, job ID). A timestamp changes on retry, so the same usage is billed twice.
| File | Purpose |
|---|---|
scripts/webhook_validator.py | Webhook handler safeguards check |
scripts/integration_auditor.py | Integration anti-pattern audit |
scripts/checkout_scaffolder.py | Framework boilerplate generator |
assets/sample_project_flawed/stripe_webhook.ts | Flawed handler and checkout (checkers exit 1) |
assets/sample_project_sound/stripe_webhook.ts | Sound handler and checkout (checkers exit 0) |
references/*.md | Payment flows, subscriptions and meters, webhooks, testing |
assets/sample_project_flawed/stripe_webhook.ts (opens in a new tab)assets/sample_project_sound/stripe_webhook.ts (opens in a new tab)references/payment-flows.md (opens in a new tab)references/subscriptions.md (opens in a new tab)references/testing-and-troubleshooting.md (opens in a new tab)references/webhooks.md (opens in a new tab)scripts/checkout_scaffolder.py (opens in a new tab)scripts/integration_auditor.py (opens in a new tab)scripts/webhook_validator.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
100 skills in this plugin
/a11y-auditStatic WCAG scan of HTML files (alt text, headings, labels, ARIA, lang, landmarks) and colour contrast checks for colour pairs or CSS. Use when auditing templates for accessibility, checking contrast, or adding an a11y gate to CI.
/agent-designerDesigns multi-agent system architectures with orchestration patterns, tool schemas, and performance evaluation. Use when building AI agent systems, designing agent workflows, creating tool schemas, or evaluating agent performance.
/agent-harnessTest and evaluation harness for AI agents — scenario suites, deterministic replay, regression diffing, cost and latency budgets. Use when agent quality is vibe-checked, before shipping a prompt or model change, or when evals drift.
/agenthubRuns a multi-agent job as a dependency graph: validates the DAG, tracks each agent's state on a board, then ranks and merges their outputs. Use when spawning parallel agents, monitoring a run, or merging results.
/agentic-evaluation-frameworkBuilds LLM and agent evals: weighted rubrics, LLM-as-judge design, inter-rater agreement and pairwise ranking (Elo, Bradley-Terry) from scores you collect. Use when setting up a judge, scoring outputs, or comparing model or prompt variants.
/agent-protocolDesign AI agent communication protocols: MCP tool schemas, A2A, function calling, and inter- agent messaging. Use when building multi-agent systems, defining tool interfaces, or implementing agent-to-agent communication.
npx claudepluginhub borghei/claude-skills --plugin engineering-advanced-skills2 plugins ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job