Skills from an MCP server do not run commands; the ones in your repository do
On November 24, 2026, Anthropic announced Skills over MCP in public beta: an MCP server can now publish skills alongside its tools, and Claude loads them when it needs them. The same announcement declared Tasks and Elicitation generally available.
That night, at 22:06 UTC, version 2.1.332 of Claude Code was published on npm. Its changelog carries two lines worth reading together: skills from MCP servers, and a new hook event, PreSkillShellCommand, which can reject the shell commands a skill runs while it loads.
Read together, the two make it look as if the remote skill brings the shell with it. The documentation says the opposite. A skill that arrives from an MCP server runs no commands when it loads. The one that does is the skill that already lives in your repository, in your personal folder or in a plugin, and until this version no hook saw it.
What exactly shipped, and when?
The dates matter because the sources do not fully agree on the minimum version.
| Date (UTC) | What happens | Source |
|---|---|---|
| November 16, 2026 | 2.1.326 is published, the version that the npm stable tag still points to on November 28 | npm registry for @anthropic-ai/claude-code |
| November 23, 18:36 | 2.1.331 is published; the MCP documentation gives it as the minimum for MCP skills | npm registry; MCP documentation in Claude Code |
| November 24 | Anthropic announces Skills over MCP in public beta | Anthropic’s announcement |
| November 24, 22:06 | 2.1.332 is published; its changelog is the first one to list MCP skills and PreSkillShellCommand | npm registry; changelog |
| November 28 | latest points to 2.1.332 and stable is still on 2.1.326; no version has been published since November 24 | npm registry, checked that day |
Table compiled by me from the publish times of the npm registry and the linked pages.
The practical consequence sits in the last row. Whoever installs the stable channel still has neither the MCP skills nor the new hook.
What is, technically, a skill served by a server?
A skill is a folder with a SKILL.md: instructions in Markdown with a YAML header, and optional support files. The Skills extension of MCP (io.modelcontextprotocol/skills, proposal SEP-2640, already at final status) defines how a server announces and delivers them: skills/list returns each skill with a manifest of its files, and every file carries its URI, its size in bytes and its SHA-256 hash.
The announcement sells the advantage: the skill updates with the server and the user has nothing to install. That advantage is also the point that has to be watched. Someone else decides the content, and it can change.
The extension sets rules for clients. A client has to verify the size and hash of each file before using it, and a saved approval has to be tied to the full set of URIs and hashes. If a file changes, appears or disappears, the approval falls and has to be requested again.
The specification itself puts the limit of that guarantee in one sentence: “Digests establish consistency with the server’s manifest, not trust in its content”. The hash proves that you receive what the server announced, not that what was announced is harmless. And for generated content with no stable hash, the manifest says "dynamic", the client can reject those skills and, if it accepts them, no earlier approval covers whatever arrives afterwards.
What Claude Code ignores about a remote skill
The section on skills from MCP servers in the Claude Code documentation is short and very concrete. Because the server provides the content, an MCP skill loses several capabilities of a local skill:
- These header fields are ignored:
allowed-tools,disallowed-tools,hooks,model,effort,context,agent,background,shell,pathsandmetadata. - Commands with
!do not run. - References with
@do not attach files. ${CLAUDE_PROJECT_DIR}and${CLAUDE_SESSION_ID}are not substituted.
The section on restricting access to skills finishes it off: with a skill from an MCP server, Claude does not receive the grant of allowed-tools. A remote skill cannot approve tools for itself.
That does not make it harmless. The MCP page says it without detours: “Skills can direct Claude to run code. Servers can change skills at any time.” A remote skill is text that enters the context of the model with instruction authority. If it asks for something dangerous, the model can try it, but every attempt is an ordinary tool call: it goes through permissions, through permission mode and through the PreToolUse hooks.
It is the same instruction injection problem we already know, with one difference. This time the text arrives over a channel with a name of its own, server:skill, and with an approval that can be pinned to a version. In a previous article I wrote that an MCP tool name is not an identity; here the extension at least forces the origin of the server to be stored next to the URI of the skill.
Who approves a skill that changes on the server?
It depends on permission mode, and this is the part of the documentation that surprised me most.
In automatic mode, which the MCP page describes as the default mode, loading an MCP skill shows no question at all. A classifier decides whether the skill loads, and the documentation says that it decides without reading it. In manual mode or acceptEdits a question does appear, and the option Allow this version avoids the question and the classifier until the server changes the files of the skill.
For a server you do not entirely trust there are permission rules with the prefix of the server. Taking docs as the example name:
| What I want | Rule | Where |
|---|---|---|
| Block its skills, including the ones I type | Skill(mcp__docs__*) | deny |
Ask every time, including in automatic mode and bypassPermissions | Skill(mcp__docs__*) | ask |
| Block its skills and its tools | mcp__docs | deny |
| Turn off the skills of servers that are not connectors, on managed teams | disableDirectMcpSkills: true | managed configuration |
Table compiled by me from the MCP documentation in Claude Code.
The pre-screening remains. Anthropic scans the skills of some connectors: the third-party connectors of the Directory that are added in claude.ai and the custom connectors of Enterprise organizations that keep scanning enabled. According to the same page, it does not scan those of other servers, including the servers of the Directory added with claude mcp add.
With /login, MCP skills are enabled on Pro, Max and Ultra; on Team and Enterprise they arrive switched off until your organization turns them on. With a long-lived token they are enabled too, and with an API key or a Console login they may still be off: the rollout has not reached every account yet.
The shell that runs at load time is in your repository
Now the other half. A local skill can include shell commands that run before the content reaches the model: a line with !`command` or a code block whose opening line carries the marker ! after the fence’s three backticks. The output of the command replaces the marker. The documentation calls it injecting dynamic context, and the example it gives is a summary of a pull request that runs gh pr diff when it loads.
A minimal, harmless example:
## <section>
- <line>: !`git status -s`
According to the section on permissions of the injected commands, these commands never show a question while the skill renders. Claude Code compares them with your permission rules. A deny or ask rule that matches aborts the load. Outside automatic mode, any result other than allow also aborts it, unless the skill itself has pre-approved it with allowed-tools.
In automatic mode, a command that would need approval does not abort the load. The skill loads with an instruction for Claude to run it first, and that run is an ordinary tool call.
Two details that matter if you work with other people’s repositories:
- The
allowed-toolsof a project skill applies even in a run with-pin a folder you have never trusted. The documentation recommends reviewing that field in the skills that ship inside a repository before running Claude Code in it. - Injected commands can be switched off for user, project, plugin and added-directory skills and commands with
"disableSkillShellExecution": true. The skills bundled with Claude Code and the managed ones are not affected.
And the detail that explains the new hook: PreToolUse does not fire for the injected commands. The hooks documentation lists it as a warning inside the PreToolUse section itself. A security hook that only watched PreToolUse did not see what a local skill ran as it loaded.
Skills that work as a lock already kept me busy with Hermes Agent. Here the problem is earlier: seeing what the skill runs before the model reads a single line.
What does PreSkillShellCommand do, and what does it not?
The hook runs just before each injected command, after the permission check. So it only sees the commands that have already passed the rules, and it also runs in bypassPermissions mode. It receives the command as it would be executed, the tool that runs it (Bash or PowerShell), the name of the skill, its origin (projectSettings, plugin, builtin and others) and whether the user, Claude or something else (a subagent that preloads the skill, for example) invoked it.
Its power is asymmetric: it can block a command, but not approve it or change it. If it returns ask, defer or an updatedInput, Claude Code treats it as a block. The skill loads anyway, without the output of that command.
The documentation gives the recommended configuration for a hook that has to block:
{
"hooks": {
"PreSkillShellCommand": [
{
"matcher": "Bash|PowerShell",
"hooks": [
{ "type": "command", "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh", "args": [], "onFailure": "block" }
]
}
]
}
}
There is small print, all of it on the same page:
- Version. Requires 2.1.332. Earlier versions run the injected commands without calling the hook. In 2.1.331, a configuration file that names it opens an unknown event warning at the start of every interactive session. The page points to
requiredMinimumVersionto impose a minimum version. - Type. An asynchronous hook cannot block. A hook of type
promptoragentcannot run on this event, and then Claude Code blocks every matching command. - Failures. Without
onFailure: "block", a hook that fails or times out lets the command through. - Location. The hooks that a skill declares in its own header do not apply to its injected commands on the first load of the session nor on loads inside a subagent. The hook has to be in a configuration file or in a plugin.
- Automatic mode. The command that is deferred so that Claude runs it later goes through
PreToolUse, not this event. The same script has to be in both.
What these sources do not establish
- I have not tested it. Everything above comes from the documentation, the changelog, the specification and the npm registry. I have not run an MCP skill or the hook in a real session, and the documentation of a beta can run ahead of or behind the code.
- The minimum version. The MCP documentation asks for 2.1.331, but the changelog of 2.1.331 does not mention MCP skills and the one of 2.1.332 does. From 2.1.332 you have both.
- The classifier. The documentation says that in automatic mode the classifier decides without reading the skill. It does not explain on what criteria, and I do not know.
- Approval by version. The specification requires the approval to be tied to the hashes of all the files. The Claude Code documentation says that Allow this version lasts until the server changes the files. That is consistent with the specification, but I have not verified the implementation.
- Other clients. The extension is open and any compatible client can implement it. Claude Code not running
!in a remote skill is a Claude Code decision, not a rule of the extension that I have found written down. - The figures of the announcement. The more than 700 million monthly downloads of the MCP SDKs and the more than 10,000 MCP connectors for Claude are Anthropic figures, with no independent replication.
What would I do this week?
If I run Claude Code with security hooks, this is the order:
- Update first, configure after. Move to 2.1.332 or later on every machine, and only then add
PreSkillShellCommandwith the same script that already runs onPreToolUse, the matcherBash|PowerShellandonFailure: "block". On managed teams, pinrequiredMinimumVersion. - Look for injected commands in the repositories. Review every
SKILL.mdof.claude/skills/and of the plugins in use, looking for!and for the blocks that open with that same marker, and everyallowed-tools. That is where the shell runs at load time. - Switch off what is not used. If nobody on the team needs injected commands,
disableSkillShellExecutionin the managed configuration. - Put a price on every MCP server. For the servers I do not control, an
askrule onSkill(mcp__docs__*). And on managed teams where remote skills add nothing,disableDirectMcpSkills. - Do not confuse hash with trust. A skill approved by version is still text that someone else wrote. Reading it before approving it is still the review that matters.
In the end, the remote skill is an instruction problem and the local one is an execution problem. The new hook covers the second. The first still depends on the permissions the agent has and on who writes the server.
Sources
- Anthropic, MCP servers can now ship skills, run tasks, and more with Claude, November 24, 2026.
- Anthropic, Claude Code changelog, versions 2.1.326 to 2.1.332.
- Claude Code documentation: Connect Claude Code to tools via MCP (section Use skills from MCP servers), Extend Claude with skills (sections Skills from MCP servers, Inject dynamic context and Permission checks on injected commands) and Hooks reference (sections PreToolUse and PreSkillShellCommand), checked on November 28, 2026.
- Model Context Protocol, Skills extension (
io.modelcontextprotocol/skills, SEP-2640) and its repository modelcontextprotocol/ext-skills. - npm, registry of
@anthropic-ai/claude-code, publish times and tags, checked on November 28, 2026.