Claude Code usage

Claude Code Leaderboard

(189 ⭐ This CLI automatically monitors your token usage and posts your stats to the leaderboard after each Claude Code session.

189 stars 27 forksUsage & cost trackers Source

Install

Install
npx claude-code-leaderboard

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/grp06/claude-code-leaderboard.git

From the README

Claude Code Leaderboard CLI

Track your Claude Code usage and compete on the global leaderboard! This CLI automatically monitors your token usage and posts your stats to the leaderboard after each Claude Code session.

Quick Start

Follow the setup prompts to authenticate with Twitter and start tracking your usage automatically.

How It Works

The CLI integrates with Claude Code's hook system to automatically track your usage:

1. Automatic Setup: Installs a tracking hook in your Claude Code configuration
2. Usage Monitoring: After each Claude Code session ends (STOP command), your token usage is collected
3. Data Submission: Usage data is automatically sent to our backend service
4. Leaderboard Updates: Your stats appear on the public leaderboard at claudecount.com

What Gets Tracked

- Input tokens used
- Output tokens generated
- Cache creation/read tokens
- Session timestamps
- Model used (e.g., claude-sonnet-4)

Your actual prompts and responses are never collected - only usage statistics.

Understanding Claude Code Hooks

What Are Hooks?
Claude Code hooks are user-defined shell commands that execute automatically at specific points during Claude Code's execution lifecycle. They allow you to inject deterministic, programmatic actions directly into the agent's workflow - ensuring that key tasks always occur exactly when intended, rather than relying on the AI to remember to do them.

Hook Types
Claude Code supports hooks at different lifecycle events:
- Start: When a Claude Code session begins
- Stop: When a Claude Code session ends
- PreTool: Before any tool or command is executed
- PostTool: After a tool or command completes

How This Project Uses Hooks
This leaderboard CLI specifically uses a Stop hook, which means:
- Every time you finish a Claude Code session…
Read the full README on GitHub

Details

Language
JavaScript
Last updated
7 August 2025

FAQ

What is Claude Code Leaderboard?

(189 ⭐ This CLI automatically monitors your token usage and posts your stats to the leaderboard after each Claude Code session. It is a usage for Claude Code, from grp06/claude-code-leaderboard on GitHub.

How do I install Claude Code Leaderboard?

Run npx claude-code-leaderboard, then follow the setup in the README.

Is Claude Code Leaderboard popular?

grp06/claude-code-leaderboard has 189 GitHub stars and 27 forks, and is included in 1 curated Claude Code list. It was last updated on 7 August 2025.

More usage & cost trackers

Browse the most popular Claude Code mods, all usage & cost trackers, or the skills and MCP server directories.