adkchrgr

Billing Doctor — AI skill for Claude Code

AI community

AI support agent that diagnoses Metronome usage-billing bugs (unbilled events, pricing mistakes) and drafts the customer reply.

How to install Billing Doctor

This entry records only its repository, not the path inside it, so there is no exact command to give. Open adkchrgr/billing-doctor and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Billing Doctor does

AI support agent that diagnoses Metronome usage-billing bugs (unbilled events, pricing mistakes) and drafts the customer reply. Built with Claude, MCP, and a Python SDK demo app.

Alternatives in AI

  • Anthropic Quickstarts — by Anthropic - Offers comprehensive development guides for three distinct AI-powered demo projects with standa 15.4k ★
  • Main — Open-source SaaS framework (React + Firebase + Stripe) with built-in Claude Code AI skills 550 ★
  • Gh PR Review — GitHub CLI extension that adds full inline PR review comment support — view, navigate, reply to, and resolve r 174 ★

README

Billing Doctor 🩺

[![CI](https://github.com/adkchrgr/billing-doctor/actions/workflows/ci.yml/badge.svg)](https://github.com/adkchrgr/billing-doctor/actions/workflows/ci.yml)

An AI support agent that diagnoses **Metronome usage-billing integration problems**, and bills its own users **through Metronome**.

"Our usage dropped to zero after a deploy." → Billing Doctor pulls the events, compares them to the billable metrics, and replies: *"Your emitter sends `region: "us"` but the Tokens metric only accepts `"US"`. Values are case-sensitive, so normalize the value before sending."*

Why I built this

A lot of support engineering is working out why something that "returned 200" didn't do what the customer expected: SSO configs, API auth, integrations. That investigation follows a repeatable playbook, which makes it a good fit for an AI agent.

Usage-based billing has the same shape of problem, with money attached. Billing Doctor applies that support playbook to Metronome: gather evidence, run deterministic checks, let an agent reason over the results, and hand a human a root cause plus a ready-to-send reply. I'm also using it to put the Claude Certified Architect – Foundations material into practice: agent loops, tool design, hooks, MCP and evals.

Why it exists

Usage-billing bugs don't show up as errors. Ingest returns `200`, and the usage just never lands on the invoice. Common causes are an unregistered ingest alias, a pluralized `event_type`, a case-sensitive property filter, a renamed aggregation key, reused `transaction_id`s, or timestamps in seconds instead of milliseconds. Price disputes have their own versions: a negotiated override entered with the wrong start date, or never entered at all. Billing Doctor finds these in seconds instead of an hour of manual event spelunking.

Quick start

npm install
npm run doctor -- scenarios                          # list sandbox scenarios with planted bugs
npm run doctor -- triage --scenario region