Skip to main content

Featured work

claude-statusbar

Rich two-line status bar for Claude Code CLI — model, context, tokens, cost, branch, cache.

  • Bash
  • jq
  • Claude Code

The problem

Claude Code is great. Claude Code’s default statusbar is sparse. After my fifth “wait, am I on Sonnet or Opus?” mid-debug, I built one that doesn’t make me wonder.

Architecture

  • Single-file Bash hook invoked from .claude/settings.json.
  • Reads structured state from Claude Code’s hooks API — model, context %, tokens spent, cost so far, current branch, cache hit rate.
  • Caches API metadata between hooks so the render is sub-50 ms even on a Raspberry Pi.
  • Colour-themed in sync with the Claude Code config.

Implementation highlights

  • Two-line layout — top line is mission-critical (model, context %, tokens, cost). Bottom line is contextual (branch, dir, cache stats, time-of-day for staying out of post-midnight commits).
  • Prefix tokens — the leftmost three characters reflect intent: 🟢 for normal, 🟡 for context >70 %, 🔴 for context >90 %.
  • No external services — everything is local, no telemetry, no callbacks.

Results

24★ on GitHub, multiple forks. Adopted by the Anthropic engineering forums and a few internal company setups. Most common feedback: “wait, this should be the default.”

Lessons

  • Tools that show you what’s happening change what you do. After the bar started showing token cost in real time, my bills dropped 30 %.
  • Bash is fine. Twenty lines that work today are worth a hundred polished ones written tomorrow.