New to Claude Skills? Learn how to install them →

ruvnet on GitHub

Cost Summary

Free

Get instant insights into your cost data.

by ruvnet67.6k stars on ruvnet/ruflo
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Cost Summary does

Cost Summary provides a straightforward, single-call interface to retrieve detailed cost data related to your usage. This skill is particularly useful for developers and designers who need to monitor and analyze their spending across various tiers and sessions. By executing a simple command, users can obtain a comprehensive snapshot of their total costs, budget status, and session details in either JSON or markdown format.

The output includes essential metrics such as total spend, session counts, and a breakdown by tier and model. This allows for quick assessments of where resources are being allocated, making it easier to manage budgets and optimize costs. The skill is designed to be integrated with other plugins, scripts, or dashboards, enabling seamless data retrieval for further analysis or reporting.

Cost Summary is ideal for users who require a quick overview of their cost state or need to provide this information to a dashboard or Slackbot. Its ability to aggregate data from multiple cost-tracking sources ensures that you have a holistic view of your spending, helping you make informed decisions about resource allocation.

However, while Cost Summary offers valuable insights, it is not a replacement for more comprehensive cost management tools. It serves as a snapshot rather than an in-depth analysis, so users seeking detailed financial reports or projections may need to look elsewhere.

When to use it

Use this tool when you need a quick overview of your cost data or when another plugin requires access to your cost state.

When not to use it

This skill is not suitable for in-depth financial analysis or when a detailed report is required.

What you can build with it

Integrating with Dashboards

Use Cost Summary to provide real-time cost data to dashboards or Slackbots for easy monitoring.

Quick Cost Snapshots

Execute the script for an instant view of your current spending status across various tiers.

Budget Monitoring

Utilize Cost Summary to check your budget utilization and spending against set limits.

How to install Cost Summary

View source

1. Install with the skills CLI

npx skills add ruvnet/ruflo/cost-summary --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by ruvnet

Cost Summary

A stable single-call interface that other plugins / scripts / dashboards can shell out to and parse. ADR-0002 considered exposing cost_report / cost_summary as proper MCP tools but deferred that — adding MCP tools requires modifying @claude-flow/cli source, out of scope for plugin-local work. This script is the equivalent: same data, exposed via a stdout JSON contract.

When to use

  • Another plugin needs a snapshot of cost state — it shells out to summary.mjs --format json and parses.
  • A dashboard / Slackbot fetches a one-line cost rollup.
  • Quick "where am I right now?" view that pulls from every cost-tracker source (cost-tracking + federation-spend).

Output contract (JSON, stable)

{
  "exportedAt": "<ISO>",
  "total_cost_usd": 1546.36,
  "sessionCount": 1,
  "conversationCount": 1,
  "byTier": { "haiku": 0, "sonnet": 0, "opus": 1546.36, "unknown": 0 },
  "byModel": {
    "claude-opus-4-7": {
      "tier": "opus",
      "cost_usd": 1546.36,
      "messages": 1597,
      "input_tokens": 3090,
      "output_tokens": 3295940,
      "cache_creation_input_tokens": 10659599,
      "cache_read_input_tokens": 732833690
    }
  },
  "topSession": {
    "sessionId": "1dba3b8c-...",
    "total_cost_usd": 1546.36,
    "messageCount": 1597
  },
  "budget": {
    "budget_usd": 2500.00,
    "setAt": "<ISO>",
    "spent_usd": 1546.36,
    "utilization": 0.6185,
    "level": "INFO"
  },
  "federation": {
    "eventCount": 0,
    "peerCount": 0,
    "totalUsd24h": 0
  }
}

Steps

# Markdown (default)
node plugins/ruflo-cost-tracker/scripts/summary.mjs

# JSON for programmatic consumption
node plugins/ruflo-cost-tracker/scripts/summary.mjs --format json

Optional env: SUMMARY_NAMESPACE=cost-tracking, SUMMARY_FED_NAMESPACE=federation-spend, SUMMARY_FORMAT=json.

Cross-references

  • cost-report — narrative report (per-agent / per-model lens; uses same data)
  • cost-export — pushes to Prometheus / webhook (this skill is pull-style; export is push-style)
  • ADR-0002 §"Decision" — explicitly defers proper MCP-tool registration to a future ADR

Frequently asked questions about Cost Summary

Similar skills