usage-monitor

Monitor Claude Code and Codex subscription usage, compare weekly burn against expected pace, and recommend provider routing or workload bias. Use when checking Claude or Codex limits, weekly budget pacing, reset windows, provider headroom, underused ChatGPT/Codex capacity, whether to switch work from Claude to Codex, or whether automations/research/background tasks should favor the less-used provider.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "usage-monitor" with this command: npx skills add valkyriweb/usage-monitor-skill/valkyriweb-usage-monitor-skill-usage-monitor

Usage Monitor

Use the bundled scripts to fetch live Claude Code and Codex rate-limit data, log snapshots, and report whether usage is healthy, ahead of pace, or approaching a cap.

Run the monitor

From the skill directory, run:

scripts/usage-check.sh 2>&1 | sed 's/\x1b\[[0-9;]*m//g'

The script:

  • fetches Claude Code usage from Anthropic OAuth usage API using the locally authenticated Claude Code session
  • fetches Codex usage from Codex app-server account/rateLimits/read using the locally authenticated ChatGPT/Codex session
  • falls back to recent Codex JSONL session snapshots only if the app-server rate-limit RPC fails
  • appends a JSONL snapshot to ~/.claude/usage-log.json

Reporting

When reporting, cover:

  • Claude short-window usage
  • Claude weekly usage
  • Codex short-window usage
  • Codex weekly usage
  • weekly reset times
  • whether weekly usage is ahead of, on, or behind pace
  • whether one provider has enough spare headroom to bias more work there
  • whether short-window pressure is only a temporary operational issue or part of a larger weekly budget problem

For trends, inspect recent entries:

tail -10 ~/.claude/usage-log.json | jq -s '.'

If history is sparse, say so plainly instead of pretending there is a reliable trend.

Interpretation rules

Weekly pacing

Treat the weekly window as the main budget constraint.

Default guidance:

  • ok: within roughly 5% of expected pace
  • warning: around 5–20% ahead of expected pace
  • over: more than 20% ahead of expected pace

Use actual reset timestamps when available instead of assuming neat calendar boundaries.

Short-window usage

Treat short-window / 5-hour pressure as an operational signal, not the primary strategic one.

  • If short-window usage is high but weekly budget is healthy, fallback chains or brief waiting may be enough.
  • If weekly usage is also high, recommend switching more work to the provider with more headroom.

Codex underuse bias

If Codex weekly usage is very low, stale, or clearly underused while Claude is running hot, recommend routing appropriate extra work to Codex:

  • research
  • summaries
  • background analysis
  • low-risk automations
  • recurring monitoring tasks
  • exploratory or one-shot work

Treat this as a bias, not a universal forced switch.

Source of truth and fallback order

  • Claude: Anthropic OAuth usage API
  • Codex primary: Codex app-server RPC
  • Codex fallback: recent local JSONL session snapshots

Do not treat Codex JSONL as the canonical source when app-server data is available.

Failure handling

If one provider cannot be read:

  • report that clearly
  • keep the last-known or fallback data separate from live data
  • do not overstate confidence
  • continue reporting the other provider if it is available

Privacy and security

This skill must not contain embedded credentials, account ids, email addresses, tokens, refresh tokens, or machine-specific secrets.

Allowed behavior:

  • read the user's existing local Claude/Codex login state at runtime
  • call the Anthropic OAuth usage endpoint for the locally authenticated user
  • call the local Codex app-server RPC for the locally authenticated user
  • read local Codex session JSONL only as fallback
  • append usage snapshots to the user's local log file

Do not:

  • print tokens
  • copy auth files into the repo
  • send usage data to third-party services
  • hardcode private absolute user paths into the published skill
  • broaden scope into generic shell/network automation unrelated to usage monitoring

Portability

Keep the skill portable across machines by using $HOME, relative script paths, and runtime discovery instead of hardcoded machine-specific paths.

Notes

  • Prefer the bundled scripts over ad-hoc scraping.
  • Keep output structured and explicit enough that a separate policy layer can consume it later.
  • If the user asks for automatic switching or policy decisions, use this skill as the telemetry layer rather than mixing policy logic into fragile ad-hoc commands.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated
Coding

clawhub-rate-limited-publisher

Queue and publish local skills to ClawHub with a strict 5-per-hour cap using the local clawhub CLI and host scheduler.

Archived SourceRecently Updated