Agent skill

Stripe Patterns

by bybren-llc in bybren-llc/safe-agentic-workflow

Stripe payment integration patterns. An agent skill from bybren-llc/safe-agentic-workflow.

MITAuto-check passedBackend & APIs

Install Stripe Patterns

skills CLI
$ npx skills add bybren-llc/safe-agentic-workflow --skill stripe-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bybren-llc/safe-agentic-workflow stripe-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/stripe-patterns .claude/skills/stripe-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stripe-patterns
GitHub stars
423
Token cost
~1.1k tokens
SKILL.md length
188 words
Files
2
Skills in repo
42
Repo updated
First seen
Licence
MIT

At a glance

Stripe payment integration patterns. An agent skill from bybren-llc/safe-agentic-workflow.

  • Implementing payment flows
  • SKILL.md covers Purpose, When This Skill Applies, Canonical Code References and Critical Rules, plus 3 more sections
  • Needs STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET
  • Handling webhooks

What it does

Stripe Patterns is an agent skill from bybren-llc/safe-agentic-workflow. Stripe payment integration patterns. Use when implementing payment flows, handling webhooks, or working with subscriptions. Routes to existing patterns and provides evidence templates for payment testing.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `README.md`).

It sits in Backend & APIs, covering Webhooks and Payments and billing. It works with Stripe. The repository describes itself as: SAW — SAFe Agentic Workflow AI Agent Harness for Multi-Agent Team Workflows Built on SAFe methodology (Scaled Agile Framework), adapted for AI agent teams (Now With AI-DLC!)… The licence is MIT.

When your agent uses it

  • Implementing payment flows
  • Handling webhooks
  • Working with subscriptions

Example prompts

  • “/stripe-patterns”

Requirements

  • A credential in STRIPE_SECRET_KEY
  • A credential in STRIPE_WEBHOOK_SECRET
  • Pre-approved tools (allowed-tools): Read, Grep, Glob

What it can do on your machine

Read from SKILL.md and the folder at commit 26ca58b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • stripe.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • STRIPE_SECRET_KEY
    • STRIPE_WEBHOOK_SECRET

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Stripe Patterns loads about 1.1k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 188 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bybren-llc/safe-agentic-workflow at commit 26ca58b, republished under its MIT licence (© bybren-llc). 188 words, ~1,071 tokens.

Download SKILL.mdSave it as .claude/skills/stripe-patterns/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
stripe-patterns
description
Stripe payment integration patterns. Use when implementing payment flows, handling webhooks, or working with subscriptions. Routes to existing patterns and provides evidence templates for payment testing.
allowed-tools
Read, Grep, Glob
user-invocable
false

Stripe Patterns Skill

Purpose

Guide safe and consistent Stripe integration. Routes to existing payment patterns and provides evidence templates for testing.

When This Skill Applies

Invoke this skill when:

  • Creating or modifying checkout flows
  • Implementing Stripe webhooks
  • Working with subscriptions or invoices
  • Testing payment functionality
  • Handling refunds or disputes

Canonical Code References

Configuration
  • Stripe Client Factory: lib/stripe-config.ts
    • Use createStripeClient() for consistent API version
    • Never hardcode API keys
API Routes
  • Checkout Session: app/api/payments/create-checkout-session/route.ts
  • Webhook Handler: app/api/payments/webhook/route.ts
Helpers
  • Payment Helpers: utils/data/payments/ (use RLS context)
  • Subscription Helpers: utils/data/subscriptions/
  • Invoice Helpers: utils/data/invoices/

Critical Rules

Test Mode Safety Checklist

Before ANY payment work:

  • Verify STRIPE_SECRET_KEY starts with sk_test_
  • Confirm test webhook secret (whsec_... from Stripe CLI)
  • Use test card numbers only (4242...)
  • Never use production keys in development
Idempotency Checklist

For webhook handlers:

  • Store event ID before processing
  • Check for duplicate events
  • Use database transactions
  • Return 200 OK even on idempotency skip
typescript
// Idempotent webhook pattern
await withSystemContext(prisma, "webhook", async (client) => {
  // Check if already processed
  const existing = await client.webhook_events.findUnique({
    where: { stripe_event_id: event.id },
  });
  if (existing) {
    console.log(`Skipping duplicate event: ${event.id}`);
    return;
  }

  // Process and record
  await client.webhook_events.create({
    data: {
      stripe_event_id: event.id,
      event_type: event.type,
      processed_at: new Date(),
    },
  });
});
Webhook Signature Verification

ALWAYS verify webhook signatures:

typescript
import { stripe } from "@/lib/stripe-config";

const signature = request.headers.get("stripe-signature");
const event = stripe.webhooks.constructEvent(
  body,
  signature,
  process.env.STRIPE_WEBHOOK_SECRET,
);

Common Patterns

Create Checkout Session
typescript
import { createStripeClient } from "@/lib/stripe-config";
import { withUserContext } from "@/lib/rls-context";

export async function createCheckout(userId: string, priceId: string) {
  const stripe = createStripeClient();

  // Store user context for success handling
  const session = await stripe.checkout.sessions.create({
    mode: "subscription",
    line_items: [{ price: priceId, quantity: 1 }],
    success_url: `${process.env.NEXT_PUBLIC_APP_URL}/success?session_id={{CHECKOUT_SESSION_ID}}`,
    cancel_url: `${process.env.NEXT_PUBLIC_APP_URL}/pricing`,
    metadata: { userId },
  });

  return session;
}
Handle Subscription Events
typescript
// Webhook event types to handle
const SUBSCRIPTION_EVENTS = [
  "customer.subscription.created",
  "customer.subscription.updated",
  "customer.subscription.deleted",
  "invoice.payment_succeeded",
  "invoice.payment_failed",
];

Evidence Template for Linear

When completing payment work, attach this evidence block:

markdown
**Payment Testing Evidence**

- [ ] Test mode verified (`sk_test_` key)
- [ ] Webhook signature verification tested
- [ ] Idempotency tested (duplicate event handling)
- [ ] Success flow tested (card 4242...)
- [ ] Failure flow tested (card 4000000000000002)
- [ ] Subscription lifecycle tested (create/update/cancel)

**Test Results:**

- Checkout session: [session_id]
- Webhook events processed: [count]
- Subscription status: [active/cancelled]

Authoritative References

  • Stripe Config: lib/stripe-config.ts
  • Webhook Route: app/api/payments/webhook/route.ts
  • Payment Tests: __tests__/payments/
  • Stripe Docs: https://stripe.com/docs

© bybren-llc, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .claude/skills/stripe-patterns of bybren-llc/safe-agentic-workflow.

  • SKILL.md
  • README.md

Open the folder on GitHubat commit 26ca58b

Compare with similar skills

Stripe Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Stripe Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stripe Patterns this skillbybren-llc/safe-agentic-workflow423—~1.1kAutomated safety check: PassMIT
Stripe Best Practicesfossasia/eventyay1.7k1 repos~1.7kAutomated safety check: PassApache-2.0
cmux Billing Runbookmanaflow-ai/cmux28k—~2.8kAutomated safety check: PassCustom licence
Stripe Integration Expertalirezarezvani/claude-skills28k1 repos~3.7kAutomated safety check: PassMIT
Payment Integrationaiskillstore/marketplace4308 repos~916Automated safety check: PassNone
Stripe Integrationdavila7/claude-code-templates32k—~634Automated safety check: PassMIT

Similar skills

  • Stripe Best Practices

    fossasia/eventyay

    Guides Stripe integration decisions across development and test environment planning (separate sandboxes vs the shared test mode sandbox), API selection (Checkout Sessions vs PaymentIntents)…

    1.7k GitHub starsUsed in 1 repo~1.7k tokens
    Backend & APIsAuto-check passed
  • cmux Billing Runbook

    manaflow-ai/cmux

    Runbook for the cmux billing code: Stripe Checkout, customer portal, subscription changes, webhooks and how Pro plan entitlement is resolved from Stack metadata.

    28k GitHub stars~2.8k tokensUpdated today
    Backend & APIsAuto-check passed
  • Stripe Integration Expert

    alirezarezvani/claude-skills

    Production-grade Stripe integrations: subscriptions with trials and proration, one-time payments, usage-based billing, checkout sessions, idempotent webhook handlers, customer portal, and invoicing.

    28k GitHub starsUsed in 1 repo~3.7k tokens
    Backend & APIsAuto-check passed
  • Payment Integration

    aiskillstore/marketplace

    Integrate Stripe, PayPal, and payment processors. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 8 repos~916 tokens
    Backend & APIsAuto-check passed
  • Stripe Integration

    davila7/claude-code-templates

    Get paid from day one. An agent skill from davila7/claude-code-templates.

    32k GitHub stars~634 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Stripe Integration Expert

    borghei/Claude-Skills

    Implement Stripe integrations for SaaS billing: subscriptions, checkout, proration, usage- based billing, idempotent webhooks, customer portal, dunning, and SCA.

    886 GitHub stars~1.6k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed

More from bybren-llc/safe-agentic-workflow

All 42 skills in this repo
  • Multi-Agent Coordination Template

    bybren-llc/safe-agentic-workflow

    Agent assignment matrix, blocker escalation, and TDM coordination patterns. Use when assigning work to specialist agents, managing blockers across agents…

    423 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • API Route Patterns

    bybren-llc/safe-agentic-workflow

    API route implementation patterns with RLS, validation, and error handling. Use when creating API routes, implementing CRUD endpoints, adding server-side…

    423 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Technical Documentation Templates

    bybren-llc/safe-agentic-workflow

    Documentation templates for ADRs, runbooks, architecture docs, and knowledge transfer documents. Use when creating Architecture Decision Records, writing…

    423 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Deployment SOP Checklist

    bybren-llc/safe-agentic-workflow

    Deployment workflows, pre-deploy validation, smoke testing, and rollback procedures. Use when deploying to staging or production, running smoke tests…

    423 GitHub stars~950 tokensUpdated 2 mo ago
    Auto-check passed
  • Frontend Patterns Template

    bybren-llc/safe-agentic-workflow

    Frontend patterns for modern web frameworks, component libraries, auth flows, and analytics. Use when building UI components, creating pages, implementing…

    423 GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Advanced Git Operations

    bybren-llc/safe-agentic-workflow

    Advanced git operations including rebase, bisect, cherry-pick, and conflict resolution. Use when rebasing feature branches, debugging with bisect…

    423 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Stripe Patterns

What does Stripe Patterns do?

Stripe payment integration patterns. An agent skill from bybren-llc/safe-agentic-workflow. Stripe Patterns is an agent skill from bybren-llc/safe-agentic-workflow. Stripe payment integration patterns.

When should I use Stripe Patterns?

Stripe Patterns fits situations like: implementing payment flows; handling webhooks; working with subscriptions.

How do I install Stripe Patterns in Claude Code?

Run `npx skills add bybren-llc/safe-agentic-workflow --skill stripe-patterns -a claude-code`. Or copy the skill folder (.claude/skills/stripe-patterns in bybren-llc/safe-agentic-workflow) into .claude/skills/stripe-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Stripe Patterns in Codex?

Run `npx skills add bybren-llc/safe-agentic-workflow --skill stripe-patterns -a codex`. Or copy the skill folder (.claude/skills/stripe-patterns in bybren-llc/safe-agentic-workflow) into .agents/skills/stripe-patterns in your project. Codex loads it when a task matches its description.

Can I use Stripe Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bybren-llc/safe-agentic-workflow --skill stripe-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stripe-patterns, .gemini/skills/stripe-patterns, .github/skills/stripe-patterns and .opencode/skills/stripe-patterns in your project.

What does Stripe Patterns need to run?

Going by SKILL.md and its folder, Stripe Patterns needs credentials named STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET. Our summary lists: A credential in STRIPE_SECRET_KEY; A credential in STRIPE_WEBHOOK_SECRET. Its frontmatter pre-approves these tools: Read, Grep, Glob.

Does Stripe Patterns access the network?

SKILL.md names 1 domain. As links in the text: stripe.com. This is read from the text; nothing was executed.

Is Stripe Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Stripe Patterns use?

Stripe Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Stripe Patterns use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Stripe Patterns?

Skills that share tags, products or a category with Stripe Patterns: Stripe Best Practices (fossasia/eventyay, 1.7k stars), cmux Billing Runbook (manaflow-ai/cmux, 28k stars), Stripe Integration Expert (alirezarezvani/claude-skills, 28k stars) and Payment Integration (aiskillstore/marketplace, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stripe Patterns?

bybren-llc (a GitHub organization) maintains it in bybren-llc/safe-agentic-workflow, which has 423 GitHub stars. The repository holds 42 skills in this directory. The repository was last updated on July 20, 2026.

Source: bybren-llc/safe-agentic-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.