cost-tracking

Parse local JSONL metrics logs to report token usage and estimated costs.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/ZESCODE/Zes-Orchestration-System --skill cost-tracking-zescode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cost-tracking
Source: https://github.com/ZESCODE/Zes-Orchestration-System/tree/main/.agents/skills/cost-tracking
Command: npx skills add https://github.com/ZESCODE/Zes-Orchestration-System --skill cost-tracking-zescode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the lack of visibility into AI operational costs by providing a clear, automated breakdown of token usage and financial expenditure for Claude Code sessions.

Core Features & Use Cases

  • Usage Analytics: Aggregates cumulative token counts and estimated USD costs from local metrics logs.
  • Budget Management: Provides session-level and model-specific breakdowns to help users stay within their financial limits.
  • Use Case: When a user needs to verify their monthly spending or identify which models are consuming the most budget, this skill parses the local JSONL logs to generate a comprehensive report.

Quick Start

Ask the assistant to provide a summary of your total Claude Code spending and a breakdown by model for the last seven days.

Frequently Asked Questions about cost-tracking

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

FAQPage Schema
How do I track Claude Code token usage and estimated costs from local logs?

To track Claude Code token usage and estimated costs, you can parse local JSONL metrics logs to calculate cumulative token counts and generate session-level financial spending breakdowns by model and date.

Do I need Node.js to analyze Claude Code spending metrics?

Yes, you need Node.js installed to execute the log-processing logic that parses local JSONL metrics snapshots and calculates your cumulative Claude Code token usage and estimated USD costs.

What is the best way to get a spending breakdown by model for Claude Code sessions?

The best way to get a spending breakdown by model is to analyze local JSONL metrics logs, which aggregates session-specific snapshots to report cumulative token usage and estimated financial expenditure per model.

Can I monitor my Claude Code budget using local metrics logs?

Yes, you can monitor your Claude Code budget by parsing local JSONL logs to calculate session-level and model-specific token usage breakdowns, helping you verify monthly spending and stay within financial limits.

How does parsing JSONL metrics logs calculate AI operational costs?

Parsing JSONL metrics logs calculates AI operational costs by aggregating session-specific snapshots of cumulative token counts and converting the total volume into estimated USD financial expenditure for Claude Code sessions.

What are the limitations of tracking Claude Code spending through local metrics?

Limitations of tracking Claude Code spending through local metrics include requiring access to the local metrics directory and Node.js to parse JSONL logs, meaning cost tracking is restricted to session-specific snapshots stored locally.