fupio

Fupio はオンラインで共有する最も簡単な方法です 詳しく見る »

Fupio に参加
egghead.io - Bite-sized Web Development Video Tutorials & Training

egghead.io - Bite-sized Web Development Video Tutorials & Training

Blocking tool commands with hooks gives you fine-grained control over what Claude Code can execute. Use PreToolUse to intercept commands like echo, validate tool usage, and enforce conventions before any tool runs. ## Two ways to block Exit code 2 (simple): - Write error to stderr - Exit with code 2 - Claude sees the error message and stops the tool JSON output (structured): - Return permissionDecision: "deny" - Provide permissionDecisionReason - Claude sees the reason and can self-correct ## Block with exit code 2 Stop commands with a simple error:
https://egghead.io/lessons/block-tool-commands-before-execution-with-pre-tool-use-hooks~erv55

Comments