cost-export
Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Ruflo is a multi-agent orchestration platform for AI coding agents (Claude Code, Cursor, Codex, Copilot, Gemini, Amp, +12 more). Use this skill when the user wants to (1) install/init ruflo in a project, (2) run multi-agent swarms with hierarchical coordination, (3) use ruflo's 314+ MCP tools for memory, routing, hooks, sub-agents, or workflows, (4) check ruflo status/version/doctor health, or (5) discover which of ruflo's 30+ plugins fits their task.
Create a new Architecture Decision Record with sequential numbering and AgentDB registration
Build or rebuild the ADR index + dependency graph by running scripts/import.mjs (handles v3-style and plugin-style ADR formats; one Bash call vs hundreds of MCP round-trips)
Reconcile the ADR index against a DELETED ADR file or relation line by dropping and rebuilding adr-patterns + adr-edges from scratch (scripts/reindex.mjs). Use when adr-index alone leaves stale rows behind.
Review code changes against accepted ADRs for compliance violations
Read back adr-patterns + adr-edges namespaces, surface dangling refs / supersede cycles / status mismatches; exit 1 on cycles
| name | cost-export |
| description | Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards) |
| argument-hint | [--prometheus <path>] [--webhook <url>] |
| allowed-tools | Bash |
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.
/loop 5m to keep external dashboards near-real-time.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
Inspect what's emitted — Prometheus output includes:
cost_tracker_total_usd <gauge>
cost_tracker_tier_total_usd{tier="opus|sonnet|haiku"} <gauge>
cost_tracker_session_total_usd{session="<8-char>"} <gauge>
cost_tracker_session_messages{session="<8-char>"} <counter>
cost_tracker_budget_usd <gauge> (if budget configured)
cost_tracker_budget_utilization <gauge> (spent / budget)
Webhook payload shape — the JSON the webhook receives matches the stdout JSON: { exportedAt, sessions: [...], budget, totalUsd, byTier }. Headers may be added via EXPORT_WEBHOOK_HEADER='K1: V1, K2: V2' (comma-separated).
| Env | Default | Purpose |
|---|---|---|
EXPORT_NAMESPACE | cost-tracking | Override target namespace |
EXPORT_WEBHOOK_HEADER | unset | Comma-separated K: V pairs for webhook auth |
EXPORT_QUIET=1 | unset | Suppress non-error confirmation output |
cost-track — produces the data this skill exportscost-budget-check — the same cost_tracker_budget_* metrics are alertable in Prometheus.prom file in the collector directory and Prometheus picks it up