cost-conversation — Claude Code skill: what it does, how to install
Groups LLM spending by session, displaying start time, message count, top model, and total cost. Helps evaluate long or expensive conversations.
npx skills add ruvnet/ruflo --skill cost-conversation -a claude-codeWhat cost-conversation does
The skill breaks down tracked spend by individual conversation rather than by agent or model. This makes it straightforward to pinpoint specific sessions that ran long or consumed expensive model tiers. Output includes a markdown table with conversation start times, session ID prefixes, message counts, top models, and costs.
Execution relies on the Bash tool. The agent runs node plugins/ruflo-cost-tracker/scripts/conversation.mjs. You can control output with environment variables: CONV_LIMIT=20 restricts output to twenty recent sessions, CONV_FORMAT=json switches markdown to JSON, and CONV_NAMESPACE overrides the target namespace.
The skill will fail without Node.js available in the environment to execute the .mjs script. It also depends strictly on existing tracking data populated earlier by cost-track.
What it helps with
- spot the most expensive conversation sessions
- check average session cost before scoping long tasks
- isolate project-specific expenses using CONV_NAMESPACE
- export session-level cost rollups as JSON
Example prompts for the agent
- Show me total spend per conversation.
- List the last 20 sessions and their cost in JSON using cost-conversation.
- Roll up conversation costs for namespace cost-tracking-core.
How to install cost-conversation
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill cost-conversation -a claude-code2Manually: put the files in place
~/.claude/skills/cost-conversation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/cost-conversation/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill cost-conversation -a codex2Manually: put the files in place
.agents/skills/cost-conversation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill cost-conversation -a cursor2Manually: put the files in place
.cursor/skills/cost-conversation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install ruvnet/ruflo cost-conversation2Manually: put the files in place
.github/skills/cost-conversation/SKILL.md1Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill cost-conversation -a gemini-cli2Platform CLI
gemini skills install https://github.com/ruvnet/ruflo --path plugins/ruflo-cost-tracker/skills/cost-conversationManually: put the files in place
.devin/skills/cost-conversation/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add ruvnet/ruflo --skill cost-conversation -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set104
The whole set →Similar
Questions about cost-conversation
How do I install cost-conversation in Claude Code?
Run npx skills add ruvnet/ruflo --skill cost-conversation -a claude-code.
How does cost-conversation differ from cost-report?
While cost-report aggregates expenses across agents and models, cost-conversation breaks spend down per conversation session.
What tools and environment variables does it support?
It requires the Bash tool and Node.js to execute conversation.mjs. You can pass CONV_FORMAT=json, CONV_LIMIT=20, and CONV_NAMESPACE=cost-tracking.
Source text
SKILL.md · MIT
---
name: cost-conversation
description: Per-conversation cost view — list every session in cost-tracking with started-at, message count, top model, and total cost
argument-hint: ""
allowed-tools: Bash
---
# Cost per Conversation
`cost-report` and `cost-optimize` aggregate by **agent** and **model**. This skill aggregates by **conversation (session)** — a different lens that surfaces *which conversations cost the most*. Useful for retrospectives ("which sessions ran long on Opus?") and for evaluating whether a given project's session pattern is sustainable.
## When to use
- After multiple sessions, to see total spend per conversation.
- Before scoping a long session, to understand typical cost-per-conversation.
- For per-project rollups via `CONV_NAMESPACE=cost-tracking-<project>`.
## Steps
1. **Run the script** from anywhere:
```bash
node plugins/ruflo-cost-tracker/scripts/conversation.mjs
```
Optional env:
- `CONV_FORMAT=json` — emit JSON instead of markdown
- `CONV_LIMIT=20` — show only the most recent N conversations
- `CONV_NAMESPACE=cost-tracking` — override target namespace
2. **Inspect the markdown table** — total cost across all conversations, per-tier rollup, then a per-session table (started-at, sessionId prefix, message count, top model, cost).
## Cross-references
- `cost-track` — the producer that populates `cost-tracking:session-*`
- `cost-report` — same data, per-agent / per-model lens
- `cost-trend` — drift across bench runs (different axis: corpus runs vs conversations)
- `cost-budget-check` — sums across conversations to evaluate the budget threshold
© ruvnet · MIT · ruvnet/ruflo