A PreToolUse hook for Claude Code that auto-approves piped/chained shell commands when every segment is a known read-only command.
Claude Code's permission system is intentionally aware of shell operators (|, &&, ;). A prefix allow rule like Bash(git diff:*) will not match git diff --name-only | grep "\.tsx?$" — the pipe breaks the match. This means you get prompted for approval on common read-only pipelines.