Unclear It is not confirmed whether the hook settings accept PreSkillShellCommand as an event name in this build.
What
Hooks are scripts you set up to run at certain points in Claude Code. A new hook event, PreSkillShellCommand, runs before each shell command that a skill or slash command includes. A skill is a packaged set of instructions Claude can use.
- The hook's input carries
hook_event_name,tool_name,tool_input,command_name,command_sourceandinvoked_by. Hooks are matched ontool_name. - Exit code 0 lets the command run, unless the hook's JSON output denies, asks, defers or changes it.
- Exit code 2 blocks the command and shows the error output to Claude and to you.
- Other exit codes show the error output to you only, and the command still runs.
- A blocked command is reported as "[not run: blocked by hook ...]". A hook can also stop the whole skill with a stop reason.
- A skill can't wait for approval, so a hook that asks for approval, defers, changes the input or changes permissions is treated as a block, with a reason such as "the hook asked for approval, which a skill can't wait for".
- If the hooks give no answer, the command runs anyway and you are told. Messages include "Not run in" and "Ran anyway in".
- Only command-type hooks run for this event: "prompt and agent hooks don't run on PreSkillShellCommand".
- It accepts permission-style decisions like
PreToolUseandPermissionRequest.
Why
Users and admins can now check, block or log the shell commands built into skills before they run. A missing answer lets the command through, so a policy hook that must block things needs to answer every time.
Names in the bundlePreSkillShellCommand
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
It is not confirmed whether the hook settings accept `PreSkillShellCommand` as an event name in this build.