usage-tracker

Display Claude Code subscription usage statistics and trends from local caches.

3|Updated Jul 17, 2024
One-click install
npx skills add https://github.com/Castrozan/.dotfiles --skill usage-tracker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: usage-tracker
Source: https://github.com/Castrozan/.dotfiles/tree/main/agents/skills/usage-tracker
Command: npx skills add https://github.com/Castrozan/.dotfiles --skill usage-tracker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ccost, python3, and includes scripts (resource) components.

What problem does it solve?

This skill provides a compact Claude Code usage dashboard to monitor token usage, daily breakdowns, and subscription activity, eliminating manual tallying.

Core Features & Use Cases

  • Daily and weekly insights: See today’s usage, this week’s totals, and all-time aggregates in one view.
  • Detailed stats: Display daily activity counts, session counts, and tool calls from Claude usage data.
  • Use Case: An admin or team lead wants to track Claude Code consumption across multiple projects and optimize quotas.

Quick Start

Run the usage-tracker script to generate the dashboard: bash ~/@workspacePath@/agents/skills/usage-tracker/scripts/usage-tracker.sh

Frequently Asked Questions about usage-tracker

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

FAQPage Schema
How do I monitor Claude Code token usage and subscription activity?

To monitor Claude Code token usage, run the usage-tracker script to generate a dashboard displaying daily breakdowns, weekly totals, and all-time aggregates from local caches. It eliminates manual tallying by reading directly from usage data.

What is the best way to track daily Claude Code tool calls and session counts?

Tracking daily Claude Code tool calls and session counts is done by generating a compact dashboard that reads local stats cache files. It displays daily activity counts, session counts, and tool calls in a single view.

Do I need the ccost CLI and a stats cache to view Claude usage statistics?

Yes, viewing Claude usage statistics requires the ccost CLI and a Claude Code stats cache located at ~/.claude/stats-cache.json. Without these dependencies, the dashboard cannot retrieve token usage data or subscription trends.

Can I use this usage tracker to manage quotas across multiple projects?

You can use this usage tracker to manage quotas across multiple projects by viewing daily usage, weekly totals, and tool calls. Admins and team leads use these insights to optimize consumption and plan capacity.

Why is my Claude Code usage dashboard not working?

A Claude Code usage dashboard fails when the stats cache at ~/.claude/stats-cache.json is missing or the ccost CLI is not installed. Ensure python3 and both dependencies are present before running the tracker script.