Skills
Claude Code PreToolUse updatedInput Mutation: Rewrite Tool Calls Transparently Without Conversational Overhead
Claude Code's PreToolUse hook accepts a JSON response with an `updatedInput` field that replaces the tool's input before execution, skipping the normal conversational round-trip. This enables transparent sandboxing patterns: auto-append `--dry-run` flags to shell commands, redact secrets from file writes, or rewrite absolute paths to sandboxed directories—without Claude knowing. Hooks that return `updatedInput` run at lower latency than asking Claude to rephrase the call.
↳ Follow the thread