Agent prompt
Paste this into your coding agent
Replace YOUR_API_KEY after signup, then ask the agent to run the product flow and verify the first events.
Usage-Based Billing Analytics setup prompt
Instrument usage-based billing with Telemetry.
Use /skill.md and this Telemetry API key: YOUR_API_KEY
Log one usage_meter_recorded event at the final billable boundary with meter_event_id, account_id, plan, feature, unit_name, billable_units, included_units, billing_period, and status. Use an idempotency key that survives retries.
Also log append-only usage adjustments, quota-threshold notifications, exports, and reconciliation outcomes. Create dashboards for monthly quota burn, usage by feature and plan, overages, and provider reconciliation differences.
Do not log payment details, invoice documents, credentials, or raw customer content. Do not use request count as billable quantity unless the commercial contract defines it that way.Setup steps
- 1Define one billable unit and the workflow boundary where it becomes final.
- 2Emit an idempotent meter event with account, plan, quantity, and unit.
- 3Compare monthly usage with the included quota and provider aggregate.
- 4Review adjustments and plan changes before invoices become final.
Events to capture
Questions unlocked
- Which accounts are approaching or exceeding included usage?
- Do internal meter totals match the billing provider?
- Which features and plans create the most billable units?
Related SQL recipes
Answer the next question with SQL
Run the query against the structured fields from this workflow, inspect the example result, and turn a useful answer into a dashboard or alert.
Calculate Usage Quota Burn by Account
Which accounts are consuming their included usage fastest this month?
Open recipeCalculate Monthly Recurring Revenue Movement
What caused recurring revenue to grow or shrink each month?
Open recipeMeasure Payment-Failure Recovery
Which payment failures recover, and how much revenue remains at risk?
Open recipeCalculate Net and Gross Revenue Retention
How much starting recurring revenue was retained before and after expansion?
Open recipeNext step
Create the API key your agent will use
The free plan is enough to run the prompt, send test events, and review the first dashboard.
Related pages
Claude Code Observability
Give Claude Code a prompt that makes telemetry part of the implementation pass instead of a separate cleanup project.
Open pageCursor Telemetry Setup
A copyable setup prompt for adding event tables, funnel tracking, and dashboards from inside Cursor.
Open pageCodex Instrumentation Prompt
A focused prompt that asks Codex to instrument the rest of the product, verify events, and summarize coverage gaps.
Open page