antigravity-superpowers: Skill for Claude Code

.agent/skills/subscription-billing/SKILL.md

subscription-billing is a skill for Claude Code, Codex from bonnguyenitc/antigravity-superpowers. It costs 31 tokens per session (1,403 once invoked), scanned A, original, MIT.

A guide for adding recurring payments with Stripe, including subscriptions, free trials, plan changes, payment failures, and payment notifications called webhooks.

In plain words
What is it for?
Use it to design webhook-driven billing, safe-to-repeat operations, trial and upgrade logic, payment-failure handling, and server-side subscription status.
Why use it?
It helps prevent incorrect charges and subscription records when payments are retried, delayed, or fail.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is bonnguyenitc/antigravity-superpowers's own configuration. It tells Claude Code and Codex how to work on antigravity-superpowers itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything antigravity-superpowers configures →

Reuse

Borrowing it

Nothing to install: this file belongs to bonnguyenitc/antigravity-superpowers. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bonnguyenitc/antigravity-superpowers/main/.agent/skills/subscription-billing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/bonnguyenitc/antigravity-superpowers

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 subscription-billing

README.md
[![agentmods](https://agentmods.dev/badge/skills/bonnguyenitc/antigravity-superpowers/subscription-billing/github.svg)](https://agentmods.dev/skills/bonnguyenitc/antigravity-superpowers/subscription-billing)
Your own site
<a href="https://agentmods.dev/skills/bonnguyenitc/antigravity-superpowers/subscription-billing"><img src="https://agentmods.dev/badge/skills/bonnguyenitc/antigravity-superpowers/subscription-billing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for subscription-billing

Your own site · 80×15
<a href="https://agentmods.dev/skills/bonnguyenitc/antigravity-superpowers/subscription-billing"><img src="https://agentmods.dev/badge/skills/bonnguyenitc/antigravity-superpowers/subscription-billing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,403 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.00031 $0.01403
Opus 5 $0.00015 $0.00701
Sonnet 5 $0.00006 $0.00281
Haiku 4.5 $0.00003 $0.00140

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

Security

Grade A, and why

subscription-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 11d 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.

.agent/skills/subscription-billing/SKILL.md · 180 lines

How it starts

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

Subscription Billing Lens

Philosophy: Billing is load-bearing infrastructure. A bug in billing = lost revenue or incorrect charges. Build it like critical path code: idempotent, webhook-driven, logged exhaustively.


Core Instincts

  • Webhook-first — Stripe's webhook is the source of truth, not your API response
  • Idempotency everywhere — billing operations must be safe to retry
  • Never trust client state for billing — always fetch subscription status from Stripe server-side
  • All clock-sensitive operations use event.created — not Date.now()
  • Soft failures, never hard block — grace period on payment failures protects revenue

Stripe Integration Architecture

User upgrades plan →
  1. Client: Stripe.js → Payment Method → PaymentIntent / SetupIntent
  2. Server: Create/Update Subscription on Stripe
  3. Stripe: Processes payment → emits webhook event
  4. Server: Webhook handler updates DB subscription status
  5. Server: Return state from DB (never from Stripe API response)

⚠️ Anti-pattern: updating DB from API response
✅ Pattern: update DB only from webhook confirmation

Critical Webhook Events to Handle

Event What to do
checkout.session.completed Provision access, send welcome email
customer.subscription.created Set status = active, log
customer.subscription.updated Update plan, seats, feature flags
customer.subscription.deleted Set status = canceled, begin grace period
invoice.payment_succeeded Extend access, reset dunning state
invoice.payment_failed Start dunning, notify user, DON'T revoke access immediately
invoice.upcoming Warn user of upcoming charge
customer.subscription.trial_will_end 3-day warning email before trial ends

Trial Logic Rules

Trial best practices:
- Default trial: 14 days (Stripe default is 30; reduce for faster conversion signal)
- Require payment method at trial start (reduces churn at trial end)
- Free trial without CC = high trial-end churn; use for virality, not conversion
- trial_will_end webhook fires 3 days before → trigger upgrade prompt

Trial states:
  trialing → (payment method on file) → auto-converts to active
  trialing → (no payment method) → needs_payment_method → upgrade prompt

Read the full file on GitHub · 180 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. 11d ago First seen · 180 lines · 31 tokens per session scan A fd2c2c5c9749

Subscribe to this mod's changes

subscription-billing is a skill published in the GitHub repository bonnguyenitc/antigravity-superpowers (19 stars, last pushed 4mo ago), licensed MIT. It adds 31 tokens to every session and 1,403 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-30.

Related

Other skills, from other repositories

saas-billing

Implement and audit SaaS billing systems, subscription state machines, secure webhooks, and local database synchronization / Implementasi dan audit sistem billing SaaS, state machine langganan, webhook aman, dan sinkronisasi database lokal.

roedyrustam/vibes-plug · 51 tokens

payment-gateway-expert

Expert guide for integrating payment gateways (Stripe, PayPal, Xendit, Midtrans, DOKU) and secure webhooks into SaaS platforms / Panduan ahli integrasi payment gateway dan webhook aman.

roedyrustam/vibes-plug · 49 tokens

doku-mcp-server

Expert guide for DOKU Model Context Protocol (MCP) Server integration. Enables AI Agentic Commerce with tools for payment links, Virtual Accounts, QRIS, transaction status checks, and client configuration (Claude Desktop, Cursor, AGY) / Panduan ahli DOKU MCP Server untuk AI Agentic Commerce.

roedyrustam/vibes-plug · 70 tokens

frappe-payments

Frappe Payments and ERPNext payment workflow guidance for payment gateways, payment requests, subscriptions, invoices, reconciliation, webhooks, and secure checkout flows. Use when work touches payments in Frappe or ERPNext.

Dkm0315/frappe-agent · 49 tokens

codeck

Route explicit requests from a host coding agent to one or more locally configured AI executors through Codeck, attach Markdown or other project files, moderate cross-model consultation, expose disagreements, and synthesize traceable results. Use when the user explicitly names Codeck or asks to consult, compare, or…

isdou/codeck · 108 tokens

customer-billing-ops

Operate customer billing workflows such as subscriptions, refunds, churn triage, billing-portal recovery, and plan analysis using connected billing tools like Stripe. Use when the user needs to help a customer, inspect subscription state, or manage revenue-impacting billing operations.

Jamkris/everything-gemini-code · 57 tokens