Sorbh

Claude Selfaware — Development skill for Claude Code

Development community

Claude Code skill for automatic usage-limit awareness — checkpoints work and auto-resumes unattended after the 5-hour/weekly limit resets, with Codex delegation.

How to install Claude Selfaware

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Sorbh/claude-selfaware and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Selfaware does

Claude Code skill for automatic usage-limit awareness — checkpoints work and auto-resumes unattended after the 5-hour/weekly limit resets, with Codex delegation.

Alternatives in Development

  • Claude Swap — Switch between multiple Claude Code accounts, with automatic rate-limit rotation, usage dashboard, and paralle 2k ★
  • Claude Auto Resume — A shell script utility that automatically resumes Claude CLI tasks when usage limits are lifted 732 ★
  • Working Memory — This is your working memory 192 ★

README

🧠 selfaware

Lets **Claude Code and Codex check their own usage**: how much of each limit is used, **when it resets**, and whether you're **on pace to run out** first.

![selfaware usage output](assets/screenshot.png)

Install

curl -fsSL https://raw.githubusercontent.com/Sorbh/claude-selfaware/main/install.sh | bash

Installs the skill to `~/.claude/skills/selfaware/` (and `~/.codex/skills/selfaware/` if Codex is installed). If you have no Claude Code status line, it sets one up; otherwise it leaves yours alone. Re-run to update.

Usage

Ask either agent "how much usage do I have left?" or "when does my limit reset?", or run it yourself:

~/.claude/skills/selfaware/scripts/usage.sh            # Claude + Codex
~/.claude/skills/selfaware/scripts/usage.sh claude     # or: codex
~/.claude/skills/selfaware/scripts/usage.sh --json     # for scripts
  • Pace: ⚠ on pace to hit the limit in 38m means your current rate runs out before the reset (shown once 10% of the window has passed).
  • Switch hint: when one tool is at 80%+ and the other under 50%, a → line suggests switching.
  • Extra usage: paid extra usage (Claude) or credits (Codex) are shown when enabled.

Status line

![status line](assets/statusline.png)

59% ↻2h5m ⚠2h1m · 83% ↻2d8h ⚠22h47m

5-hour usage, reset time and pace, then the same for 7-day. `⚠` = on pace to hit that limit in that time, `⛔` = limit reached. To add it to your own status line script:

usage=$(~/.claude/skills/selfaware/scripts/statusline.sh 

How it works

  • Claude: uses the Claude Code login (macOS Keychain, or ~/.claude/.credentials.json on Linux) to call api.anthropic.com/api/oauth/usage.
  • Codex: uses the ChatGPT login in ~/.codex/auth.json to call chatgpt.com/backend-api/wham/usage.
  • Results are cached for 60s (SELFAWARE_TTL); if a call fails, the last result is shown marked stale.

Both e