Claude Code status line
Claude Cache Guard
Local-only Claude Code statusLine bridge for usage-aware session handoff.
Install
npm install -g claude-cache-guardFound in the project README. Check it for setup steps after installing.
git clone https://github.com/yuliang615/claude-cache-guard.gitFrom the README
Claude Cache Guard English | 繁體中文 | 简体中文 claude-cache-guard (CLI: ccg) is a local-only usage guard for Claude Code. Before your 5-hour usage window runs out, it has Claude write a compact handoff file (next_session.md) so you pick the work back up in a fresh, small session — no re-reading the old conversation as uncached tokens, no /clear-style loss of detail. Why: Claude Code re-sends the whole conversation every turn, and prompt caching normally absorbs that — but the cache goes cold while you wait out a spent window. Resume a big session then, and the entire conversation is re-read as uncached input tokens, charged in full against your usage, before any real work starts — and the window didn't hold much to begin with. Quick start Step 1 — Install (once per machine) The installer asks one question: Press Enter to accept the default (90), or type a number from 1 to 99 — you can change it per project later. After installing, restart Claude Code — exit and run claude again (or open a new session in the app). That's what loads the /ccg* slash commands, which then work in every project. /clear is not enough: it clears the conversation but does not reload commands. From source instead of npm: Step 2 — Enable for the project In the project's directory, start claude and run: That's it — the handoff workflow is now active for this project. On Claude Code v2.1.169+ it takes effect right away; on older versions, start a new session for it to fully kick in (the command prints a note about this). Prefer the terminal? ccg enable in the project directory does the same thing. What it actually sets up is covered in How it works below. Step 3 — Work as usual When 5-hour usage reaches the threshold, ccg asks Claude to write a compact next_session.md and stops the goal —…
How status lines work
- A status line is a command Claude Code runs to draw the bar under the prompt. It gets the session as JSON on stdin (model, folder, cost, context) and prints one or more lines.
- Point the statusLine setting in ~/.claude/settings.json at it: { "statusLine": { "type": "command", "command": "<the command from the README>" } }.
- Or run /statusline inside Claude Code and describe what you want.
Details
- Repository
- yuliang615/claude-cache-guard
- Type
- Status lines
- Language
- JavaScript
- License
- MIT
- Last updated
- 5 July 2026
FAQ
What is Claude Cache Guard?
Local-only Claude Code statusLine bridge for usage-aware session handoff. It is a status line for Claude Code, from yuliang615/claude-cache-guard on GitHub.
How do I install Claude Cache Guard?
Run npm install -g claude-cache-guard, then follow the setup in the README.
Is Claude Cache Guard popular?
yuliang615/claude-cache-guard has 36 GitHub stars and 0 forks. It was last updated on 5 July 2026.
More status lines
Cconeline
36medhatdawoud/cconeline
Neat statusline for claude code
Barista
27pstuart/Barista
A modular statusline for Claude Code CLI - real-time context usage, rate limits, costs, git status, and 20+ customizable modules
Claude Code Statusline
29Jhonatan-de-Souza/claude-code-statusline
Claude Code Context/Usage bar(claude code terminal)
ClaudeStatsBar
30Field-Logic-Ltd/ClaudeStatsBar
A Claude Code status line showing how big your session has got and what the next turn costs before you type
Claude Statusline
33JungHoonGhae/claude-statusline
A rich statusline for Claude Code — pure bash, no Node.js required
UI Themes
27yugal1107/ui-themes
Switchable UI themes for Claude Code: padded message boxes, themed markdown, matching status line
Browse the most popular Claude Code mods, all status lines, or the skills and MCP server directories.