Claude Code /stats: See How Much AI Does For You
Table of Contents
- What is /stats
- How to Use It
- Basic Usage
- Switching Time Ranges
- What It Tells You
- Usage Heatmap
- Key Metrics
- Favorite Model
- Achievement System
- Peak Hours
- Top Projects
- Who Should Use /stats
- Subscription Users (Pro / Max)
- API Users
- Practical Tips
- Tip 1: Check /stats Once a Week
- Tip 2: Let Streaks Motivate You
- Tip 3: Schedule Work Around Peak Hours
- Tip 4: Reflect on Model Preferences
- /stats vs /cost vs /usage
- Final Thoughts
What is /stats
When using Claude Code, you might have wondered about things like:
- How much time do I spend in Claude Code each day? When am I most active?
- Which model do I use most? Sonnet or Opus?
- How many consecutive days have I been using it?
You can’t answer these questions reliably by feel alone.
This is where the /stats command comes in.
/stats is a built-in Claude Code command that displays your personal usage statistics and behavioral insights. It generates a GitHub-style contribution heatmap, along with streak data, favorite models, and more — essentially a “report card” for your AI pair programming.
In short: see how well you and Claude Code have been working together.
How to Use It
Basic Usage
In Claude Code’s interactive mode, type:
/stats
That’s it. Claude Code renders a full data dashboard right in your terminal.
Switching Time Ranges
Once /stats is open, press r to cycle through three time windows:
- Last 7 days
- Last 30 days
- All time
Different time ranges reveal usage trends at different granularities.
What It Tells You
Usage Heatmap
The most eye-catching part of /stats is a GitHub-style activity heatmap that uses orange blocks of varying intensity to show daily usage over the past 12 weeks:
- Blank — no usage
- Light — light usage
- Medium — moderate usage
- Dark — heavy usage
At a glance, you can see which days you were “grinding with Claude Code” and which days you took a break.
Key Metrics
Below the heatmap are several key numbers:
- Sessions (30d) — how many Claude Code sessions you’ve had in the past 30 days
- Total Prompts — total number of messages you’ve sent
- Tokens Used — cumulative token consumption
- Avg Session — average session duration
- Current Streak — how many consecutive days you’ve been using Claude Code
- Longest Streak — your all-time best consecutive usage record
Favorite Model
/stats shows which model you use most — whether you lean toward Sonnet or Opus. This helps you reflect on your model selection habits: are you using Opus for tasks that Sonnet could handle? Should you be trying Haiku more often?
Achievement System
/stats includes an achievement system, similar to unlocking achievements in a game:
- 7-Day Streak — used Claude Code 7 days in a row
- 30-Day Streak — used Claude Code 30 days in a row
- 100 Prompts Club — sent 100 total messages
- Token Millionaire — consumed millions of tokens
- Night Owl — had a session at 2 AM
Completed achievements show ✓, while incomplete ones show ○ with progress indicators. It’s a small touch, but it genuinely creates that “one more day” motivation.
Peak Hours
A bar chart shows which hours of the day you’re most active. For example:
- 9–10 AM: 18%
- 2–3 PM: 15%
What’s the point of knowing your peak hours? You can schedule your most complex coding tasks during the time when you and Claude Code are both “in the zone.”
Top Projects
If you use Claude Code across multiple projects, /stats ranks them by usage proportion:
- my-saas-app: 34%
- open-source-lib: 28%
- side-project: 18%
Instantly see which project is consuming the most of your AI time.
Who Should Use /stats
Subscription Users (Pro / Max)
If you’re a Claude Pro or Max subscriber, /cost isn’t very relevant since your usage is included in the subscription. /stats is what’s built for you.
It doesn’t care about “how much you spent” — it focuses on “how you use it” — usage patterns, habits, and preferences. These insights have real value for optimizing your workflow.
API Users
While API users care more about the cost data in /cost, the behavioral insights from /stats are equally valuable. For example, discovering that you’re using Opus for everything might reveal that many simple tasks could be switched to Sonnet to save money.
Practical Tips
Tip 1: Check /stats Once a Week
You don’t need to check it daily, but spending 30 seconds on /stats once a week is a good habit. It helps you spot unconscious usage patterns:
- “I barely use Claude Code on Wednesdays”
- “I’ve been using Opus exclusively, but Sonnet would be fine for most of these tasks”
- “This side project takes up 40% of my AI time, but the output isn’t proportional”
Tip 2: Let Streaks Motivate You
The streak feature in /stats has a subtle motivational effect. When you see “Current Streak: 14 days,” you instinctively want to keep that number going.
This isn’t just feel-good advice — consistent use of Claude Code genuinely helps you better understand its capabilities and best practices. Like any tool, the more you use it, the better you get.
Tip 3: Schedule Work Around Peak Hours
If /stats shows you’re most active with Claude Code between 9–11 AM, that’s your “golden window” for AI-assisted work. Schedule your most challenging coding tasks during this period for potentially higher efficiency.
Tip 4: Reflect on Model Preferences
If /stats shows you’re using Opus 90% of the time, consider whether some simpler tasks (writing tests, adding comments, small refactors) could use Sonnet or even Haiku instead. For subscribers, this affects quota efficiency; for API users, it directly impacts cost.
/stats vs /cost vs /usage
All three commands relate to “usage,” but they focus on completely different angles:
| /stats | /cost | /usage | |
|---|---|---|---|
| Focus | Behavioral patterns and habits | Current session costs | Token consumption and quotas |
| Time range | 7 days / 30 days / all time | Current session only | Current quota period |
| Primary audience | Subscribers | API users | All users |
| Core value | Insights and optimization | Cost control | Capacity management |
| Analogy | Driving habits report | How much this fill-up cost | How much fuel is left in the tank |
My recommendations:
- Want to understand how you use Claude Code →
/stats - Want to know how much this session cost →
/cost - Want to check remaining quota →
/usage
Final Thoughts
/stats isn’t a “productivity tool” — it won’t write code, fix bugs, or run tests for you. But it is a self-awareness tool.
Many people use Claude Code on autopilot: if it feels like a heavy day, it must be heavy; if Sonnet seems sufficient, they stick with Sonnet. But feelings are often inaccurate. /stats uses data to reveal your actual usage patterns, giving your optimizations a factual foundation.
A good tool user doesn’t just know how to use the tool — they understand how they use the tool.
Next time you have a free moment in Claude Code, type /stats and check out your “AI coding report card.” You might discover some unexpected usage habits — and those discoveries are often where workflow optimization begins.
Related Articles
Claude Code Agent Loop: Dissecting the Heart of an AI Coding Assistant
How does Claude Code understand your requests, invoke tools, and self-recover step by step? A source-code deep dive into the Agent Loop's core architecture — streaming responses, parallel tool execution, auto-compaction, and error recovery.
Claude Code settings.json Explained (1): Where Config Files Live and Who Wins
A complete guide to Claude Code's configuration file system — five config sources, their file paths, priority rules, array merging vs value overriding, and enterprise managed settings delivery.
Claude Code settings.json Deep Dive (Part 2): The Permissions System
A thorough breakdown of Claude Code's permissions configuration — allow/deny/ask rule arrays, wildcard syntax, MCP tool permissions, defaultMode options, and additionalDirectories.
Claude Code settings.json Deep Dive (Part 3): The Hooks System
A thorough breakdown of Claude Code's hooks configuration — four hook types, core events (PreToolUse/PostToolUse/Stop/Notification), stdin/stdout protocol, exit code semantics, and practical examples.
Claude Code settings.json Deep Dive (4): env, Models, Auth, and Other Useful Fields
A comprehensive guide to the remaining settings.json fields in Claude Code — env variable injection, model configuration, authentication helpers, Git attribution, session cleanup, language and UI, thinking depth, auto-updates, memory system, and more.