stats

Compute Claude Code usage totals, per-tool counts, and session counts from JSONL logs.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/Saturate/agents --skill stats-saturate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stats
Source: https://github.com/Saturate/agents/tree/main/plugins/observability/skills/stats
Command: npx skills add https://github.com/Saturate/agents --skill stats-saturate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Quickly derive actionable insights about Claude Code usage, costs, and tool activity from observability logs, helping you budget and optimize usage.

Core Features & Use Cases

  • Cost and usage summaries across sessions and time ranges
  • Most-used tools, token consumption, and session counts
  • Quick investigation of spikes in cost or tool usage to inform decisions

Quick Start

Ask Claude Code to produce a real-time cost and usage summary for today from the logs.

Frequently Asked Questions about stats

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

FAQPage Schema
How do I check Claude Code usage statistics and costs from logs?

Claude Code usage statistics are computed by querying daily-rotated JSONL logs located at ~/.claude/logs/. The tool calculates cost totals, per-tool usage, token consumption, and session counts across specified time ranges like today or this week.

What is the best way to track token consumption and spending spikes in Claude Code?

The best way to track token consumption and spending spikes is to query observability logs to compute per-tool usage and session counts. This helps you quickly investigate cost spikes to inform budgeting and optimization decisions.

Can I summarize session history and tool usage across different time ranges?

Yes, you can summarize session history and tool usage across time ranges such as today, this week, or this month. It queries observability logs to compute session counts and per-tool activity with clear formatting.

Do I need observability logs to analyze Claude Code costs and metrics?

Yes, you need daily-rotated JSONL observability logs located at ~/.claude/logs/ to analyze Claude Code costs and metrics. The tool operates directly on these log files to derive actionable insights about usage and tool activity.

Why does my Claude Code cost summary show different totals for the same day?

Cost summary totals may differ if the daily-rotated JSONL logs at ~/.claude/logs/ are actively being written to during the query. The tool computes totals based on the log state at the exact moment of the request, capturing real-time usage data.