Cost Track
Captures per-session Claude Code token usage and USD cost into the cost-tracking namespace for reporting.
- CCM score
- 73 of 100
- skills.sh installs
- 685
- GitHub stars
- 82.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers reading the active session jsonl, tallying assistant-message usage per model, and computing cost from pricing tables
- Includes a
track.mjsscript with env overrides for session pinning (TRACK_SESSION), dry runs (TRACK_DRY_RUN), and output paths - Persists one record per session under the
session-<sessionId>key with per-model and per-tier cost breakdowns - Designed as the data producer feeding
cost-reportandcost-optimize, and suited to session-end or periodic runs
Install
$ npx -y skills add ruvnet/ruflo --skill cost-track -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Cost Track
Reads the active Claude Code session jsonl (~/.claude/projects/<encoded-cwd>/<session>.jsonl), tallies assistant-message usage per model, computes USD cost using REFERENCE.md pricing, and writes a structured record to the cost-tracking AgentDB namespace. This is the producer that gives cost-report and cost-optimize real data to consume.
When to use
- After a meaningful chunk of work, to capture spend for the report.
- At session-end to persist the final tally.
- Periodically during long sessions (cron-friendly — see
/loop 30m).
Steps
-
Run the tracker from the project root:
node plugins/ruflo-cost-tracker/scripts/track.mjsThe script auto-discovers the session jsonl from the current working directory. To pin a specific session:
TRACK_SESSION=/path/to/session.jsonl. To dry-run (no memory write):TRACK_DRY_RUN=1. -
Inspect the markdown summary — total cost, per-model and per-tier breakdowns, and the persisted memory key.
Details
- Repository
- github.com/ruvnet/ruflo
- Categories
- Agent Workflow & Planning, Finance & Trading
- First seen
- Jun 3, 2026
Questions
What does the cost-track skill do?
The cost-track skill reads the active Claude Code session jsonl file and tallies assistant message usage per model. It computes USD cost using the REFERENCE.md pricing and writes a structured record to the cost-tracking AgentDB namespace.
How do I install the cost-track skill?
Run npx -y skills add ruvnet/ruflo --skill cost-track -y in your project. The skill then lets the agent capture per-session token spend for the cost-report and cost-optimize skills to use.
Which category does cost-track belong to, and which skills lead it?
The cost-track skill sits in the Agent Workflow & Planning category on Claude Marketplaces, alongside grill-me, grill-with-docs, setup-matt-pocock-skills, grilling and prototype. It is the producer of token cost data that cost-report and cost-optimize read.
How do I check that cost-track saved a session record?
Run a memory search for the query session- in the cost-tracking namespace using the ruflo-core memory_search tool. The new session record should appear in the results, and cost-report step 1 reads from this same namespace.
Can cost-track run as a dry run or on a chosen session?
Yes, setting TRACK_DRY_RUN=1 skips the memory store call, and TRACK_SESSION=/path/to/session.jsonl pins a specific session file. Without these, the script uses the most recent session jsonl in the current project directory.
More from ruvnet/ruflo
All 236- Cost Booster Route684
- Cost Federation684
- Cost Summary684
- Intelligence Transfer684
- Vector Setup684
- Cost Trend683
- Cost Conversation682
- Cost Export681
- Cost Benchmark679
- Cost Booster Edit679
- Browser674
- Witness656
- Swarm Orchestration2.1K
- Agent Arch System Design1.4K
- Security Audit1.4K
- Agent Workflow1.4K
- Github Project Management1.4K
- Workflow Automation1.3K
- Github Code Review1.3K
- Agent Swarm1.3K
- Agent Spec Mobile React Native1.3K
- Agent Trading Predictor1.3K
- Github Workflow Automation1.3K
- Agent Analyze Code Quality1.2K
Similar to Cost Track
More Agent Workflow & Planningruflo-cost-trackerPluginruvnet/ruflo82.4K starsToken usage tracking, model cost attribution per agent, budget alerts, and optimization recommendations
cost-summarySkillruvnet/ruflo684 installsSingle-call JSON or markdown snapshot of total spend, per-tier costs, budget status, and federation totals.
session-reportSkillanthropics/claude-plugins-official5K installsGenerates an explorable HTML usage report from local Claude Code session transcripts, with anomaly callouts.
caveman-statsSkilljuliusbrussee/caveman400.9K installsShows recorded token usage and mode attribution for the current session, with savings reported as unknown.
cost-breakdownSkillhoangsonww/claude-code-agent-monitor1.2K starsDetailed per-model, per-session, and daily cost breakdown from the Agent Monitor pricing engine for Claude Code.
McpspendMCP serverandreisirbu91-lab59 starsCost and usage data from MCPSpend: today's spend, monthly limits, top tools, and sessions.