Hooks
What claude-token-reducer runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
$ npx -y skills add Madhan230205/token-reducer --agent claude-codeShips with claude-token-reducer. Installing the plugin gets these hooks.
What fires, and when
UserPromptSubmit
Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.
- Runs userprompt_guard.py.
Where it lives
- hooks/userprompt_guard.pyGitHub
Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.
⚡ Cut Claude token usage by 90%+ — free, open-source, local-first context compression for Claude Code. Hybrid RAG (BM25 + ONNX vectors), AST chunking, reranking. No API needed.
Repo: Madhan230205/token-reducer

