Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By aeriondysetiv0.1.0MITIn 1 marketplace
Single-purpose Claude Code plugin that watches per-session context usage and warns the user before quality degrades.
Run automatically on Claude Code events. Claude doesn't decide.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A single-purpose Claude Code plugin that watches per-session context usage and warns the user before quality degrades.
It does one thing: read the live token count out of the transcript, count how many auto-compactions have happened, and emit a tiered notification when either crosses a threshold. Output is rendered with @aeriondyseti/plugin-kit.
| Signal | Note | Warn | Strong | Critical |
|---|---|---|---|---|
| Context size (tokens) | latest main-chain transcript entry | 100k | 150k | 200k |
| Compactions | counted via SessionStart (matcher: compact) | 2 | 4 | 6 |
Token count = input_tokens + cache_read_input_tokens + cache_creation_input_tokens from the most recent main-chain entry, matching ccstatusline's accounting. Sidechain (subagent) entries and API errors are excluded.
One bundled script (hooks/context-monitor.mjs) is wired to three events, branched by argv:
| Event | Matcher | Argv | Behavior |
|---|---|---|---|
Stop | * | --stop | Always evaluates at end of turn. |
PostToolUse | * | --post-tool-use | Throttled to one evaluation per 30 seconds. |
SessionStart | compact | --session-compact | Increments the per-session compression counter. |
Stop will never block — that would create an infinite re-entry loop.
Healthy session: empty JSON output (no notification).
When a threshold trips, a boxed message is shown to the user, e.g.:
┌─ · Session health warning ──────────────────────────────────┐
│ ⚠ Context size is 175,000 tokens (compression approaching) │
└─────────────────────────────────────────────────────────────┘
▸ Finish the current task, commit, and start a new session to preserve quality.
context-monitor/
├── .claude-plugin/plugin.json
├── hooks/
│ ├── hooks.json
│ └── context-monitor.mjs ← vendored single-file bundle (committed)
├── src/context-monitor.ts ← source for the bundle
├── package.json
├── tsconfig.json
└── README.md
hooks/context-monitor.mjs is the artifact end users actually run. It bundles @aeriondyseti/plugin-kit so the plugin works with no npm install step on the install side.
npm install
npm run typecheck
npm run build # rewrites hooks/context-monitor.mjs
The bundle targets Node 20+ ESM. It runs under any Claude Code installation since Node is the host runtime.
Per-session counters live at ${TMPDIR}/context-monitor/<session-id>.json. They're best-effort: a missing or unreadable state file just means the next invocation starts cold.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Indexed from aa4c9d0Marketplace JSON
context-monitor@aeriondyseti-plugins is listed by aeriondyseti/aeriondyseti-plugins — review the source before installing
npx claudepluginhub aeriondyseti/aeriondyseti-plugins --plugin context-monitorPlugins from other owners that cover similar ground