cc-context-monitor
Configure or troubleshoot the Claude Code terminal statusline and its usage display.
Skill by neurot1cal
Chalk Labs
Need help deploying cc-context-monitor?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/neurot1cal-cc-context-monitor
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cc-context-monitor
Tools it pre-approves 4
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
Bash,Read,Write,Edit
What's inside
- Skill name
cc-context-monitor- Description
- Configure or troubleshoot the Claude Code terminal statusline and its usage display. Does not handle Codex account usage.
- License
- MIT
- Allowed tools
- Bash,, Read,, Write,, Edit
- Instructions
- 191 lines in SKILL.md · view on GitHub
Before installing
- Pre-approves some shell commands
Files (1)
- SKILL.md
SKILL.md (first lines)
# cc-context-monitor
## Overview
Configure an info-dense Claude Code statusline that reads directly from the JSON blob Claude Code pipes to the statusline hook on stdin. No external tools required on recent CC builds (v2.1.x+): the blob already carries context-window fill, five-hour and seven-day rate-limit percentages, model label, cwd, and output style.
The rendered line looks like:
```
~/git/bdigital-public | feat/branch* | Opus 4.7 (1M context) | ●●○○○○○○○○ 18% ctx | ●●○○○○○○○○ 20% 5h | ●●●●●○○○○○ 54% 7d
```
Three 10-dot bars share one color-band palette — green, yellow, red — so pressure anywhere (context window, session block, weekly quota) jumps out visually.
Color bands on every bar and percent:
- **green** for 0–49%
- **yellow** for 50–74%
- **red** for 75%+
The branch name is followed by a `*` when the working tree is dirty.
Any trailing annotation composed via the environment variable `CC_STATUSLINE_ANNOTATION` (for example "Remote control active") is preserved, appended after the three bars so existing setups compose cleanly.
The wrapper falls back to `ccusage statusline` for the context percent only when running on older Claude Code versions that do not expose `context_window.used_percentage` in the stdin payload. On those hosts the 5h / 7d bars are simply omitted.
## When to Use
- User asks to install, configure, or troubleshoot the Claude Code statusline or its usage display
- User reports the current statusline is missing context-percent, session, or weekly quota info
- User asks about context-window usage in the Claude Code statusline
- User wants Claude Code's rolling 5-hour or 7-day subscription quota surfaced in that statusline
- User asks to uninstall the statusline or revert to the default
**Short-circuit:** If the user only asks a purely informational question ("what's in the statusline stdin?"), answer inline without writing to `~/.claude/settings.json`. The configuration step only runs when the user explicitly asks to install, configure, or update.
## Procedure
### Step 1: Detect Current State
Read the user's existing Claude Code settings to decide which branch to run:
```bash
SETTINGS="$HOME/.claude/settings.json"
if [ -f "$SETTINGS" ]; then
jq '.statusLine // null' "$SETTINGS"
fi
```
Check whether this plugin's own statusline script is already wired up — look for `cc-context-monitor/statusline.sh` in the `.statusLine.command` field.
Check Claude Code version — on a v2.1.x+ host, `jq -r '.version'` against a captured stdin dump should return `2.1.*` or newer.
### Step 2: Back Up settings.json
Before touching `~/.claude/settings.json`, always create a timestamped backup. Use dashes in the timestamp because colons break filenames on some filesystems:
```bash
TS=$(date +%Y-%m-%dT%H-%M-%S)
cp "$HOME/.claude/settings.json" "$HOME/.claude/settings.json.backup-$TS"
```
Create `~/.claude/settings.json` with `{}` first if it does not exist. Never write anywhere outside `~/.claude/`.
### Step 3: Wire Up statusLine.command
Resolve the absolute path to the plugin's `statusline.sh`. On a standard install that is:
```
~/.claude/plugins/marketplaces/bdigital-public/plugins/cc-context-monitor/statusline.sh
```
Use `jq` to merge the statusline config into `settings.json` without overwriting unrelated fields. Write to a temp file and atomically replace:
```bash
SCRIPT="$HOME/.claude/plugins/marketplaces/bdigital-public/plugins/cc-context-monitor/statusline.sh"
TMP=$(mktemp)
jq --arg cmd "bash $SCRIPT" \
'.statusLine = { "type": "command", "command": $cmd, "padding": 0 }' \
"$HOME/.claude/settings.json" >"$TMP"
mv "$TMP" "$HOME/.claude/settings.json"
```
**Sanity check:** Re-read `settings.json` and confirm the expected `.statusLine.command` field is present. If the write failed, restore from the `.backup-$TS` copy.
### Step 4: Verify the Render
Capture a real CC stdin payload to confirm the bars render as expected:
```bash
echo '{"cwd":"'"$PWD"'","model":{"id":"claude-opus-4-7[1m]","display_name":"Opus 4.7 (1M context)"},"context_window":{"used_percentage":18,"remaining_percentage":82},"rate_limits":{"five_hour":{"used_percentage":20},"seven_day":{"used_percentage":54}}}' \
| bash "$SCRIPT"
```
Expect three dot bars, color-banded by percent, and a dirty-flag asterisk if the cwd has uncommitted changes.
### Step 5: Tuning (Optional)
The wrapper honors these environment variables:
- `CC_CTX_GREEN_MAX` (default 49) — upper bound of the green band
- `CC_CTX_YELLOW_MAX` (default 74) — upper bound of the yellow band
- `CC_CTX_BAR_WIDTH` (default 10) — dots per bar
- `CC_STATUSLINE_ANNOTATION` — trailing dim-colored annotation
Set any of these in the `statusLine.command` via `env KEY=value bash $SCRIPT` if the user wants thresholds that differ from the defaults.
### Step 6: Confirm and Hand Off
Tell the user:
1. Which file was backed up, and the exact backup path
2. Which line was written to `settings.json`
3. That a fresh Claude Code session will now show the three-bar statusline
4. How to revert: `cp ~/.claude/settings.json.backup-<timestamp> ~/.claude/settings.json`
## Troubleshooting
When the statusline is blank, missing, or wrong, run this ladder. First match wins. For OS- and terminal-specific cases, see [`TROUBLESHOOTING.md`](../../TROUBLESHOOTING.md).From neurot1cal/bdigital-public, MIT.
Signals
- Stars
- 1
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Sep 12, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/neurot1cal/bdigital-public
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get cc-context-monitor running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
cc-context-monitor skill. Agent Mart. https://agentmart.dev/skills/neurot1cal-cc-context-monitor (last updated 2026-10-24)