agentsclimarketplace

Grafana billing

Skill nodnarbnitram/claude-code-extensions/.claude/skills/grafana-billing

Query Prometheus and Loki billing metrics from Grafana. Use when discussing observability costs, active series, ingestion rates, storage usage, or cardinality analysis.From its SKILL.md

Install
npx -y skills add nodnarbnitram/claude-code-extensions --skill grafana-billing

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.5 KB, as published. Nobody here has run it

Grafana Billing Metrics Skill

Query key billing metrics from Prometheus and Loki through Grafana's data source proxy API.

Quick Start

# Query both staging and prod (default)
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py

# Query specific environment
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --env staging
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --env prod

# JSON output for automation
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --json

# Filter to specific service
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --service prometheus
uv run .claude/skills/grafana-billing/scripts/billing_metrics.py --service loki

Environment Variables Required

  • GRAFANA_STAGING_API_KEY - API key for staging Grafana workspace
  • GRAFANA_PROD_API_KEY - API key for prod Grafana workspace

Key Metrics Captured

Prometheus

MetricDescription
Active Time SeriesCurrent count of active series (billing dimension)
Samples/secIngestion rate (DPM = samples/sec * 60)
TSDB StorageOn-disk storage bytes
Top CardinalityTop 10 metrics by series count

Loki

MetricDescription
Ingestion RateGB/day being ingested
Total BytesCumulative bytes received
Active StreamsNumber of active log streams
Memory ChunksChunks held in memory

When to Use

Use this skill when the user asks about:

  • Observability billing or costs
  • Active time series counts
  • Prometheus cardinality analysis
  • Loki ingestion rates
  • Storage usage for metrics or logs
  • Comparing staging vs production usage

Instructions for Claude

  1. Run the billing metrics script to gather current data
  2. Present the results in a clear, formatted way
  3. Highlight any concerning metrics (high cardinality, rapid growth)
  4. Compare staging vs prod if both are queried
  5. Suggest cost optimization if metrics are unusually high

Critical Rules

  • Always check that API keys are set before running
  • Use --json flag when you need to process the output programmatically
  • Default to querying both environments for comparison
  • Handle errors gracefully - missing data sources should not crash the script

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.