What can a Claude Code plugin execute on your machine, and how do you review one before you install and enable it?
answer
- runs as you, whatever the marketplace
- hooks and servers outside the sandbox
- bin/ joins the Bash tool's PATH
- Will install shows a hook, not its command
- auto-update can change reviewed files
basics
~20 sA plugin runs code as you: hooks are shell commands, MCP and LSP servers are processes, and bin/ joins Claude's PATH. Permission rules and the sandbox do not cover hooks or servers, so read hooks.json, .mcp.json and bin/ first.
solid answer
~50 sTreat a plugin as code that runs with your user privileges, whatever marketplace lists it. Its hooks run shell commands at lifecycle events from the moment it loads, and its stdio MCP servers and language servers are processes Claude Code starts; those run outside the sandbox, and permission rules do not apply to them. Rules do still govern Claude's tool calls, including calls to the plugin's MCP tools and Bash runs of executables from its `bin/`. Skills and agents are instructions that steer Claude. To review one: check the marketplace source with `claude plugin marketplace list`, read the `/plugin` details pane's **Will install** list, then read `hooks/hooks.json`, `.mcp.json` and every file in `bin/` in the source, and run `claude --plugin-dir <dir> plugin details <name>` on a clone. After installing, remember auto-update can replace what you reviewed.
code
bash · 6 linesclaude plugin marketplace list
git clone https://github.com/example-org/platform-tools.git
cat platform-tools/plugins/team-toolkit/hooks/hooks.json
cat platform-tools/plugins/team-toolkit/.mcp.json
ls -la platform-tools/plugins/team-toolkit/bin
claude --plugin-dir platform-tools/plugins/team-toolkit plugin details team-toolkitgo deeper
Recall that a plugin runs as you: hooks are shell commands, MCP servers are processes, and you read the details pane before installing anything.
Explain which parts are code (hooks, MCP and LSP servers, bin/) versus instructions (skills, agents), and where to read each one in the plugin's source.
Show the enforcement boundary: permission rules and the sandbox cover Claude's tool calls, not hook or server processes, and auto-update can replace reviewed files. Walk through a concrete review.
Set a team's plugin trust policy: which marketplaces may be added, who reviews hooks and servers, whether auto-update stays off for third-party catalogs, and when to escalate to managed controls.
## Why this is asked A plugin is installed with one command and then becomes part of **every session**. Interviewers ask about it because the convenience hides two costs: a plugin **runs code as you**, and it **adds context on every turn**. Vetting the people and release cadence behind a third-party dependency is a supply-chain topic of its own; the question here is what a Claude Code plugin can actually do and how you inspect it. ## What a plugin can do | Component | What it does | Who governs it | |---|---|---| | Hooks (`hooks/hooks.json`) | Shell commands, HTTP calls or prompts at lifecycle events, such as after every edit | Nothing but your review; command hooks run with your full user permissions | | MCP servers (`.mcp.json`) | A stdio server is a local process Claude Code starts; a remote one is a URL | The process runs outside the sandbox; Claude's calls to its tools go through permission rules | | LSP servers (`.lsp.json`) | Language servers Claude Code starts for matching files | Processes outside the sandbox | | `bin/` | Added to the `PATH` of the Bash tool's shell | Claude runs these through Bash tool calls, which permission rules govern | | Skills, agents, commands | Text that enters Claude's context as instructions | Shapes what Claude does with the tools it already has | Three facts change how much a review is worth: - **Hooks fire from load.** They register when the session loads the plugin and fire on their events whether or not any of the plugin's skills is ever used. - **Permission rules and the sandbox cover Claude's tool calls**, not the code a plugin runs by itself. A deny rule does not stop a plugin's `PostToolUse` hook script. - **Installing also enables**, unless the manifest or entry sets `defaultEnabled: false`. Two limits work in your favour: a plugin's `bin/` comes after your own `PATH` entries, so it cannot shadow `git` or `ls`, and a plugin agent's frontmatter ignores `permissionMode`, `hooks` and `mcpServers`. ## What a marketplace name tells you Marketplace names fall into three tiers: **official** (such as `claude-plugins-official`), **community** (such as `claude-community`), and **third-party** (everything else, including your coworker's catalog). Claude Code accepts official and community names only from `github.com/anthropics/` repositories, so a stranger cannot pose as one. But the tier says who publishes the catalog, not what each plugin does, and Claude Code shows the same trust warning for every plugin. ## Reviewing before you install 1. **Check the source.** `claude plugin marketplace list` prints where each marketplace was added from. 2. **Read the details pane.** In `/plugin`, the plugin's **Will install** section lists its commands, agents, skills, hooks, and MCP and LSP servers. It shows that a hook exists, not what it runs. Official-marketplace plugins also show a **Context cost** estimate. 3. **Read the files that execute.** Open the plugin's source and read `hooks/hooks.json` (each hook's command), `.mcp.json` (each server's command or URL) and every file in `bin/`. 4. **Inventory a clone.** `claude --plugin-dir <plugin directory> plugin details <plugin name>` reads the files without starting a session and prints a **Component inventory**, including each hook's event, and the always-on token cost. After installing, `claude plugin details <name>` prints the same inventory for the cached copy under `~/.claude/plugins/cache/`. ## Keeping what you reviewed Background **auto-update** is on by default for most of Anthropic's official marketplaces and off for community and third-party ones. When it is on, the files you read can change on disk without another review. Leave auto-update off for a marketplace you vet manually, update deliberately with `claude plugin update`, and read the diff first. A catalog owner can also pin an entry to a `ref` or `sha`, or an `archive` source to a `sha256` digest, which Claude Code verifies. ## Removing a plugin you stop trusting - `claude plugin uninstall <plugin> --scope <scope>` at each scope it was installed. - Its persistent data directory is deleted by default after the last scope; cached files stay under `~/.claude/plugins/cache/` for 14 days unless you delete them. - Removing the whole marketplace uninstalls every plugin installed from it. Organization-wide allowlists and forced installs are managed-policy controls and belong to a separate discussion.
- Your permissions.deny blocks Bash(curl *). Does that stop a plugin's hook from calling curl?No. Permission rules govern the tool calls Claude makes; a command hook is run by Claude Code itself, with your user permissions and outside the sandbox. The deny rule stops Claude running `curl` through the Bash tool, and Bash rules also apply when Claude runs one of the plugin's `bin/` executables, but none of that reaches the hook script. The control for hooks is reviewing `hooks/hooks.json` before enabling the plugin.
- You reviewed a plugin last month. Why might the code running today be different?If its marketplace has auto-update on, Claude Code refreshes it in the background after a session starts and installs new versions on disk; the next session loads them. Official Anthropic marketplaces mostly default to on, third-party ones to off, but a user or settings entry can turn it on. Keep auto-update off where you vet manually, or pin the entry to a commit.
- Does a plugin cost anything in sessions where you never use it?Yes. The name and description of every skill, agent and command Claude may invoke on its own sit in context on every turn, its MCP servers run alongside the session, and its hooks fire on their events. `claude plugin details <name>` shows the always-on token figure, and the `/plugin` Installed tab groups plugins not used recently so you can disable them.
- Plugins from a big marketplace are vetted, so the hooks need no reading.
- Permission deny rules also stop a plugin's hook commands.
- A plugin's hooks run only when you invoke one of its skills.
- The Will install list shows exactly what each hook executes.
- Once reviewed, an installed plugin's files never change on disk.
- A plugin's bin/ can override git or ls on Claude's PATH.