context-guard
v0.14.0Per-session context-window observability. A mod writes each session's context-window figures to a snapshot file and tells Claude its context zone (smart, acceptable or dumb, from bands in zones.json) at each crossing, approach and compaction; the person gets a toast and a transcript line. /context-guard prints status and toggles an optional band row. It answers a status tool. Optional blocking mode gates new mutating work in a blocked zone, except handoffs. A PostCompact hook leaves a marker.
By Melodic SoftwareLicense: MIT21 GitHub starsUpdated 2 months ago
Directory evidence
- Runtimes
- Claude Code
- Parsed components
- 2 skill or MCP entries
- Source updated
- Oct 4, 2026
- Manifest status
- Canonical path parsed
The directory validates manifest shape and source location. It does not execute the plugin or provide a security endorsement. Review the indexing methodology →
Install context-guard for Claude Code
claude plugin marketplace add IchenDEV/agent-plugin-mkt
claude plugin marketplace update agent-plugin-marketplace
claude plugin install context-guard-3@agent-plugin-marketplacePaste and run these commands in a terminal with Claude Code. They add and refresh the PluginsMP catalog, then install this plugin.
The installer fetches third-party code from the source repository shown on this page. This directory validates manifest structure and source location, but does not perform a security audit; review the manifest, components, and source before installing.
Get the source manually
git clone https://github.com/melodic-software/claude-code-pluginsClone the source repository, then follow its setup instructions to add the plugin to a compatible client. The plugin root is plugins/context-guard/.
Plugin files
├── .claude-plugin/plugin.json├── skills/check/SKILL.md└── skills/setup/SKILL.md
Included Skills2
Read-only check that node (the PostCompact marker hook and the mod's snapshot writes) and jq (the setup check's zone resolver and zones.json merge) resolve for context-guard, and whether its mod can load (mods off, or Claude Code older than the 2.1.287 floor). Use when a hook notice says node is missing, or before assuming the context-guard mod or marker hook ran. Does not install.
Verify the context-guard plugin on this machine: jq, node, whether its mod runs in this session, this session's snapshot freshness, zones.json, and every option's effective value. Seed or repair ~/.claude/context-guard/zones.json from the shipped defaults. Use when: 'set up context-guard', 'is context-guard working', a consumer reports zone unknown in a live session, or after a plugin update. Actions: check (read-only; never edits settings), apply (writes ONLY ~/.claude/context-guard/zones.json, on explicit request).
Plugin manifests1
{
"name": "context-guard",
"version": "0.14.0",
"description": "Per-session context-window observability. A mod writes each session's context-window figures to a snapshot file and tells Claude its context zone (smart, acceptable or dumb, from bands in zones.json) at each crossing, approach and compaction; the person gets a toast and a transcript line. /context-guard prints status and toggles an optional band row. It answers a status tool. Optional blocking mode gates new mutating work in a blocked zone, except handoffs. A PostCompact hook leaves a marker.",
"author": {
"name": "Melodic Software",
"email": "[email protected]"
},
"license": "MIT",
"keywords": [
"context-window",
"mod",
"zones",
"context-degradation",
"session",
"hooks"
],
"userConfig": {
"context_guard_hooks_enabled": {
"type": "boolean",
"title": "Zone lines, gate and compaction marker",
"description": "Runs the module's zone lines and blocking gate and the PostCompact marker hook. On by default; off, none of them acts. Snapshot writes continue either way.",
"default": true
},
"zone_lines_enabled": {
"type": "boolean",
"title": "Zone lines to Claude",
"description": "Sends Claude one line when the session crosses into a worse context zone, approaches a boundary, or passes a zones.json threshold, and restates the zone after a compaction, a resume or a reload. On by default.",
"default": true
},
"zone_report_mode": {
"type": "string",
"title": "Zone report mode",
"description": "automatic (default) sends the lines to Claude; operator holds them in a turn a person typed and offers the person a ready-made prompt and a notice row when the turn ends. Headless, loop and schedule turns get automatic lines either way.",
"default": "automatic",
"options": [
"automatic",
"operator"
]
},
"zone_line_data": {
"type": "string",
"title": "Zone line data",
"description": "Comma list of what a line carries beside its zone, which every line has: percent, tokens and window. Default zone.",
"default": "zone"
},
"zone_hook_mode": {
"type": "string",
"title": "Zone gate mode",
"description": "advisory (default) sends lines only; blocking also denies new Write, Edit, NotebookEdit, Agent and Workflow calls in the dumb zone past the grace budget, unless zones.json sets an action for the dumb zone. Handoff-path writes, reads, Bash and Skill stay allowed, and an unknown zone fails open.",
"default": "advisory",
"options": [
"advisory",
"blocking"
]
},
"zone_gate_grace_calls": {
"type": "number",
"title": "Blocking-gate grace budget (calls)",
"description": "Blocking only: matched tool calls allowed after the session first reaches a blocked zone, before the gate denies. Default 20; 0 denies the first matched call; a value that is not a whole number from 0 to 999999999 reads as 20.",
"default": 20
},
"zone_block_unattended": {
"type": "string",
"title": "Blocking in unattended turns",
"description": "post-compaction (default): in turns no person typed (headless, loop, schedule and notification turns) only a compacted session is blocked; same-as-typed blocks them as typed turns are.",
"default": "post-compaction",
"options": [
"post-compaction",
"same-as-typed"
]
},
"context_guard_band": {
"type": "boolean",
"title": "Context band row",
"description": "Draws the context figure and zone in a row above the prompt. Off by default. Turn it on in /config, or for one session with /context-guard band on.",
"default": false
},
"context_guard_toast": {
"type": "boolean",
"title": "Zone-change toast",
"description": "Shows a short toast when the session crosses into a worse context zone, beside the transcript line that records it. On by default; off, only the transcript line remains.",
"default": true
}
}
}For maintainers
If you maintain this plugin, link to this source-backed listing from your README so users can review its manifest and indexed components.
[context-guard on Agent Plugins Marketplace](https://pluginsmp.com/plugins/context-guard-3)