ClaudeCodeMod

All shelves / Mods / Usage

context-alert

By nathanonn

context-alert is a Claude Code usage mod by nathanonn.

Opens a question dialog when the context window reaches 40 percent, offering to write a handoff doc and then compact, write one only, or compact now.

Draws

Install

The marketplace name is nathanonn-agent-skills.

In Claude Code
/plugin marketplace add nathanonn/agent-skills
/plugin install context-alert@nathanonn-agent-skills
Open the repo

It runs inside the Claude Code process. The side panel is only what the author's README names. Read the repo before you install, or run claude plugin validate on the plugin folder.

Version
0.1.1
License
MIT
Repo stars
21
Last change
2026-10-28

What it can reach

  • Draws in the session
  • Reads usage or context figures
  • Sees tool calls

The author calls it version 0.1.1, beta: the core flow is verified live, and some behaviour is not. If the marketplace is already added, run /plugin marketplace update nathanonn-agent-skills first. Choose user scope when asked, then run /reload-plugins; /context-alert prints the status. Do not also start the session with --plugin-dir pointing at a copy, or it loads twice. The dialog never opens in the middle of a turn: an alert that comes due while Claude works waits for the turn to end, with one toast per tier on by default, and a desktop or phone notification goes out when it opens. After Not now, the next alert comes 15 points later. /context-alert set changes the first alert, the step, a token limit instead of a percent, and whether a dialog or a suggestion shows while background agents run. Whether the dialog disturbs background agents is not yet verified. Headless runs (-p) have no dialog and no notification.

The marketplace name is nathanonn-agent-skills. The marketplace also holds wp-credential-guard and other plugins. This one installs on its own and brings its own handoff-doc skill. Watching how full the context window gets is why this page files it under usage. compact-keeper saves a handoff file at each compaction. compact-adviser draws a hint to run /compact when Jev calls the session a finished checkpoint. This one asks you first, at a threshold you set, and runs the handoff chain you pick: the project's handoff-doc skill, then the bundled one, then a plain prompt. It learns the handoff path from /handoff-doc, from the skill's calls, and from writes into a handoff/ folder.

Demo

The opening of the Context Alert README: at 40% of the window by default it opens a question dialog, shown as The context window is now at 40% (80k of 200k tokens). Write a handoff doc before compaction? with five choices: Handoff, then compact; Handoff only; Compact now; Not now; Other.
Screenshot of the author's GitHub page.

What it hooks into

  • session.measureWhen usage is measured
  • turn.startWhen Claude starts a turn
  • turn.completeWhen a turn ends
  • session.compactWhen the context is compacted
  • classic.StopA Claude Code event
  • tool.callAround a tool call, where it can hold oneSkill
  • command.runWhen you run its slash command/handoff-doc/context-alert:handoff-doc/context-alert
  • session.startWhen a session starts

Read from the on() calls in its hook modules. Open its source under Files to check what each one does.

Slash commands 1

  • /context-alertShow or set the context-window handoff alert

Files

The author's README and source, 4 files. They load when you open them.

Facts

Author
nathanonn
Category
Usage
Marketplace
nathanonn-agent-skills
Repo
nathanonn/agent-skills
Folder
plugins/context-alert
Version
0.1.1
License
MIT
Repo stars
21
Last change
2026-10-28
Language
JavaScript
Files
11

Other mods in Usage

stintdigital-stoic-orgDraws a band above the prompt with context fill, plan headroom, and the stint count, and /pit saves notes, clears, and starts the fresh context from them.orca-movemutlumehmetMoves a session to a twin account as one nears its usage limit: it runs /exit once the prompt box is empty, or shows a toast asking you to clear it.model-relaycablateOpens a panel above the prompt to switch this window to another model provider, routes subagents to providers, and fails over when Claude returns a 429.rtk-gainrtk-aiDraws what RTK saves while Claude works: a band above the prompt, the saving in the spinner, and a /rtk-gain pane where a viking breaks the saved tokens.tokendoctorrsaryevShows where your Claude Code tokens went, audits your settings with 33 checks, and changes a setting only after a dialog shows the change and you press Apply.catnapLippIncHas Claude compact at a clean break: from 50% of the context it asks Claude to finish the piece it is on, write a handoff, and compact, then carry on by itself.pitwallaxlaserDraws live cost, cache, and limits above the prompt and in a side panel, with a card per subagent you can stop, and fourteen themes that repaint Claude Code.jev-routerdominicricoAsks TypeSafe's Jev which Claude model and effort fit each prompt, step, and subagent, runs it there, and draws every pick in a band above the prompt.usage-statsomeerdvrnOpens a /usage-stats pane of this machine's Claude Code tokens over 7 days, 30 days, or all time, by day, project, and model, with Linear issues closed.claujev-modCivalskiHolds a commandDraws a status line of the checks and actions TypeSafe's Jev made today for the ClauJev plugin, with the effort Jev suggests, and can apply that effort.jev-orchestratorhiyokuSends each subagent's task to TypeSafe's Jev, which picks its model, effort, and tool profile, and draws the picks, tokens, and cost on the status line.vitalsnaicudDraws a framed live dashboard above the prompt: model, effort, context, plan limits with a forecast, cost, tokens and cache, subagents, shells, and tools.
All 183 in Usage