تخطَّ إلى المحتوى
TakoAPI
العودة إلى المهارات

token-usage-optimizer

بواسطة rusel95

DevOps & Cloud
560التنزيلات وفق ما يذكره clawskills.sh
0المشاهدات
لا إعجاباتسجّل الدخول للإعجاب بهذه المهارة
—لم يُقيَّم بعد
تقييمك

موجز

Maximize your Claude Code subscription value with smart usage monitoring and burn rate optimization.

الوصف

ما الذي تفعله هذه المهارة

Tracks Claude Code subscription usage across 5-hour session and 7-day weekly quotas. Calculates burn rate to show whether you're under-using, on pace, or at risk of hitting limits before reset. Sends one-time alerts at configurable thresholds and generates daily plain-text reports.

Claude Code's interface doesn't expose burn rate or weekly quota progress, so this fills that gap with plain shell scripts and no external dependencies beyond curl.

متى تستخدمها

  • Checking session quota remaining before starting a long coding task
  • Getting an evening summary of weekly Claude Code consumption
  • Deciding whether to use Claude more aggressively or slow down today
  • Monitoring burn rate across a Max 100 or Max 200 subscription
  • Setting up an automated alert when session usage crosses 50%

مثال على سير العمل

الإدخال

User asks: how much of my Claude Code quota have I used this week?

الوكيل
  1. 1

    Runs check-usage.sh, which checks the local 10-minute cache before making an API call

  2. 2

    Fetches utilization data from the Anthropic OAuth API if cache is stale

  3. 3

    Calculates burn rate by comparing weekly utilization against the expected daily budget for the detected plan

  4. 4

    Outputs SESSION and WEEKLY percentages alongside a BURN_RATE status

الإخراج

SESSION=22.0, WEEKLY=49.0, BURN_RATE=OK — user is on pace for their subscription plan

المتطلبات

  • Claude Code subscription (Pro, Max 100, or Max 200)
  • Claude Code OAuth access token (sk-ant-oat01-...)
  • Claude Code OAuth refresh token (sk-ant-ort01-...)

التثبيت

clawhub install rusel95/token-usage-optimizer

شغّل أمر واجهة سطر الأوامر، أو الصق النص في Claude Code أو Cursor أو Codex أو أي وكيل برمجة تستخدمه.

الروابط