cost-conversation

Aggregates cost-tracking data per conversation session with message counts and model usage.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill cost-conversation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cost-conversation
Source: https://github.com/ruvnet/claude-flow/tree/main/plugins/ruflo-cost-tracker/skills/cost-conversation
Command: npx skills add https://github.com/ruvnet/claude-flow --skill cost-conversation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When tracking AI usage costs, per-agent and per-model reports hide which individual conversations consumed the most budget. This Skill aggregates cost data by conversation session so you can identify expensive sessions and evaluate whether a project's session pattern is sustainable.

Core Features & Use Cases

  • Per-Session Cost Table: Lists every conversation with started-at timestamp, session ID, message count, top model, and total cost.
  • Flexible Output Formats: Emits a markdown table by default or JSON via the CONV_FORMAT environment variable, with CONV_LIMIT to restrict to the most recent N conversations.
  • Per-Project Rollups: Supports namespace overrides via CONV_NAMESPACE to scope cost analysis to a specific project.
  • Use Case: After a week of sessions, run the report to find which conversations ran long on Opus and decide whether to adjust model selection or session length.

Quick Start

Ask the assistant to run the cost-conversation report to show total spend per conversation session.

Frequently Asked Questions about cost-conversation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I see cost per conversation instead of per agent?

Run the conversation.mjs script from the ruflo-cost-tracker plugin, which aggregates the cost-tracking namespace by session. It outputs a markdown table with started-at time, message count, top model, and total cost per conversation.

How to export conversation cost data as JSON?

Set the CONV_FORMAT environment variable to json before running the script. This emits machine-readable JSON instead of the default markdown table, suitable for piping into other tools or dashboards.

Can I limit the report to recent conversations only?

Yes, set CONV_LIMIT to a number such as 20 to show only the most recent N conversations. Without this variable, the report includes every session stored in the cost-tracking namespace.

How do I track costs for a specific project separately?

Override the target namespace with CONV_NAMESPACE, for example cost-tracking-myproject. This scopes the aggregation to sessions recorded under that project's namespace, enabling per-project cost rollups.

Why is the conversation cost report empty?

The report reads from the cost-tracking namespace, which is populated by the cost-track producer skill. If no sessions have been recorded yet, or you are pointing at the wrong namespace, the table will be empty.