ctx-guard
by Sviatoslav Sviridov · ★ 1 · updated 12 days ago
0
Configurable context and usage guard: per-role notes, tool blocks, guarded handoff with clear-and-resume or compact, and subagent context budgets.
Install
/plugin marketplace add svd/agent-skills/plugin install ctx-guard@svd-agent-skillsThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
session.startsession.measureturn.startprompt.submitturn.stepturn.completeclassic.Stopsession.endsession.compactagent.spawncommand.runtool.callui.render- API calls
$.agent.list$.clock.after$.clock.every$.clock.now$.command.list$.command.register$.command.run$.env.get$.fs.exists$.fs.list$.fs.read$.fs.stat$.fs.write$.model.fork$.process.run$.prompt.submit$.session.append$.session.cwd$.session.id$.session.root$.session.surfaces$.session.usage$.session.version$.settings.read$.state.get$.state.set$.store.delete$.store.get$.store.set$.ui.invalidate$.ui.log$.ui.notify$.ui.resolve$.ui.status$.ui.toast- Draws
AbovePrompt- Can see
every promptclassic hookscompactionsubagent spawnsevery tool call- Reach
- level 2 of 3 runs processeswrites filesdrives Claudereads filesreads env varsreads settingsreads mod statepersists statedraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/svd/agent-skills
- Path in repo
plugins/ctx-guard- Source commit
cb47e43the exact code the scan read- Author
- Sviatoslav Sviridov @svd
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.