abhiyankhanal

Claude Code stop hook: per-prompt usage report with token costs, context window, and rate limits

21
6
80% credibility
Found Apr 04, 2026 at 19 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
JavaScript
AI Summary

Scripts to add and remove a feature that shows usage reports automatically after each session with Claude Code.

How It Works

1
📰 Discover the usage tracker

You hear about a simple way to see how much you're using your AI coding assistant after every chat.

2
📥 Grab the setup tools

Download the easy install file from the project page.

3
🚀 Set it up with one command

Run the install – it quietly adds the tracker to your AI tool so reports appear automatically.

4
💬 Chat with your AI as always

Keep using your coding helper for prompts and tasks just like before.

5
📊 Get instant usage reports

Right after each chat ends, a helpful summary pops up showing your usage.

6
🔧 Toggle it on or off anytime

Use the quick command to check status, enable, or disable reports whenever you want.

✅ Stay in control effortlessly

Now you always know your usage without extra work, and can remove it just as easily.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 19 to 21 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is claude-usage-report?

This JavaScript hook integrates with Claude Code as a stop trigger, generating a per-prompt Claude AI usage report that breaks down token costs, context window usage, and rate limits. It tackles the hassle of eyeballing Claude API usage report manually by displaying stats right after every interaction. Users get a one-script Claude code install, plus a CLI for quick enable, disable, or status checks—free Claude code download straight from GitHub.

Why is it gaining traction?

It delivers granular, real-time Claude code token usage report daily without dashboards or extra apps, spotlighting costs and limits devs actually hit mid-flow. The toggleable CLI and dead-simple setup beat clunky alternatives, making it a no-brainer for tracking Claude code pricing on the fly. Lightweight and open-source, it slots into Claude GitHub workflows like code review or connectors effortlessly.

Who should use this?

Claude Code power users burning through prompts in long coding sessions, API builders wiring Claude GitHub actions or apps, and indie devs monitoring Claude code token usage report to dodge rate limit surprises. Ideal for those prototyping with Claude GitHub Copilot rivals or auditing spends before scaling.

Verdict

Solid for targeted Claude code usage report needs, but with just 18 stars and a 0.8% credibility score, it's immature—expect basic docs and no tests, so test in non-prod first. Worth the quick install if you're hooked on Claude Code; otherwise, wait for more polish.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.