Cost Track
Skill Verified ActiveAuto-capture per-session token usage from the Claude Code session jsonl and persist to the cost-tracking namespace
To provide a transparent and automated way to track the token usage and associated costs of Claude Code sessions for better budget management and reporting.
Features
- Auto-capture per-session token usage
- Persist usage to AgentDB
- Calculate USD cost based on model pricing
- Support for environment variable overrides
- Dry-run capability
Use Cases
- Capturing spend after a meaningful chunk of work
- Persisting final tally at session end
- Periodically capturing costs during long sessions
- Providing data for cost reporting and optimization tools
Non-Goals
- Directly managing LLM provider accounts or billing
- Real-time alerting for budget overruns (this is a producer for other skills)
- Providing detailed analysis of *why* tokens were used
Workflow
- Run the tracker script from the project root
- Script auto-discovers session jsonl or uses TRACK_SESSION env var
- Calculate cost using defined pricing
- Persist structured record to AgentDB cost-tracking namespace
- Inspect markdown summary and verify persistence
Practices
- Cost Tracking
- Session Management
Prerequisites
- Claude Code environment
- Access to session jsonl files
- AgentDB namespace configured
Code Execution
- info:ValidationWhile the script's operations are well-defined, explicit input validation using a schema library is not evident for environment variables or session data parsing.
- info:LoggingThe script provides markdown output for successful runs and can suppress it with `TRACK_QUIET=1`, but detailed audit logging to a specific file is not explicitly mentioned.
Installation
First, add the marketplace
/plugin marketplace add ruvnet/ruflo/plugin install ruflo-cost-tracker@rufloQuality Score
VerifiedTrust Signals
Similar Extensions
Guard
100Protect Claude Code sessions from context overflow by running a background daemon that monitors session size and auto-prunes before compaction hits. Use when the user says "guard", "protect session", "context getting long", "prevent compaction", "session management", or is running agent teams that need continuous context protection.
Session Export
100Exports a Claude Code session as a clean, readable markdown transcript. Use when the user wants to export a session, create a transcript, save session history to a file, or says "export this session".
Validate Plugin
100Validate a Claude Code plugin structure, frontmatter, and MCP tool references
Running Claude Code Via Litellm Copilot
100Use when routing Claude Code through a local LiteLLM proxy to GitHub Copilot, reducing direct Anthropic spend, configuring ANTHROPIC_BASE_URL or ANTHROPIC_MODEL overrides, or troubleshooting Copilot proxy setup failures such as model-not-found, no localhost traffic, or GitHub 401/403 auth errors.
Create Command
100Interactive assistant for creating new Claude commands with proper structure, patterns, and MCP tool integration
Rule Effectiveness Analysis
100Analyze which rules are actively used vs inert. Detect coverage gaps. Recommend pruning to reduce token consumption.