Agent skill

Cost Export

by ruvnet in ruvnet/ruflo

Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)

MITAuto-check: notesDevOps & Cloud

Install Cost Export

skills CLI
$ npx skills add ruvnet/ruflo --skill cost-export -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ruvnet/ruflo cost-export --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ruvnet/ruflo.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/ruflo-cost-tracker/skills/cost-export .claude/skills/cost-export && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cost-export
GitHub stars
74k
Used in
1 other repo
Token cost
~687 tokens
SKILL.md length
182 words
Files
1
Skills in repo
264
Repo updated
First seen
Licence
MIT

At a glance

Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)

  • Works in 3 steps: Pick a format — textfile collector for… → Inspect what's emitted — Prometheus… → Webhook payload shape — the JSON the…
  • Tasks that involve Monitoring and alerting
  • SKILL.md covers When to use, Steps, Env overrides and Cross-references
  • Calls node

What it does

Cost Export is an agent skill from ruvnet/ruflo. Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)

Its SKILL.md is about 690 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Monitoring and alerting, LLM cost and token optimization and Webhooks. It works with Prometheus, Grafana and Datadog. The repository describes itself as: 🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory…. The licence is MIT.

When your agent uses it

  • Tasks that involve Monitoring and alerting
  • Tasks that involve LLM cost and token optimization
  • Tasks that involve Webhooks

Example prompts

  • “/cost-export”

Requirements

  • Pre-approved tools (allowed-tools): Bash

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Pick a format — textfile collector for Prometheus / Grafana, or webhook POST for everything else
  2. Inspect what's emitted — Prometheus output includes
  3. Webhook payload shape — the JSON the webhook receives matches the stdout JSON: { exportedAt, sessions: [...], budget, totalUsd, byTier }…

What it can do on your machine

Read from SKILL.md and the folder at commit 6051f67. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Cost Export loads about 687 tokens when it runs. Until then it costs about 39 tokens; SKILL.md has 182 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~39
When it runs · the whole SKILL.md, loaded when a task matches
~687

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ruvnet/ruflo at commit 6051f67, republished under its MIT licence (© ruvnet). 182 words, ~687 tokens.

Download SKILL.mdSave it as .claude/skills/cost-export/SKILL.md (or your agent's skills folder).
name
cost-export
description
Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards)
allowed-tools
Bash
argument-hint
[--prometheus <path>] [--webhook <url>]

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:

    bash
    # 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:

    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)
  3. 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 overrides

EnvDefaultPurpose
EXPORT_NAMESPACEcost-trackingOverride target namespace
EXPORT_WEBHOOK_HEADERunsetComma-separated K: V pairs for webhook auth
EXPORT_QUIET=1unsetSuppress non-error confirmation output

Cross-references

  • cost-track — produces the data this skill exports
  • cost-budget-check — the same cost_tracker_budget_* metrics are alertable in Prometheus
  • node_exporter textfile collector docs (Prometheus convention) — drop the .prom file in the collector directory and Prometheus picks it up

© ruvnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/ruflo-cost-tracker/skills/cost-export of ruvnet/ruflo.

Open the folder on GitHubat commit 6051f67

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in ruvnet/ruflo, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Cost Export next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Cost Export compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Cost Export this skillruvnet/ruflo74k1 repos~687Automated safety check: NotesMIT
Frontmcp Observabilityagentfront/frontmcp146—~4.6kAutomated safety check: PassApache-2.0
Monitoring Observabilityahmedasmar/devops-claude-skills203—~3.9kAutomated safety check: PassNone
Monitoring Observabilityyonatangross/orchestkit289—~2.2kAutomated safety check: PassMIT
ObservabilityTheBeardedBearSAS/claude-craft107—~547Automated safety check: PassMIT
Tsh Implementing ObservabilityTheSoftwareHouse/copilot-collections284—~2kAutomated safety check: PassMIT

Similar skills

  • Frontmcp Observability

    agentfront/frontmcp

    A skill your agent uses when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server.

    146 GitHub stars~4.6k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Monitoring Observability

    ahmedasmar/devops-claude-skills

    Monitoring and observability strategy, implementation, and troubleshooting.

    203 GitHub stars~3.9k tokensUpdated 5 mo ago
    DevOps & CloudAuto-check passed
  • Monitoring Observability

    yonatangross/orchestkit

    Monitoring and observability patterns for Prometheus metrics, Grafana dashboards, Langfuse v4 LLM tracing (astype, scorecurrentspan, shouldexportspan, LangfuseMedia), and drift detection.

    289 GitHub stars~2.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Observability

    TheBeardedBearSAS/claude-craft

    OpenTelemetry, distributed tracing, structured logging, metrics (Prometheus, Grafana, Datadog).

    107 GitHub stars~547 tokensUpdated 24 days ago
    DevOps & CloudAuto-check passed
  • Tsh Implementing Observability

    TheSoftwareHouse/copilot-collections

    Observability patterns for logging, monitoring, alerting, and distributed tracing.

    284 GitHub stars~2k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Queries live Prometheus metrics and manages Grafana dashboards as code for Happy's infrastructure, using the grafanactl CLI and the Grafana datasource proxy API.

    24k GitHub stars~2k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes

More from ruvnet/ruflo

All 264 skills in this repo
  • Stores, searches, and retrieves successful patterns with HNSW-indexed semantic search so agents can reuse past solutions instead of relearning them.

    74k GitHub starsUsed in 3 repos~830 tokens
    Auto-check passed
  • Runs claude-flow CLI security scans for input validation, path traversal, SQL injection, XSS, hardcoded secrets and known CVEs, and writes an audit report.

    74k GitHub starsUsed in 2 repos~823 tokens
    Auto-check passed
  • Applies the SPARC method (specification, pseudocode, architecture, refinement, completion) with 17 specialized modes and multi-agent orchestration, from research to deployment.

    74k GitHub starsUsed in 2 repos~829 tokens
    Auto-check passed
  • Coordinates a hierarchical swarm of specialized agents through the claude-flow CLI for work that spans several files or modules at once.

    74k GitHub starsUsed in 2 repos~779 tokens
    Auto-check passed
  • Sets up and drives Ruflo, an npm-installed orchestration layer for multi-agent swarms, persistent memory, routing, hooks and its MCP tool catalog.

    74k GitHub starsUsed in 1 repo~975 tokens
    Auto-check passed
  • Agent Coordination

    ruvnet/ruflo

    Reference for spawning, listing, monitoring and stopping agents with claude-flow commands, with agent type families, routing codes and coordination tips.

    74k GitHub starsUsed in 2 repos~519 tokens
    Auto-check passed

Categories

Questions about Cost Export

What does Cost Export do?

Export cost-tracking telemetry in Prometheus textfile or webhook JSON formats — for external observability (Grafana, Datadog, custom dashboards). Cost Export is an agent skill from ruvnet/ruflo.

When should I use Cost Export?

Cost Export fits situations like: tasks that involve Monitoring and alerting; tasks that involve LLM cost and token optimization; tasks that involve Webhooks.

How do I install Cost Export in Claude Code?

Run `npx skills add ruvnet/ruflo --skill cost-export -a claude-code`. Or copy the skill folder (plugins/ruflo-cost-tracker/skills/cost-export in ruvnet/ruflo) into .claude/skills/cost-export in your project. Claude Code loads it when a task matches its description.

How do I install Cost Export in Codex?

Run `npx skills add ruvnet/ruflo --skill cost-export -a codex`. Or copy the skill folder (plugins/ruflo-cost-tracker/skills/cost-export in ruvnet/ruflo) into .agents/skills/cost-export in your project. Codex loads it when a task matches its description.

Can I use Cost Export in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ruvnet/ruflo --skill cost-export -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cost-export, .gemini/skills/cost-export, .github/skills/cost-export and .opencode/skills/cost-export in your project.

What does Cost Export need to run?

Going by SKILL.md and its folder, Cost Export needs the command-line tools its instructions call (node). Its frontmatter pre-approves these tools: Bash.

Does Cost Export access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Cost Export safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Cost Export use?

Cost Export is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Cost Export use?

About 687 tokens (SKILL.md is roughly 2.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Cost Export?

Skills that share tags, products or a category with Cost Export: Frontmcp Observability (agentfront/frontmcp, 146 stars), Monitoring Observability (ahmedasmar/devops-claude-skills, 203 stars), Monitoring Observability (yonatangross/orchestkit, 289 stars) and Observability (TheBeardedBearSAS/claude-craft, 107 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Cost Export?

ruvnet (a GitHub user) maintains it in ruvnet/ruflo, which has 74,089 GitHub stars. The repository holds 264 skills in this directory. The repository was last updated on October 8, 2026.

Source: ruvnet/ruflo on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.