Stats
Actions
Tags
From token-optimizer
On Stop and PreCompact events, captures token usage metrics and caches them for session optimization. Runs compact instructions on PreCompact to reduce context overhead. Clears cache on CwdChanged.
10 events · 24 hooks
Safety signals detected in this hook configuration
Where this hook configuration is defined
Defined in hooks/hooks.json
Event handlers and matchers — expand Raw Configuration for the full JSON
for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py compact-capture --trigger stop --quiet; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py session-end-flush --trigger stop --quiet --defer; done; exit 08msfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py keepwarm-arm --quiet; done; exit 05msfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/read_cache.py --clear --quiet; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py dynamic-compact-instructions --quiet; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py compact-capture --trigger auto --quiet; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/read_cache.py --clear --quiet; done; exit 0Readfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/read_cache.py --quiet; done; exit 0Bashfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/bash_hook.py --quiet; done; exit 0Agent|Taskfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py checkpoint-trigger --milestone pre-fanout --quiet; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py session-end-flush; done; exit 060000msfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py quality-cache --force --quiet; done; exit 0Bash|Read|Glob|Grep|Agent|mcp__.*for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/archive_result.py --quiet; done; exit 0Bash|Read|Grep|Glob|mcp__.*for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/context_intel.py --quiet; done; exit 0Edit|Write|MultiEdit|NotebookEditfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/read_cache.py --invalidate --quiet; done; exit 0Bash|Read|Glob|Grep|Agent|Edit|Write|MultiEdit|NotebookEdit|mcp__.*for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py quality-cache --quiet --throttle-only; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py compact-capture --trigger stop-failure --quiet; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py ensure-health; done; exit 015000msfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py quality-cache --force --quiet; done; exit 0compactfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py compact-restore --compact; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py compact-restore --new-session-only; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py quality-cache --warn --quiet; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py prompt-continuity --quiet; done; exit 0for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 && exec "$b" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/python-launcher.sh" "${CODEBUDDY_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/hooks/run.py" skills/token-optimizer/scripts/measure.py verbosity-steer --quiet; done; exit 07plugins reuse this hooks config
First indexed Apr 13, 2026
Showing the 6 earliest of 7 plugins
npx claudepluginhub studyzy/token-optimizer