token-tracker

Track token usage and estimate API costs for Claude model requests.

8|1|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/thesaifalitai/claude-setup --skill token-tracker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-tracker
Source: https://github.com/thesaifalitai/claude-setup/tree/main/skills/token-tracker
Command: npx skills add https://github.com/thesaifalitai/claude-setup --skill token-tracker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides precise tracking and cost estimation for token usage so users can understand billing, optimize prompts, and budget for API usage across Claude models.

Core Features & Use Cases

  • Per-request Accounting: Estimates input, output, and total tokens for each request and provides an estimated cost with the chosen model.
  • Session Summaries & Budgets: Aggregates session totals, average cost per request, and monthly/annual budget estimates for forecasting.
  • Cost Comparison & Context Tracking: Compares costs across models, applies cache discounts, and monitors context window consumption with warnings for compaction.
  • Use Case: A developer or freelancer can enable tracking to append token and cost blocks after responses, run cost comparisons when evaluating model changes, and estimate monthly spend for a given workload.

Quick Start

Ask the token-tracker to "show token usage and estimated cost for the last request using Claude Sonnet 4.6".

Frequently Asked Questions about token-tracker

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

FAQPage Schema
How do I track token usage and estimate API costs for Claude model requests?

Track token usage and estimate API costs by calculating input, output, and total tokens using established heuristics, then applying model pricing tables and cache discounts to return per-request cost summaries.

Can I compare API billing costs across different Claude models?

You can compare API billing costs across different Claude models by applying each model's specific pricing tables to your token usage, allowing you to evaluate the financial impact of model changes.

Does this token tracking method apply to freelancers needing budget estimates?

This token tracking method applies directly to freelancers by providing monthly and annual budget estimates based on session totals, enabling accurate cost forecasting for client work using Claude tools.

How does context window consumption tracking handle compaction warnings?

Context window consumption tracking monitors token limits and triggers warnings when compaction is necessary, ensuring you stay within the model's context window while accounting for cache discounts.

What is the best way to monitor per-request token costs during a development session?

The best way to monitor per-request token costs is to enable tracking that appends token and cost blocks after responses, providing immediate visibility into the cumulative API spend during development.