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.5 $0.00012 $0.00561
Sonnet 5.5 $0.00006 $0.00281
Haiku 4.5 $0.00003 $0.00140

Measured 1mo ago against content hash fd2c2c5c9749, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (20 stars, last pushed 5mo ago), licensed MIT. It adds 31 tokens to every session and 1,403 once invoked, about $0.0001 per session on Opus 5.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

bookkeeping

Use when a small business needs audit-ready books — a chart of accounts, posting a transaction to the right account and side, clearing an uncategorized bank feed, cash vs accrual, or a ledger that won't tie to the bank. NOT interpreting the numbers — runway, burn, P&L cadence (that is finance-ops), NOT issuing…

ericrisco/rsc-harness · 84 tokens

cost-tracking

Use when metering and capping AI or cloud app spend — tokens read from the response usage object, priced off a dated rate table, ledgered per user/tenant/feature, with alerts and a hard cap before the bill. NOT cash runway (that is finance-ops), NOT cost-per-unit margin (that is unit-economics), NOT booking the spend…

ericrisco/rsc-harness · 91 tokens

financial-model

Use when a founder needs the driver-based 18–36 month projection: revenue, cost and headcount builds resolving to net burn, runway, cash-out date, scenarios and the raise size. NOT the 13-week bank-reconciled cash view (that is finance-ops), NOT single-series forecasting (that is forecasting), NOT running the round…

ericrisco/rsc-harness · 85 tokens

fundraising

Use when planning or running an equity round as a process: sizing the raise to a milestone, choosing post-money SAFE vs priced round, tiering investors by intro path, sequencing outreach for momentum, or reading a term sheet before signing. NOT the slide narrative (that is pitch-deck), NOT the cap-table or valuation…

ericrisco/rsc-harness · 77 tokens

investor-materials

Use when packaging or circulating the documents an investor reads outside the meeting — setting up or cleaning a data room, writing the one-pager or teaser that earns the first meeting, or drafting the recurring monthly investor update. NOT the slide narrative (that is pitch-deck), NOT the projection spreadsheet (that…

ericrisco/rsc-harness · 87 tokens

logistics-ops

Use when an order is paid and packed and the box now has to move, go sideways, or come back — picking a carrier and service and cutting a label, reacting to a delivery exception, getting ahead of where-is-my-order tickets, running a return, exchange or refund with its reverse label, filing a carrier claim before the…

ericrisco/rsc-harness · 127 tokens