Download

Dev blog · Features · 2026-11-22

Claude Code plugin hooks run without asking. Here is how to check them

Most of what a Claude Code plugin adds waits for you or the model to use it: a skill, a slash command, a subagent. Hooks don’t. A hook is a shell command that Claude Code runs automatically on an event (before a tool runs, after a file edit, when a session starts) without asking each time.

That’s what makes hooks useful, and what makes them the part of a plugin worth reading first.

What can a hook do?

Anything your user account can. A formatter hook runs prettier after every edit. A guard hook blocks rm -rf. A bad hook could just as easily send your environment variables somewhere on every session start. Claude Code shows you hooks when you install a plugin, but a long hooks.json full of script paths is easy to approve without reading.

Where are a plugin’s hooks?

In the plugin’s hooks/hooks.json. Each entry names an event and the command to run:

{
  "hooks": {
    "PostToolUse": [
      { "matcher": "Edit|Write", "hooks": [{ "type": "command", "command": "npx prettier --write \"$CLAUDE_FILE_PATHS\"" }] }
    ]
  }
}

Read the command fields. If one runs a script file, open the script too. In Claude Code, /hooks lists every hook currently active, plugin or not.

How does Calyban check them?

Plugins are installed by Claude Code itself, so Calyban checks them right after the download, and again whenever you open Safety. For hooks it does more than for ordinary files:

Calyban Safety page with a high-risk download-and-run finding and its file and line
A high-risk finding names the file and line. Hook findings also say which event runs them.

When does the check run?

Claude Code downloads plugins itself, so Calyban checks the files the moment they land. A plugin can’t run anything until you start a new session, so the findings are in front of you before any hook ever fires. A hook that fetches a script from a URL at run time is flagged as download-and-run, so you know to look at that URL yourself.

The rest of 1.3’s safety changes: What’s new in Calyban’s safety check. The general risks of skills and plugins: Are Claude Code skills and plugins safe? Found a hook that should have been flagged? Discord.

← More features · All field notes