From bopen-tools
Tracks API spend, analyzes billing data, monitors service costs, and runs budget reports across Anthropic, Vercel, Railway, and other platforms. Useful for cost optimization, usage monitoring, and budget vs actual analysis.
How this skill is triggered — by the user, by Claude, or both
Slash command
/bopen-tools:cost-trackingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Unified cost tracking and budget analysis across the bOpen agent organization's service stack.
Unified cost tracking and budget analysis across the bOpen agent organization's service stack.
Usage API: GET /v1/organizations/usage_report/messages
sk-ant-admin...) — org admin required1m, 1h, 1dCost API: GET /v1/organizations/cost_report
1d), costs in USD as decimal stringsQuick examples:
# Daily costs for last 7 days
curl -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
"https://api.anthropic.com/v1/organizations/cost_report?start_date=2026-03-07&end_date=2026-03-14&bucket_size=1d"
# Usage by model for last 24h
curl -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \
"https://api.anthropic.com/v1/organizations/usage_report/messages?start_date=2026-03-13T00:00:00Z&end_date=2026-03-14T00:00:00Z&bucket_size=1h&group_by=model"
Full parameter reference and response shapes: references/anthropic-api.md.
Billing API: GET /v1/billing/charges
from, to, teamId or slugSpend Management Webhooks: fire at 50%/75%/100% of configured budget.
CLI shortcut: vercel usage for current-period spend at a glance.
Full API reference, FOCUS field descriptions, and webhook setup: references/vercel-api.md.
Railway has no public billing API. The GraphQL API covers projects, services, and deployments — not costs. Cost data is only available in the Railway dashboard under Settings > Usage.
When asked about Railway costs: instruct the user to open the dashboard and report the numbers manually. Do not attempt to fetch them programmatically.
Optional consolidated view across Anthropic, Vercel, and 30+ other providers.
claude mcp add --transport sse vantage https://mcp.vantage.sh/sse
Connects to Anthropic via Admin API key and to Vercel via a Community Integration with read:billing scope. Railway is NOT supported by Vantage.
Full setup steps: references/vantage-setup.md.
Query the Anthropic usage API grouped by api_key or workspace. Correlate workspace/key names with agent roles. Identify which agents burn the most tokens and recommend model tier changes (opus → sonnet → haiku) where quality allows.
Pull cost data for the billing period from the Anthropic cost report and Vercel billing charges. Compare against budgeted amounts. Flag overruns with percentage and absolute delta.
Compare daily spend against the 7-day rolling average. Flag days where spend exceeds 2x the average. Drill into which model, workspace, or agent caused the spike by querying the usage endpoint grouped by model for that day.
claude-opus for tasks that claude-sonnet or claude-haiku could handlereferences/anthropic-api.md — Full Anthropic Admin API docs for usage and cost endpointsreferences/vercel-api.md — Vercel Billing API, FOCUS format, and spend management webhooksreferences/vantage-setup.md — Vantage MCP server setup and platform coveragenpx claudepluginhub b-open-io/claude-plugins --plugin bopen-toolsGuides capturing AI tool costs from Anthropic and OpenAI dashboards quarterly, records structured Markdown data for health snapshots and MODEL_ROUTING.md updates.
Analyzes AWS costs, identifies savings, manages budgets, evaluates Savings Plans/Reserved Instances, right-sizes EC2/Lambda/RDS/EBS via Compute Optimizer, queries CUR with Athena, detects anomalies, scopes to billing views, monitors Free Tier.
Optimizes Vercel costs by analyzing Fluid Compute billing, reducing serverless function execution, and monitoring usage via API. Useful for plan selection and spend management.