usage-tracker
Skill0 starsChanged 5 months agoMITView on GitHub
Track Claude Code usage credits and pace. Connects to Chrome via CDP (port 9222) to scrape claude.ai/settings/usage, extracts current usage percentages (session, weekly, extra), calculates daily budget vs ideal pace, and displays a visual dashboard with progress bars. Use when the user wants to check credits, usage, pace, or asks 'should I slow down/speed up'. Triggers: '/usage', 'check usage', 'check credits', 'how are my credits', 'usage tracker', 'pace check', 'credit pace'.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- as-sher/claude-skillstheir own version, first seen Oct 15, 2026
- j4rk0r/claude-skillstheir own version, first seen Apr 7, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- j4rk0r/claude-skills★ 2same name
- as-sher/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository12 other files it gives its agents.
- carouselSkill
- classifier-dashboardSkill
- cleanupSkill
- decisionsSkill
- handoffSkill
- obsidian-launcherSkill
- one-pagerSkill
- proofSkill
- session-summarySkill
- transcribeSkill
- video-analysisSkill
- web-image-optimizerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 10 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Google Chrome: must be running with --remote-debugging-port=9222 and logged into claude.ai
- Distinctive: line 73
If the script returns a login page, the user needs to log in to claude.ai in the Chrome instance first.
- Distinctive: line 79
Session usage: Look for "X% used" after "Current session" + "Resets in Y hr Z min"
- Distinctive: line 80
Weekly All Models: Look for "X% used" after "All models" + "Resets [Day] [Time]"
- Distinctive: line 81
Weekly Sonnet Only: Look for "X% used" after "Sonnet only" + "Resets [Day] [Time]"
- Distinctive: line 82
Extra Usage: Look for "€X.XX spent" + "€XX Monthly spend limit" + "€X.XX Current balance"
- Distinctive: line 173
Always show the percentage value right-aligned after the bar
- Very specific: line 193
If Chrome is not running on port 9222: Tell the user to launch Chrome with --remote-debugging-port=9222
- Distinctive: line 194
If no claude.ai tab found: Tell the user to open claude.ai in that Chrome instance
- Distinctive: line 195
If the page shows a login screen: Tell the user to log in to claude.ai in the Chrome instance
- Distinctive: line 196
If the reset day can't be parsed: Default to Wednesday 17:00 (standard Anthropic reset time)
- Very specific: line 222
If you'd rather run Chrome on another machine (e.g.
- Distinctive: line 237
All calculations assume a 7-day cycle
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Usage Tracker — Claude Credit Pace Dashboard
Track your Claude Code usage credits in real-time. Connects to a running Chrome via CDP, scrapes claude.ai/settings/usage, calculates your daily budget vs ideal pace, and tells you whether to accelerate or slow down.
Prerequisites
- Google Chrome must be running with
--remote-debugging-port=9222and logged intoclaude.ai - User must be logged into claude.ai in that Chrome instance (login once, session persists in the user-data-dir)
By default this skill talks to a local Chrome on localhost:9222. A remote
Chrome over SSH is also supported but optional — see Setup.
How It Works
Step 1 — Extract Data via CDP
Connect to Chrome via CDP on port 9222 and navigate to the usage page. Use this Node.js script via Bash:
node -e "
const http = require('http');
function fetchURL(url) {
return new Promise((resolve, reject) => {
http.get(url, (res) => {
let d = ''; res.on('data', c => d += c); res.on('end', () => resolve(d));
}).on('error', reject);
});
}
let counter = 0;
function cdpSend(ws, method, params = {}) {
const id = ++counter;
return new Promise((resolve) => {
const handler = (ev) => {
const msg = JSON.parse(ev.data || ev);
if (msg.id === id) {
ws.removeEventListener('message', handler);
resolve(msg.result);
}
};
ws.addEventListener('message', handler);
ws.send(JSON.stringify({ id, method, params }));
});
}
async function run() {
const tabs = JSON.parse(await fetchURL('http://localhost:9222/json/list'));
const tab = tabs.find(t => t.url.includes('claude.ai'));
if (!tab) { console.log('ERROR: No claude.ai tab found'); return; }
const ws = new WebSocket(tab.webSocketDebuggerUrl);
await new Promise(r => { ws.onopen = r; });
await cdpSend(ws, 'Page.navigate', { url: 'https://claude.ai/settings/usage' });
await new Promise(r => setTimeout(r, 6000));
const r = await cdpSend(ws, 'Runtime.evaluate', { expression: 'document.body.innerText' });
console.log(r.result.value);
ws.close();
}
run().catch(console.error);
"For a remote Chrome (optional), run the same script over SSH by prefixing it with
ssh <your-remote-host> "export PATH=/opt/homebrew/bin:\$PATH && ..." (adjust the
PATH to wherever node lives on that host).
If the script returns a login page, the user needs to log in to claude.ai in the Chrome instance first.
Step 2 — Parse the Output
The script outputs all text from the page. Parse these values:
- Session usage: Look for "X% used" after "Current session" + "Resets in Y hr Z min"
- Weekly All Models: Look for "X% used" after "All models" + "Resets [Day] [Time]"
- Weekly Sonnet Only: Look for "X% used" after "Sonnet only" + "Resets [Day] [Time]"
- Extra Usage: Look for "€X.XX spent" + "€XX Monthly spend limit" + "€X.XX Current balance"
Step 3 — Calculate Pace
The weekly cycle is 7 days. "Resets Wed 5:00 PM" means the NEXT Wednesday at 17:00.
CRITICAL: The reset day shown on the page is always the NEXT reset, NOT the previous one. Calculate correctly:
today = current date/time
next_reset = the NEXT occurrence of the day/time shown (e.g., next Wednesday 17:00)
- If today is Thursday and reset is "Wed 5:00 PM", next_reset is NEXT Wednesday (6 days away)
- If today is Wednesday 14:00 and reset is "Wed 5:00 PM", next_reset is TODAY at 17:00 (3 hours away)
- If today is Wednesday 18:00 and reset is "Wed 5:00 PM", next_reset is NEXT Wednesday (7 days away)
days_remaining = (next_reset - today) in days (decimal)
days_elapsed = 7 - days_remaining
ideal_daily_rate = 100 / 7 = 14.29% per day
ideal_used_by_now = ideal_daily_rate * days_elapsed
actual_used = scraped percentage
difference = actual_used - ideal_used_by_now
if difference < -5: status = "AHEAD" (saving credits, can accelerate)
if -5 <= diff <= 5: status = "ON TRACK" (balanced usage)
if difference > 5: status = "BEHIND" (over-spending, slow down)
daily_budget_remaining = (100 - actual_used) / days_remainingStep 4 — Display Visual Dashboard
Output a rich visual dashboard using Unicode block characters. This is the critical part — make it visually clear and beautiful.
Dashboard Format:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CLAUDE USAGE DASHBOARD — [Date] [Time]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SESSION
[██████████████░░░░░░░░░░░░░░░░░░░░░░░░░░] 40%
Resets in 1h 02min
WEEKLY — ALL MODELS Resets Wed 17:00
Used [██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 6%
Ideal [████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 20%
▲ 14% under budget
WEEKLY — SONNET ONLY Resets Wed 17:00
Used [█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 1%
Ideal [████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 20%
▲ 19% under budget
EXTRA USAGE
Spent [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%
Budget: €0.00 / €XX.XX Balance: €0.00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PACE ANALYSIS — WEEKLY (ALL MODELS)
────────────────────────────────────────────────────
Days elapsed: 1.4 / 7
Days remaining: 5.6
Actual usage: 6.0%
Ideal usage: 20.0% (14.3%/day x 1.4 days)
Difference: -14.0%
Daily budget left: 16.8%/day (vs ideal 14.3%/day)
┌─────────────────────────────────────────────────┐
│ ✅ AHEAD — You're well under budget! │
│ │
│ You've used only 6% in 1.4 days (4.3%/day). │
│ You can safely use up to 16.8%/day for the │
│ rest of the week. Accelerate freely! │
└─────────────────────────────────────────────────┘
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Progress Bar Rendering Rules:
- Bar width: 40 characters
- Filled character:
█(U+2588) - Empty character:
░(U+2591) - Calculate:
filled = round(percentage / 100 * 40) - Always show the percentage value right-aligned after the bar
- The "Ideal" bar shows where you SHOULD be based on elapsed time
- Difference indicator:
- Under budget:
▲with positive message - Over budget:
▼with warning message - On track:
●with neutral message
- Under budget:
Status Messages:
- AHEAD (diff < -5%): "You're well under budget! Accelerate freely."
- ON TRACK (-5% <= diff <= 5%): "You're on pace. Steady as she goes."
- BEHIND (5% < diff <= 15%): "Slightly over pace. Consider being selective with tasks."
- CRITICAL (diff > 15%): "Significantly over budget! Reserve remaining credits for priority tasks only."
Step 5 — Session Info
Also note the session limit info — if session is >80%, warn that the user might hit a rate limit soon and should expect a cooldown.
Error Handling
- If Chrome is not running on port 9222: Tell the user to launch Chrome with
--remote-debugging-port=9222 - If no claude.ai tab found: Tell the user to open claude.ai in that Chrome instance
- If the page shows a login screen: Tell the user to log in to claude.ai in the Chrome instance
- If the reset day can't be parsed: Default to Wednesday 17:00 (standard Anthropic reset time)
Setup — One-time per machine
Local Chrome (default)
# Kill existing Chrome, relaunch with debugging port
killall "Google Chrome" 2>/dev/null; sleep 2
open -a "Google Chrome" --args --remote-debugging-port=9222
# Then log in to claude.ai in ChromeFor full control over the profile directory (recommended so it doesn't clash with your everyday Chrome profile), launch it explicitly with a dedicated user-data-dir:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 \
--user-data-dir="$HOME/.chrome-cdp-session" \
--no-first-run --no-default-browser-check 'https://claude.ai' &
# Then log in to claude.ai in that Chrome windowRemote Chrome over SSH (optional)
If you'd rather run Chrome on another machine (e.g. an always-on box you reach over
SSH), launch it there and connect via SSH. Replace <your-remote-host> with your
SSH alias/host:
ssh <your-remote-host> 'killall "Google Chrome" 2>/dev/null; sleep 2 && /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir="$HOME/.chrome-cdp-session" --no-first-run --no-default-browser-check "https://claude.ai" &'
# Then log in to claude.ai on that machine (e.g. via screen sharing / VNC)Once logged in, the session persists. Chrome stays running. The skill connects via CDP each time — no new browser, no login needed.
Usage Notes
- This skill is read-only — it only views the usage page, never changes settings
- The weekly reset is typically Wednesday 17:00 (user's local time)
- All calculations assume a 7-day cycle
- Extra usage tracking is informational — the pace analysis focuses on the weekly plan limits
- Can be combined with
/loopfor periodic checks (e.g.,/loop 2h /usage) - Works with a local Chrome (default) or a remote Chrome over SSH (optional)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

