From harness
After every Claude response: runs cd "$CLAUDE_PROJECT_DIR" && in=$(cat) && { for x in target/release/xtask target/…. Before a tool call (Edit|Write): runs cd "$CLAUDE_PROJECT_DIR" && in=$(cat) && { for x in target/release/xtask target/…. And 5 more.
6 events · 7 hooks
Ships in harness. 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
cd "$CLAUDE_PROJECT_DIR" && in=$(cat) && { for x in target/release/xtask target/debug/xtask; do [ -x "$x" ] && printf '%s' "$in" | "$x" done --hook 2>/dev/null && exit 0; done; printf '%s' "$in" | cargo run -q -p xtask -- done --hook || case $in in *'"stop_hook_active":true'*) ;; *) echo '{"decision":"block","reason":"xtask done did not run: cargo run -q -p xtask -- done --hook failed; fix the build of xtask"}';; esac; }120sEdit|Writecd "$CLAUDE_PROJECT_DIR" && in=$(cat) && { for x in target/release/xtask target/debug/xtask; do [ -x "$x" ] && printf '%s' "$in" | "$x" permit 2>/dev/null && exit 0; done; printf '%s' "$in" | cargo run -q -p xtask -- permit || printf '%s' '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"deny","permissionDecisionReason":"xtask permit did not judge this call: every candidate refused or failed to run. An Edit or a Write no judge saw does not proceed; a Bash call still does, so the harness can be repaired. Rebuild it: cargo build -p xtask."}}'; }60sBash|Monitorcd "$CLAUDE_PROJECT_DIR" && in=$(cat) && { for x in target/release/xtask target/debug/xtask; do [ -x "$x" ] && printf '%s' "$in" | "$x" permit 2>/dev/null && exit 0; done; printf '%s' "$in" | cargo run -q -p xtask -- permit; }60sBashcd "$CLAUDE_PROJECT_DIR" && in=$(cat) && { for x in target/release/xtask target/debug/xtask; do [ -x "$x" ] && printf '%s' "$in" | "$x" permit --after 2>/dev/null && exit 0; done; printf '%s' "$in" | cargo run -q -p xtask -- permit --after; }60sstartup|resume|clear|compactcd "$CLAUDE_PROJECT_DIR" && [ -n "$(git config core.hooksPath)" ] || git config core.hooksPath scripts/hooks; X='cargo run -q -p xtask --'; $X status --session >/dev/null; computed run .claude/harness.local.md >/dev/null 2>&1; case $? in 0|1) ;; 2) echo 'harness: a marker in .claude/harness.local.md is broken; see `computed check .claude/harness.local.md`';; *) echo 'harness: computed did not run; the local facts are stale (cargo install computed)';; esac60scd "$CLAUDE_PROJECT_DIR" && in=$(cat) && { for x in target/release/xtask target/debug/xtask; do [ -x "$x" ] && printf '%s' "$in" | "$x" done --hook 2>/dev/null && exit 0; done; printf '%s' "$in" | cargo run -q -p xtask -- done --hook || case $in in *'"stop_hook_active":true'*) ;; *) echo '{"decision":"block","reason":"xtask done did not run: cargo run -q -p xtask -- done --hook failed; fix the build of xtask"}';; esac; }120sBashcd "$CLAUDE_PROJECT_DIR" && in=$(cat) && { for x in target/release/xtask target/debug/xtask; do [ -x "$x" ] && printf '%s' "$in" | "$x" permit --after 2>/dev/null && exit 0; done; printf '%s' "$in" | cargo run -q -p xtask -- permit --after; }60sWhere this hook configuration is defined
Defined in hooks/hooks.json
6 plugins ship this exact hooks config · first indexed Aug 3, 2026
npx claudepluginhub lelaphp/lela --plugin harnessOther plugins' hooks for the same job