Sells premium currency, items, and subscriptions in games via Stripe. Covers product catalog, webhook fulfillment, refund/dispute revocation, and idempotency tables.
Ships in game-dev. 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.
For client setup, Checkout Sessions and the API itself, use the stripe-docs skill if it is installed, otherwise https://docs.stripe.com. This skill covers the game side: what to sell, when to grant, when to take back.
checkout.session.completed and again on each invoice.paid; both can name the first invoice, so the grant is unique on invoice id.bun add stripe. Do not pass apiVersion: the SDK uses the version it was released with.templates/product-catalog.ts. Each product id is what Checkout metadata carries.metadata: { playerId, productId } for one-time purchases and subscription_data: { metadata: { playerId } } for subscriptions. Pass an idempotency key on the create call so a retried request does not create a second session.processed_events table from the postgres-game-schema skill: event id as primary key, a kind (stripe_event) and created_at. It is the idempotency table this skill and bullmq-game-queues share. Purchases need their own unique keys on your purchase and subscription-period tables: checkout session id for one-time grants, invoice id for subscription periods. That skill has no purchase tables; add them following its conventions.boilerplate/webhooks.ts. Implement its PaymentStore and PaymentTx against those tables, then call handleStripeWebhook(rawBody, signatureHeader, { stripe, webhookSecret, store }) from your route and return its Response.grantCurrency short: write the purchase row and enqueue reward delivery with the bullmq-game-queues skill. Stripe wants a 2xx response before slow work.templates/webhook-events.ts. It holds the audit row type; log every handled event with player, product, amount and status.HANDLED_EVENT_TYPES (webhooks.ts): checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed, invoice.paid, customer.subscription.updated, customer.subscription.deleted, charge.refunded, charge.dispute.created.webhooks.ts handles each event| Event | Action |
|---|---|
checkout.session.completed | mode === 'payment': grant unless payment_status === 'unpaid' (so paid and no_payment_required both grant); unpaid waits for async_payment_succeeded. mode === 'subscription': retrieve the subscription from session.subscription, store its status, grant the period for session.invoice if active. |
checkout.session.async_payment_succeeded | Same as completed. Delayed methods such as bank debits land here. |
checkout.session.async_payment_failed | Flag for review so the game can tell the player. |
invoice.paid | Read the subscription id from invoice.parent.subscription_details.subscription after checking invoice.parent?.type === 'subscription_details'. Retrieve the subscription; grant the period for this invoice only if its status is active. |
customer.subscription.updated / .deleted | Retrieve the subscription and store its current status, not the status in the event. |
charge.refunded | charge.refunded is true only for a full refund: revoke by payment intent. Partial, or no matching grant: flag for review. |
charge.dispute.created | Revoke by dispute.payment_intent and flag the account. The money has already left your balance. |
await stripe.webhooks.constructEventAsync(...). Bun loads the SDK's web build, whose crypto is async-only, so constructEvent throws.checkout.session.completed or later on async_payment_succeeded. The purchase row's unique key stops the second grant.Set of processed ids forgets on restart and is not shared between instances. Use the database table.created to order them. webhooks.ts retrieves the subscription and stores the status Stripe returns now. That alone does not stop two concurrent events: the one that retrieved active can commit after the one that stored canceled. So setSubscription never moves a row out of a terminal status (canceled, incomplete_expired); its doc comment has the SQL.invoice.subscription no longer exists on current API versions. Use the parent path above.postgres-game-schema puts CHECK (amount >= 0) on currencies. Do not let revocation throw, or Stripe retries the event for up to three days.playerId metadata means a bug in session creation. Flag it; do not throw.templates/product-catalog.ts: copy when starting the store.boilerplate/webhooks.ts: copy when wiring the webhook endpoint.templates/webhook-events.ts: read when designing the payment audit log. It holds the audit row type.references/sources.md: read when checking a claim or a field path.postgres-game-schema: inventory and currency tables, table conventions, and the processed_events idempotency table.betterauth-integration: the authenticated player whose id goes in Checkout metadata.bullmq-game-queues: reward delivery after the purchase is recorded.game-economy-design: currency pricing and balance.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
39 skills in this plugin
/betterauth-integrationCovers the game-specific layer of Better Auth: player, moderator and admin roles, session checks on game routes and WebSocket handshakes, and keeping the auth session apart from the game session. Use when a game needs player login, moderator or admin powers, or authenticated real-time connections, and the project uses Better Auth./bullmq-game-queuesBackground job design for game backends on BullMQ and Redis: one queue per game domain, idempotent reward fulfilment, and cron schedulers for daily rewards and season ends. Use when a game needs matchmaking requests, reward grants, match results, notifications or analytics processed off the request path, or recurring and timed jobs such as daily login rewards, leaderboard snapshots and season rollovers./character-design-narrativeCovers designing game characters: NPCs, companions, antagonists, player avatars, character bibles and branching dialogue. Use when a game needs a new character written, an NPC feels flat or interchangeable, or dialogue needs a branching format with conditions and effects./ci-cd-gameGitHub Actions pipeline rules for a Bun game backend on Neon and Fly.io: migrations before deploy, one Neon database branch per pull request, a smoke test after deploy, and a pinned Bun version. Use when a game project needs CI, a deploy workflow, preview databases for pull requests, or a safe order for schema migrations and server deploys./elevenlabs-sound-musicCovers generating game audio with ElevenLabs (voice lines, sound effects, music) and Google Lyria 2 (instrumental music clips), and playing it in the browser through an audio state machine with crossfades, per-layer volume and an unlock on the first user input. Use when a game needs sound effects, NPC voice lines or a soundtrack, when music must follow game state (menu, exploration, combat, boss) without hard cuts, when audio stays silent on a phone until the player taps, or when choosing between ElevenLabs and Lyria for music./game-anti-cheatCovers how a developer defends their own online game against cheating: server-side input validation, withholding hidden state, lag-compensation limits, dupe-proof transfers, detection from server data and reports, and enforcement with delayed bans, appeals and refunds to victims. Use when a multiplayer game has speed hacks, wallhacks, aimbots, bots, item or currency dupes, real-money trading, boosting or win trading, or when planning how to detect and ban cheaters./game-dev:stripe-game-paymentsfrom game-dev
npx claudepluginhub fcsouza/agent-skills --plugin game-devOther plugins' skills for the same job