stripe-patterns

stripe-patterns is a skill for Claude Code, Codex from bybren-llc/safe-agentic-workflow. It costs 54 tokens per session (1,063 once invoked), scanned A, original, MIT.

A guide for adding Stripe, a payment service, to an application through checkout, payment notifications, recurring subscriptions, invoices, refunds, and disputes.

In plain words
What is it for?
Use it when building or testing checkout flows, Stripe webhooks, subscriptions, invoices, refunds, or dispute handling.
Why use it?
It keeps payment code consistent and provides checks for test-mode keys, webhook secrets, test cards, authentication, and access-controlled database operations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when building or testing checkout flows, Stripe webhooks, subscriptions, invoices, refunds, or dispute handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bybren-llc/safe-agentic-workflow/stripe-patterns
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.

Any agent
npx skills add bybren-llc/safe-agentic-workflow --skill stripe-patterns
Clone the repo
git clone --depth 1 https://github.com/bybren-llc/safe-agentic-workflow

Made for: Claude Code, Codex.

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 stripe-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/bybren-llc/safe-agentic-workflow/stripe-patterns.svg)](https://agentmods.dev/skills/bybren-llc/safe-agentic-workflow/stripe-patterns)
Your own site
<a href="https://agentmods.dev/skills/bybren-llc/safe-agentic-workflow/stripe-patterns"><img src="https://agentmods.dev/badge/skills/bybren-llc/safe-agentic-workflow/stripe-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,063 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00054 $0.01063
Opus 5 $0.00027 $0.00531
Sonnet 5 $0.00011 $0.00213
Haiku 4.5 $0.00005 $0.00106

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

Security

Grade A, and why

stripe-patterns 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 7d 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.

.agents/skills/stripe-patterns/SKILL.md · 177 lines

How it starts

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

Stripe Patterns Skill

TEMPLATE: This skill uses {{PLACEHOLDER}} tokens. Replace with your project values before use.

Purpose

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

When This Skill Applies

  • 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: {{STRIPE_CONFIG_PATH}}
    • Use factory function for consistent API version
    • Never hardcode API keys

API Routes

  • Checkout Session: {{CHECKOUT_ROUTE_PATH}}
  • Webhook Handler: {{WEBHOOK_ROUTE_PATH}}

Helpers

  • Payment Helpers: {{PAYMENT_HELPERS_PATH}} (use RLS context)
  • Subscription Helpers: {{SUBSCRIPTION_HELPERS_PATH}}
  • Invoice Helpers: {{INVOICE_HELPERS_PATH}}

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
// Idempotent webhook pattern
await withSystemContext(db, "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

Read the full file on GitHub · 177 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 177 lines · 54 tokens per session scan A d034b1aa298d

Subscribe to this mod's changes

stripe-patterns is a skill published in the GitHub repository bybren-llc/safe-agentic-workflow (406 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 1,063 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

tushare

A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.

HKUDS/Vibe-Trading · 79 tokens

tushare-plugin-builder

This skill should be used when the user provides a Tushare API document URL and asks to generate a full plugin in this codebase, including extractor, schema, config, query service, and agent/MCP/http usage with testable curl examples.

Yourdaylight/stock_datasource · 56 tokens

freee-api-skill

A guide for using freee's APIs through an MCP server. freee is a Japanese business platform covering accounting, payroll, invoices, time tracking, sales, tax filing, and related work.

freee/freee-mcp · 332 tokens

capability

Creates or modifies a capability class in domain/capabilities/ and its corresponding Has interface in domain/tools/contracts.ts. Use when adding a new tool runtime behavior (agents, skills, commands, rules, mcp, hooks, settings, plugins), changing the constructor params of an existing capability class, or wiring a new…

ai-driven-dev/framework · 122 tokens

adapter

Creates or modifies infrastructure adapters in src/infrastructure/adapters/ and their corresponding port interfaces in src/domain/ports/. Use when adding a new I/O boundary (file system, HTTP, git, npm, OS), changing how an existing adapter translates errors, or wiring a new adapter into createDeps. Do NOT use for…

ai-driven-dev/framework · 92 tokens

fastbill

Work with FastBill invoices, customers, payments, reminders, and e-invoice exports through the FastBill XML API.

HybridAIOne/hybridclaw · 27 tokens