azaidi94

claude-code-usage

IT Ops & Securityv1.1.0
By azaidi94Updated 2026-09-103 versions · latest released 2026-01-19@clawhub_azaidi94/claude-code-usage
Monitoring & Alerts

According to AlphaMoat, as of 2026-10, claude-code-usage has 9,054 downloads and 16 stars — ranked by downloads #3,056 among 10,914 AI skills in this ranking, and #92 of 502 in IT Ops & Security.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
9.1K
Stars
16
Overall download rank
#3,056
Top 29% overall · Top 19% in IT Ops & Security
PlatformDownloadsStarsComments
ClawHub ↗7.3K16-
SkillHub ↗9.1K16—

Platforms count differently and update at different times.

What this skill does

It reads both the session window and the weekly window of rate limits and says how much is left. Results are cached briefly by default to avoid hammering the API, and the cache location and lifetime can be changed through environment variables. The local Claude Code CLI must already be authenticated through OAuth. Usage is read using local Claude Code OAuth credentials, through macOS Keychain or Linux secret-tool; Linux also requires libsecret tools. Results can be cached, so check the refresh setting before treating a value as current.

Profile published 2026-10-27

What you can do with it

  • See how much of this week's quota remains
  • Check whether the current session is close to its limit

When to use it

  • Remaining headroom should be confirmed before a long task
  • A sudden rate limit prompts a quota check

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

How much do I have left in this session
What share of this week's quota is used

Monthly Trend

Downloads9.1K
5.0K7.2K9.4K2026-03 · Downloads 5.3K2026-05 · Downloads 5.9K2026-06 · Downloads 6.2K2026-07 · Downloads 6.5K2026-08 · Downloads 6.7K2026-09 · Downloads 7.1K2026-10 · Downloads 9.1K26-0326-0926-10
Stars16
1516172026-03 · Stars 162026-05 · Stars 162026-06 · Stars 162026-07 · Stars 162026-08 · Stars 162026-09 · Stars 162026-10 · Stars 1626-0326-0926-10

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-109.1K—16
2026-097.1K—16
2026-086.7K+3.2%16
2026-076.5K+6.0%16
2026-066.2K+3.7%16
2026-055.9K—16
2026-035.3K—16

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

4.6 KB · ClawHub v1.1.0
---
name: claude-code-usage
description: Check Claude Code OAuth usage limits (session & weekly quotas). Use when user asks about Claude Code usage, remaining limits, rate limits, or how much Claude usage they have left. Includes automated monitoring to notify when quotas reset.
metadata:
  clawdbot:
    emoji: "📊"
    os:
      - darwin
      - linux
    requires:
Show all (211 lines)
      bins:
        - curl
---

# Claude Code Usage

Check your Claude Code OAuth API usage limits for both session (5-hour) and weekly (7-day) windows.

## Quick Start

```bash
cd {baseDir}
./scripts/claude-usage.sh
```

## Usage

```bash
# Default: show cached usage (if fresh)
./scripts/claude-usage.sh

# Force refresh from API
./scripts/claude-usage.sh --fresh

# JSON output
./scripts/claude-usage.sh --json

# Custom cache TTL
./scripts/claude-usage.sh --cache-ttl 300
```

## Output

**Text format** (default):
```
🦞 Claude Code Usage

⏱️  Session (5h): 🟢 ████░░░░░░ 40%
   Resets in: 2h 15m

📅 Weekly (7d): 🟡 ██████░░░░ 60%
   Resets in: 3d 8h
```

**JSON format** (`--json`):
```json
{
  "session": {
    "utilization": 40,
    "resets_in": "2h 15m",
    "resets_at": "2026-01-19T22:15:00Z"
  },
  "weekly": {
    "utilization": 60,
    "resets_in": "3d 8h",
    "resets_at": "2026-01-22T04:00:00Z"
  },
  "cached_at": "2026-01-19T20:00:00Z"
}
```

## Features

- 📊 **Session limit** (5-hour window) - Short-term rate limit
- 📅 **Weekly limit** (7-day window) - Long-term rate limit
- ⚡ **Smart caching** - 60-second cache to avoid API spam
- 🎨 **Beautiful output** - Progress bars, emojis, color-coded status
- 🔄 **Force refresh** - `--fresh` flag to bypass cache
- 📤 **JSON output** - Machine-readable format
- 🔔 **Automated monitoring** - Get notified when quotas reset

## Status Indicators

- 🟢 **Green** - 0-50% usage (healthy)
- 🟡 **Yellow** - 51-80% usage (moderate)
- 🔴 **Red** - 81-100% usage (high/critical)

## Requirements

- **macOS**: Uses Keychain to access Claude Code credentials
- **Linux**: Uses `secret-tool` for credential storage
- **Credentials**: Must have Claude Code CLI authenticated

## How It Works

1. Retrieves OAuth token from system keychain
2. Queries `api.anthropic.com/api/oauth/usage` with OAuth bearer token
3. Parses `five_hour` and `seven_day` utilization metrics
4. Calculates time remaining until reset
5. Formats output with progress bars and status indicators
6. Caches result for 60 seconds (configurable)

## Cache

Default cache: `/tmp/claude-usage-cache` (60s TTL)

Override:
```bash
CACHE_FILE=/tmp/my-cache CACHE_TTL=300 ./scripts/claude-usage.sh
```

## Examples

**Check usage before starting work:**
```bash
./scripts/claude-usage.sh --fresh
```

**Integrate with statusline:**
```bash
usage=$(./scripts/claude-usage.sh | grep "Session" | awk '{print $NF}')
echo "Session: $usage"
```

**Get JSON for monitoring:**
```bash
./scripts/claude-usage.sh --json | jq '.session.utilization'
```

## Automated Monitoring (New in v1.1.0)

Get automatic notifications when your Claude Code quotas reset!

### Quick Setup

Test the monitor once:
```bash
./scripts/monitor-usage.sh
```

Setup automated monitoring (runs every 30 minutes):
```bash
./scripts/setup-monitoring.sh
```

Or add via Clawdbot directly:
```bash
# Check every 30 minutes
clawdbot cron add --schedule "*/30 * * * *" \
  --command "/Users/ali/clawd/skills/claude-code-usage/scripts/monitor-usage.sh" \
  --label "Claude Code Usage Monitor"
```

### What You'll Get

When your quotas reset, you'll receive notifications like:

```
🎉 Claude Code Session Reset!

⏱️  Your 5-hour quota has reset
📊 Usage: 2%
⏰ Next reset: 4h 58m

Fresh usage available! 🦞
```

### How It Works

1. **Monitors usage** every 30 minutes (configurable)
2. **Detects resets** when usage drops significantly (>10% or <5%)
3. **Sends notifications** via Telegram when resets occur
4. **Tracks state** in `/tmp/claude-usage-state.json`

### Customization

Change check interval:
```bash
# Every 15 minutes
clawdbot cron add --schedule "*/15 * * * *" ...

# Every hour
clawdbot cron add --schedule "0 * * * *" ...
```

Custom state file location:
```bash
STATE_FILE=/path/to/state.json ./scripts/monitor-usage.sh
```

## Troubleshooting

**No credentials found:**
- Ensure Claude Code CLI is installed and authenticated
- Run `claude` once to trigger OAuth flow

**API request failed:**
- Check internet connection
- Verify OAuth token hasn't expired
- Try `--fresh` to force new request

**Linux users:**
Install `libsecret` for credential storage:
```bash
# Debian/Ubuntu
sudo apt install libsecret-tools

# Fedora/RHEL
sudo dnf install libsecret
```

Popular in IT Ops & Security

钟馗.skillIT Ops & Security

钟馗.Skill——会更新漏洞库的安全审查专家。直来直去、快刀斩乱麻,三层审查(静态审计/行为模拟/供应链溯源)覆盖12类风险,输出结构化安全裁定(✅干净/⚠️可疑/🚫恶意)。Use when 用户说"审查这个Skill"、"安全检查"、"钟馗看下"、"审一下"、"查一下这个skill"、安装Skill前的安全评估、或需要审计SKILL.md的恶意载荷。

↓ 336.9K★ 17user_741dc82b
SkillScanIT Ops & Security

Scans skill packages for risk before use and gates installation on the verdict.

↓ 183.2K★ 41tokauthai
Free Ride - Unlimited free AIIT Ops & Security

A tool that configures free OpenRouter models and a fallback chain for OpenClaw.

↓ 134.1K★ 492Shaishav Pidadi
a ca s ca s c ca s cIT Ops & Security

Parse, search, and analyze application logs across formats. Use when debugging from log files, setting up structured logging, analyzing error patterns, correlating events across services, parsing stack traces, or monitoring log output in real time.

↓ 124.9K★ -user_60e896a0
Skill ScannerIT Ops & Security

Security checks for installing skills, packages, or plugins. Use BEFORE any npm install, openclaw plugins install, clawhub install, or similar install...

↓ 93.2K★ 4sudhindrat
网安技能IT Ops & Security

网络安全与SRC漏洞掘金实战技能。融合「系统学习路径」与「SRC实战掘金」双模式: ①学习模式=法律→基础→工具→靶场→攻防→就业全流程; ②实战模式=直接指导在腾讯TSRC、阿里ASRC、百度BSRC等平台挖掘高价值漏洞变现。 当用户提出以下问题时触发: "我想学网络安全怎么入门""SRC漏洞怎么挖能赚钱""渗透测试需要学什么" "Web安全漏洞原理是什么""怎么准备CTF比赛""护网面试会问什么" "云安全怎么学""挖漏洞赚钱的方法""端口扫描脚本怎么写" "SQL注入怎么检测""子域名怎么枚举""XSS漏洞怎么找" "靶场怎么搭建""Kali Linux怎么用""Metasploit怎么入门" "等保测评是什么""代码审计怎么做""内网渗透怎么学" "信息泄露漏洞怎么挖""越权漏洞怎么测试""逻辑漏洞挖掘技巧" "简历怎么写才能进安全公司""安全行业面试题有哪些" "Burp Suite怎么用""DVWA怎么安装""Pikachu靶场搭建" "Vulhub漏洞复现""网络安全法有什么规定""CTF夺旗赛怎么参加" "AWD比赛是什么""应急响应怎么做""攻击溯源怎么搞" "数据安全怎么保障""公有云安全怎么防护""私有云攻防怎么做" "云原生安全是什么"。

↓ 80.5K★ 16user_d2cc4baf
人人都能成为黑客v2.0(Lvan)IT Ops & Security

Unified Web penetration testing and SRC vulnerability hunting Skill. Model-driven threat modeling (12 dimensions), JSON 字段规范 state persistence, SRC/补天 compliant reporting with confirmed gate (3-layer determination). Use when user asks for authorized penetration testing, vulnerability assessment, SRC hunting (补天/Butian/vendor SRC/CNVD/众测), bug bounty, security evaluation with explicit target URL, or wants operational Recon→PoC→Report workflow. Do NOT use for CTF challenges, unauthorized testing, mobile app testing, infrastructure scanning, or social engineering.

↓ 56.8K★ 37user_a730098d
skill-vetterIT Ops & Security

Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.

↓ 54.0K★ -user_814dbe54

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.