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.
curl -O https://raw.githubusercontent.com/bonnguyenitc/antigravity-superpowers/main/.agent/skills/subscription-billing/SKILL.mdgit clone --depth 1 https://github.com/bonnguyenitc/antigravity-superpowersWrote 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.
[](https://agentmods.dev/skills/bonnguyenitc/antigravity-superpowers/subscription-billing)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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— notDate.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
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.
- 1mo ago First seen · 180 lines · 31 tokens per session scan A fd2c2c5c9749
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.
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…
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…
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…
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…
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…
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…