Stats
Actions
Tags
From visual-changelog
Blocks Bash tool calls that attempt to run `git worktree add`, preventing accidental worktree creation. Executes a shell script to inspect and reject matching commands.
1 event · 1 hook
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
Bashbash -c 'INPUT=$(cat); CMD=$(echo "$INPUT" | jq -r ".tool_input.command // \"\""); if ! echo "$CMD" | grep -qE "gh\s+pr\s+create"; then exit 0; fi; PROJECT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "."); ENTRIES_DIR="$PROJECT_ROOT/visual-changelog/entries"; BRANCH=$(git branch --show-current 2>/dev/null); ISSUE=$(echo "$BRANCH" | grep -oE "^[0-9]+" || true); if [ -n "$ISSUE" ]; then PATTERN="${ISSUE}-*.json"; else PATTERN="$(echo "$BRANCH" | sed "s/[^a-zA-Z0-9]/-/g").json"; fi; FOUND=$(find "$ENTRIES_DIR" -maxdepth 1 -name "$PATTERN" 2>/dev/null | head -1); if [ -n "$FOUND" ]; then jq -n --arg ctx "Visual changelog entry exists. Include link in PR body." "{hookSpecificOutput:{hookEventName:\"PreToolUse\",additionalContext:\$ctx}}"; else jq -n --arg r "No visual changelog entry found. Run /visual-changelog:changelog first." "{hookSpecificOutput:{hookEventName:\"PreToolUse\",permissionDecision:\"deny\",permissionDecisionReason:\$r}}"; fi'npx claudepluginhub webifyservices/visual-changelog --plugin visual-changelog