usage-based-billing

usage-based-billing is a skill for Claude Code, Codex from appeeky/stripe-skills. It costs 77 tokens per session (430 once invoked), scanned A, original, MIT.

A guide for Stripe billing based on customer usage instead of only a fixed recurring price. It covers meters, which record usage, tiered prices, prepaid credits, and hybrid plans with overage charges.

In plain words
What is it for?
Use it to design or audit pay-per-use, credit-based, metered, tiered, and subscription-plus-overage billing systems.
Why use it?
It helps prevent mismatches between reported usage, pricing rules, customer quotas, and the final bill.

Skill for Claude CodeCodex

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

Good fit Use it to design or audit pay-per-use, credit-based, metered, tiered, and subscription-plus-overage billing systems.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/appeeky/stripe-skills/usage-based-billing
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 appeeky/stripe-skills --skill usage-based-billing
Clone the repo
git clone --depth 1 https://github.com/appeeky/stripe-skills

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 usage-based-billing

README.md
[![agentmods](https://agentmods.dev/badge/skills/appeeky/stripe-skills/usage-based-billing/github.svg)](https://agentmods.dev/skills/appeeky/stripe-skills/usage-based-billing)
Your own site
<a href="https://agentmods.dev/skills/appeeky/stripe-skills/usage-based-billing"><img src="https://agentmods.dev/badge/skills/appeeky/stripe-skills/usage-based-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 usage-based-billing

Your own site · 80×15
<a href="https://agentmods.dev/skills/appeeky/stripe-skills/usage-based-billing"><img src="https://agentmods.dev/badge/skills/appeeky/stripe-skills/usage-based-billing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 430 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.00077 $0.00430
Opus 5 $0.00039 $0.00215
Sonnet 5 $0.00015 $0.00086
Haiku 4.5 $0.00008 $0.00043

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

Security

Grade A, and why

usage-based-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 9d 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.

skills/usage-based-billing/SKILL.md · 52 lines

What it actually says

Usage-Based Billing

Stripe MCP Setup

Requires Stripe MCP (https://docs.stripe.com/mcp). GetMcpTools before CallMcpTool. Paginate all lists (limit: 100, starting_after while has_more). Amounts in cents. Read-only for audits; confirm before writes.

Concepts

Model Setup
Pure metered Meter + usage-based price; bill actual usage
Prepaid credits Credit grant burns down with usage
Hybrid Base subscription + overage above included quota

Modern Stripe uses Meters + Meter Events (billing/meter-events), replacing legacy usage records.

Workflow

  1. Review prices: GetPrices -- look for metered usage_type / meter-linked
  2. Check meter definitions (Dashboard -> Billing -> Meters)
  3. Verify usage reporting path in code (meter events sent on each usage)

Design Checklist

  • Meter defined with aggregation (sum/count/last)
  • Price linked to meter
  • Usage events sent reliably (idempotent, retried)
  • Included quota vs overage tiers defined
  • Customer-facing usage visibility

Output Template

Usage Billing Audit

Metered prices: [n]
Meters: [list + aggregation]
Usage reporting: [reliable / gaps]
Model: [pure metered / credits / hybrid]

Recommendation: [tiering / quota / reliability fix]

For complex credit/commit models, note Metronome + Stripe pattern (see Stripe docs).

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. 9d ago First seen · 52 lines · 77 tokens per session scan A b0dbd5e272b3

Subscribe to this mod's changes

usage-based-billing is a skill published in the GitHub repository appeeky/stripe-skills (5 stars, last pushed 1mo ago), licensed MIT. It adds 77 tokens to every session and 430 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

marketplace-purchase-vetting

Use this when the user asks whether a local listing is a scam, "too good to be true," worth looking at, or a good deal. Also use this when he asks you to find options — search/discover candidates, then vet the best ones. The goal is not a generic buying guide; it is a practical risk read with clear next steps.

AtlasOmnia/donna-starter · 72 tokens

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

szamlazzhu-document-xml-compatibility

Integrate another WooCommerce plugin with Integration for Szamlazz.hu & WooCommerce document generation. Covers WCSzamlazz()->generateinvoice(), wcszamlazzxml, wcszamlazzinvoicelineitem, wcszamlazzbeforegenerateinvoicecheck, document meta, Action Scheduler deferral, Pro webhooks/IPN including HPOS-safe custom…

Lonsdale201/wp-agent-skills · 167 tokens

szamlazzhu-vat-checkout-compatibility

Make WooCommerce checkout, B2B, VAT/tax-number, address, and headless checkout code compatible with Integration for Szamlazz.hu & WooCommerce. Covers the classic checkout field wcszamlazzadoszam, order meta billingwcszamlazzadoszam and wcszamlazzadoszamdata, user meta wcszamlazzadoszam, Checkout Block/Store API…

Lonsdale201/wp-agent-skills · 169 tokens

wc-stripe-future-payments

Design or audit WooCommerce Stripe payment flows that save a reusable method and charge it later. Covers SetupIntent versus PaymentIntent, charge-now-and-save, deposits and installment series, setupfutureusage=offsession, Stripe Customer ownership, explicit consent/mandates, later off-session PaymentIntents, SCA…

Lonsdale201/wp-agent-skills · 149 tokens