ruvnet avatar

Cost Export

Pulls all cost tracking data from AgentDB and spits it out in Prometheus textfile format or as JSON to a webhook. You'd use this after running cost-track to get those metrics into Grafana, Datadog, or wherever you actually look at dashboards. The Prometheus output includes per-session costs, per-tier breakdowns, and budget utilization gauges that you can alert on. Works well on a cron loop to keep dashboards fresh. Without this, your cost data just sits in the database doing nothing. The webhook mode is handy for one-off reports to Slack or custom endpoints with basic auth header support.

skills.sh installs
681
GitHub stars
81.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add ruvnet/ruflo --skill cost-export --agent claude-code

Installs into .claude/skills of the current project.

Files

Cost Export

Pulls every session-* and budget-config-* record from cost-tracking and emits in formats consumable by external observability systems. Without this, cost data lives only inside the AgentDB namespace; with it, the same data lights up dashboards.

When to use

  • After any cost-track run, to refresh metrics for Grafana / Datadog / Prometheus.
  • Cron-friendly via /loop 5m to keep external dashboards near-real-time.
  • One-shot to a webhook for ad-hoc reporting (Slack, custom endpoint).

Steps

  1. Pick a format — textfile collector for Prometheus / Grafana, or webhook POST for everything else:

    # Prometheus node_exporter textfile collector
    node plugins/ruflo-cost-tracker/scripts/export.mjs --prometheus /var/lib/node_exporter/textfile_collector/cost_tracker.prom
    
    # Webhook (POSTs JSON; add auth via env)
    EXPORT_WEBHOOK_HEADER='Authorization: Bearer $TOKEN' \
      node plugins/ruflo-cost-tracker/scripts/export.mjs --webhook https://hooks.example.com/cost-tracker
    
    # Stdout JSON (default if no flag)
    node plugins/ruflo-cost-tracker/scripts/export.mjs
    
  2. Inspect what's emitted — Prometheus output includes:

Sponsors

Details

Repository
github.com/ruvnet/ruflo
Category
DevOps & CI/CD
First seen
Jun 3, 2026

More from ruvnet/ruflo

All 236
1joellewis avatarworkflow-automationjoellewis/finance_skillsDesign human-in-the-loop workflow orchestration for securities operations: task routing, approval chains, and SLA monitoring. Use when building multi-level appr679skills.sh installs
2thebushidocollective avatarstorybook-story-writingthebushidocollective/hanUse when creating or modifying Storybook stories for components. Ensures stories follow CSF3 format, properly showcase component variations, and build successfu678skills.sh installs
3alirezarezvani avatarapi-test-suite-builderalirezarezvani/claude-skillsUse when the user asks to generate API tests, create integration test suites, test REST endpoints, or build contract tests.677skills.sh installs
4alirezarezvani avataragent-workflow-designeralirezarezvani/claude-skillsDesign production-grade multi-agent workflows with clear pattern choice (sequential, parallel, hierarchical), handoff contracts, failure handling, and cost/cont676skills.sh installs
5syncfusion avatarsyncfusion-react-circular-gaugesyncfusion/react-ui-components-skillsImplement Syncfusion React Circular Gauge for displaying KPIs, sensor data, speedometers, and real-time monitoring dashboards. Use this skill when users need to676skills.sh installs
6aj-geddes avatarlog-analysisaj-geddes/useful-ai-promptsAnalyze application and system logs to identify errors, patterns, and root causes. Use log aggregation tools and structured logging for effective debugging.674skills.sh installs