After every Claude response: runs for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash…. Before a tool call (Read): runs for b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash…. And 4 more.
4 events · 6 hooks
Ships in token-optimizer-cowork. Installing the plugin adds it to Claude Code.
Safety signals detected in this hook configuration
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 || continue; D="${CLAUDE_PLUGIN_ROOT}"; [ -r "$D/hooks/python-launcher.sh" ] || D="$(ls -d "${D%[/\\]*}"/*/ 2>/dev/null | grep -E "/[0-9]+[.][0-9]+[.][0-9]+/$" | sort -V | tail -n1)"; D="${D%/}"; [ -r "$D/hooks/python-launcher.sh" ] || exit 0; exec "$b" "$D/hooks/python-launcher.sh" "$D/hooks/run.py" hooks/stop_runner.py; done; exit 015sReadfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 || continue; D="${CLAUDE_PLUGIN_ROOT}"; [ -r "$D/hooks/python-launcher.sh" ] || D="$(ls -d "${D%[/\\]*}"/*/ 2>/dev/null | grep -E "/[0-9]+[.][0-9]+[.][0-9]+/$" | sort -V | tail -n1)"; D="${D%/}"; [ -r "$D/hooks/python-launcher.sh" ] || exit 0; exec "$b" "$D/hooks/python-launcher.sh" "$D/hooks/run.py" skills/token-optimizer/scripts/read_cache.py --quiet; done; exit 010sAgent|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 || continue; D="${CLAUDE_PLUGIN_ROOT}"; [ -r "$D/hooks/python-launcher.sh" ] || D="$(ls -d "${D%[/\\]*}"/*/ 2>/dev/null | grep -E "/[0-9]+[.][0-9]+[.][0-9]+/$" | sort -V | tail -n1)"; D="${D%/}"; [ -r "$D/hooks/python-launcher.sh" ] || exit 0; exec "$b" "$D/hooks/python-launcher.sh" "$D/hooks/run.py" skills/token-optimizer/scripts/measure.py checkpoint-trigger --milestone pre-fanout --quiet; done; exit 020smcp__.*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 || continue; D="${CLAUDE_PLUGIN_ROOT}"; [ -r "$D/hooks/python-launcher.sh" ] || D="$(ls -d "${D%[/\\]*}"/*/ 2>/dev/null | grep -E "/[0-9]+[.][0-9]+[.][0-9]+/$" | sort -V | tail -n1)"; D="${D%/}"; [ -r "$D/hooks/python-launcher.sh" ] || exit 0; exec "$b" "$D/hooks/python-launcher.sh" "$D/hooks/run.py" skills/token-optimizer/scripts/refetch_guard.py --quiet; done; exit 010sBash|PowerShell|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 || continue; D="${CLAUDE_PLUGIN_ROOT}"; [ -r "$D/hooks/python-launcher.sh" ] || D="$(ls -d "${D%[/\\]*}"/*/ 2>/dev/null | grep -E "/[0-9]+[.][0-9]+[.][0-9]+/$" | sort -V | tail -n1)"; D="${D%/}"; [ -r "$D/hooks/python-launcher.sh" ] || exit 0; exec "$b" "$D/hooks/python-launcher.sh" "$D/hooks/run.py" hooks/posttooluse_runner.py; done; exit 010sfor b in bash /bin/bash /usr/bin/bash /usr/local/bin/bash /opt/homebrew/bin/bash; do command -v "$b" >/dev/null 2>&1 || continue; D="${CLAUDE_PLUGIN_ROOT}"; [ -r "$D/hooks/python-launcher.sh" ] || D="$(ls -d "${D%[/\\]*}"/*/ 2>/dev/null | grep -E "/[0-9]+[.][0-9]+[.][0-9]+/$" | sort -V | tail -n1)"; D="${D%/}"; [ -r "$D/hooks/python-launcher.sh" ] || exit 0; exec "$b" "$D/hooks/python-launcher.sh" "$D/hooks/run.py" hooks/userpromptsubmit_runner.py; done; exit 020sWhere this hook configuration is defined
Defined in hooks/hooks.json
npx claudepluginhub alexgreensh/token-optimizer --plugin token-optimizer-cowork33 plugins in 31 repositories ship this exact hooks config · first indexed Jan 15, 2026
Showing 6 of 33 plugins, one per repository first
Other plugins' hooks for the same job