#!/bin/bash # Read tool input from stdin (JSON with tool_input.file_path) FILE=$(jq -r '.tool_input.file_path // empty' 2>/dev/null) [ -z "$FILE" ] && exit 0 case "$FILE" in *.py) uvx black --quiet "$FILE" ;; *.js|*.ts|*.jsx|*.tsx) prettier --write "$FILE" 2>/dev/null ;; esac