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.
npx agentmods add skills/dodopayments/dodo-agent-plugin/usage-based-billingnpx skills add dodopayments/dodo-agent-plugin --skill usage-based-billinggit clone --depth 1 https://github.com/dodopayments/dodo-agent-pluginWrote 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/dodopayments/dodo-agent-plugin/usage-based-billing)<a href="https://agentmods.dev/skills/dodopayments/dodo-agent-plugin/usage-based-billing"><img src="https://agentmods.dev/badge/skills/dodopayments/dodo-agent-plugin/usage-based-billing.svg" alt="Measured on agentmods" 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 | $0.00039 | $0.03990 |
| Opus 5 | $0.00019 | $0.01995 |
| Sonnet 5 | $0.00008 | $0.00798 |
| Haiku 4.5 | $0.00004 | $0.00399 |
Grade B, and why
usage-based-billing scanned grade B with 1 finding 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 3d 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.
Sends data to an external URLmediumData exfiltration
A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.
await fetch('https://test.dodopayments.com/events/ingest', { method: 'POST', This is a copy
100% identical to usage-based-billing — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 541 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Dodo Payments Usage-Based Billing
Reference: docs.dodopayments.com/features/usage-based-billing
Charge customers for what they actually use—API calls, storage, AI tokens, or any metric you define.
When to use this skill
- You need to bill customers based on consumption (API calls, tokens, storage, bandwidth).
- You want to combine usage charges with subscriptions or one-time purchases.
- You need to track and aggregate events into billable quantities.
- You're building an AI service, SaaS platform, or infrastructure product with metered features.
Core Concepts
Events
Usage records sent from your application to Dodo. Each event is attributed to a customer and matched to a meter by its event_name.
{
"event_id": "evt_unique_123",
"customer_id": "cus_abc123",
"event_name": "api.call",
"timestamp": "2025-01-21T10:30:00Z",
"metadata": { "endpoint": "/v1/users", "tokens": 150 }
}
Meters
Filters and aggregates events into billable quantities. A meter specifies:
- Event name: which events to match (case-sensitive)
- Aggregation type: how to combine events (count, sum, max, last)
- Measurement unit: the billing unit (calls, tokens, GB, etc.)
- Optional filters: conditions events must meet to be counted
Aggregation Types
| Type | Use Case | Example |
|---|---|---|
| Count | Total events | API calls, image generations |
| Sum | Add values from a property | Tokens used, bytes transferred |
| Max | Highest value in a period | Peak concurrent users |
| Last | Most recent value | Current storage used |
For sum, max, and last, you specify which metadata property to aggregate.
Pricing
Attach a meter to a product price to charge per unit:
- Price per unit: e.g., $0.001 per API call
- Free threshold: e.g., 1,000 free calls per month
- Charge formula:
(usage − threshold) × price_per_unit
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.
- 3d ago First seen · 541 lines · 39 tokens per session scan B f56ebab3138f
usage-based-billing is a skill published in the GitHub repository dodopayments/dodo-agent-plugin (6 stars, last pushed 10d ago), licensed MIT. It adds 39 tokens to every session and 3,990 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (sends data to an external url). It is 100% identical to usage-based-billing, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
deepen-plan
Stress-test an existing implementation plan and selectively strengthen weak sections with targeted research. Use when a plan needs more confidence around decisions, sequencing, system-wide impact, risks, or verification. Best for Standard or Deep plans, or high-risk topics such as auth, payments, migrations, external…
reversi-master
One-click install + model switch:Claude Code,Codex CLI (OpenAI), Grok Build (xAI), DeepSeek Harness, Kimi Code (Moonshot) ,Qwen Code,Aider,OpenCode,MiMo Code (Xiaomi),ZCode (Z.AI),OpenClaw,Pi,OpenScience,Vibe-Trading,Claude Desktop (3P profile),ChatGPT desktop,OpenCode Desktop.
southwest
Search Southwest Airlines fares and points pricing via Patchright browser automation. SW is not in any GDS or API. Covers all fare classes, Companion Pass value, and fare drop monitoring.
chase-travel
Search Chase UR travel portal via Patchright for cash prices, points pricing, Points Boost offers, and Chase Edit hotel benefits. Use for pay-with-points portal comparison on Sapphire Reserve/Preferred.
compare-flights
Unified flight comparison across cash (Duffel, Ignav), award (seats.aero), and portal (Chase, Amex) sources in parallel. Outputs one table with transfer partner optimization and recommendations.
compare-hotels
Unified hotel comparison across Chase Edit, Amex FHR/THC, metasearch, and Airbnb. Highlights premium program benefits, stacking opportunities, and benefit-adjusted pricing.