Monitors and calculates real-time API token usage and USD costs for specific Claude Code session operations.
The API Cost Tracker skill provides developers with precise visibility into their Anthropic API spend by measuring token consumption during specific tasks. By parsing session JSONL files, it tracks input, output, and cache tokens—including cache hits and ephemeral writes—and applies up-to-date pricing to generate detailed reports. This skill is essential for teams managing budgets or developers seeking to optimize prompt efficiency by identifying expensive operations within their automated coding workflows.
主要功能
01Real-time token usage monitoring for specific session segments
0224 GitHub stars
03Detailed cost calculation using current Anthropic pricing models
04Automated generation of detailed JSONL token logs and summary reports
05Support for cache hits and ephemeral cache write tracking
06Project-specific tracking within the Claude Code filesystem structure
使用场景
01Generating consumption reports for project stakeholders or team billing
02Budgeting and monitoring API spend during complex code migrations
03A/B testing prompts to compare cost-to-performance ratios