claudemods

All Claude Code modsmelodic-software/claude-code-plugins

context-guard

A Claude Code mod in melodic-software/claude-code-plugins

Per-session context-window observability. A mod writes each session's context-window figures to a snapshot file and shows the person a toast and a transcript line when the context zone (smart, acceptable or dumb, from bands in zones.json) worsens; with model_notices on (off by default) it also tells Claude the zone at each crossing, approach and compaction. /context-guard prints status and toggles an optional band row. It answers a status tool. A PostCompact hook leaves a marker.

context-guard reaches L2 (writes or runs) by its classified calls and passed claude plugin validate on Claude Code 2.1.302.

Install hint

/plugin install context-guard --marketplace melodic-software/claude-code-plugins

From the repository's own marketplace. Confirm the plugin name in the repository's README before installing. Mods need Claude Code 2.1.287 or later.

Access

L2 Writes or runsother: $.prompt.read, other: $.tool.list, runs processes, drives Claude, writes the prompt box, reads files, reads env vars, draws

Validation

Passed on Claude Code 2.1.302

View the source on GitHub Back to the list

What the scan recorded

Observed events
compaction, every prompt, every tool call
Hooks
session.start, session.end, session.compact, prompt.submit, session.measure, turn.start, turn.complete, command.run {command=context-guard}, ui.render {component=AbovePrompt}, tool.call
API calls
$.clock.every, $.clock.now, $.command.register, $.env.get, $.fs.exists, $.fs.read, $.fs.stat, $.process.run, $.prompt.read, $.prompt.suggest, $.session.id, $.session.root, $.session.surfaces, $.session.turns, $.session.usage, $.session.version, $.tool.list, $.tool.register, $.ui.invalidate, $.ui.log, $.ui.resolve, $.ui.toast
Validation on 2.1.302
Passed
Scanned revision
704bc4196da1
Marketplace passed
melodic-software

These are the hooks and API calls reported by claude plugin validate. Access levels describe the widest reach of those calls and are not safety ratings. Validation is a static check, not a runtime test, and a passing result does not prove that a mod works or is safe. How the scan works.

More from melodic-software/claude-code-plugins

Badge for your README

Reach badge for context-guard Validation badge for context-guard

Authors can show the latest scan result in their README. Each badge links to this page.

[![reach](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/melodic-software--claude-code-plugins--context-guard-reach.svg)](https://mods.aidojo.si/mods/melodic-software--claude-code-plugins--context-guard/)
[![validates](https://raw.githubusercontent.com/karanb192/awesome-claude-code-mods/main/badges/melodic-software--claude-code-plugins--context-guard-validates.svg)](https://mods.aidojo.si/mods/melodic-software--claude-code-plugins--context-guard/)