# Token Tracker

> Track Claude Code token usage and API-equivalent costs across sessions, projects, and devices.

Token Tracker is a paid AI agent skill on Agensi by Taylen, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [Taylen](https://www.agensi.io/creators/taylen)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.2
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/token-tracker
- Tags: llm-ops, python, cost-analysis, claude-code, productivity

## About this skill

Claude Code transcripts reside locally on your machine, but tracking the cumulative cost of long-running sessions or multi-model projects is difficult without a dedicated tool. This skill monitors your local usage history to provide clear token counts and API-equivalent cost estimates.

### What it does
- **Cost Calculation**: Converts token counts into USD based on current API list prices for input, output, and cache operations.
- **Granular Reporting**: Breaks down usage by session, project, day, or model to identify where spend is highest.
- **Historical Analysis**: Filters data by specific timeframes such as the last 24 hours, 7 days, or custom ISO dates.
- **Multi-Device Sync**: Aggregates usage data across multiple computers using a shared sync folder.
- **Optimization Insights**: Highlights how cache reads impact costs and suggests session management improvements.

### How it works
1. Locates local JSONL transcripts in the Claude configuration directory.
2. Executes a Python script to parse message IDs, model versions, and token metadata.
3. Applies usage rates for input, output, and prompt caching to the raw data.
4. Generates a summary or detailed table based on your specific query parameters.

### Frameworks & tools
This skill utilizes Python 3.8+ and the standard library to process local transcript files.

### Why this beats prompting it yourself
An LLM cannot natively access or parse your local hidden file system to aggregate thousands of lines of JSONL data accurately. This skill uses a specialized script to ensure every message ID is deduplicated and every cache hit is accounted for mathematically.

### Use cases
- Audit your total API-equivalent spend for the current month.
- Find which project or model is consuming the most tokens.
- Compare usage trends across different development machines.
- Export usage data to JSON for custom reporting or visualization.

### Known limitations
Only counts transcripts currently stored on disk; deleted history cannot be recovered. Requires Python 3.8 or higher installed on the host machine.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Token Tracker skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What specific problems does this skill solve for heavy users of Claude Code?

This skill parses local Claude configuration transcripts to provide a detailed breakdown of token counts and API equivalent costs across your sessions, projects, and specific models. It solves the difficulty of manually calculating spend for long running sessions and helps identify which tasks are the most resource intensive.

### What do I need to have installed on my computer to use this skill?

This skill requires Python 3.8 or higher to be installed on your machine to execute the parsing script. It also requires the presence of local JSONL transcript files typically found in your Claude configuration directory.

### What kind of reports and data formats does the skill produce?

The skill generates clear summaries and markdown tables showing cost estimates in USD, token totals for input and output, and cache performance data. You can also request the data in JSON format if you need to export it for custom reporting or visualization.

### Are there any limitations to what usage data can be tracked?

The costs provided are based on current API list prices and are for estimation purposes; they do not represent actual billing if you are using a flat rate subscription. Additionally, it can only track usage for transcripts currently stored on your disk, so any history that has been deleted cannot be recovered.

### How do I ask my agent to generate a usage report?

You can ask your agent questions like how much have I spent this week, what is my most expensive project, or show me a token usage report for the last 30 days. You can also use shorthand commands like /tokens to get a quick summary of your current session and all time totals.

### Can I track my total usage if I work on multiple different computers?

Yes, if you provide a shared sync folder through a service like Dropbox or iCloud, the skill can aggregate usage totals across different computers. It writes a small data file for each machine to that folder and combines them to give you a holistic view of your spend.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
