Saturday, November 28, 2026
Skills Become a Protocol: Claude Code Now Loads Skills From MCP Servers
Posted by

Two lines in the v2.1.332 release note change what a skill is, on two different surfaces. The first moves skills onto a wire protocol: "Added skills from MCP servers (beta). They show as server:skill in the / menu; other skills keep their names".[1] The second adds a check that applies to a different set of skills: "Added a PreSkillShellCommand hook event that can refuse a skill or command's inline shell commands as it loads".[1]
The gate covers skills that don't arrive over MCP — enterprise, personal, project, plugin, and built-in — which matches the example values the reference gives for its command_source field (userSettings, projectSettings, policySettings, plugin, builtin).[2] Skills delivered over MCP are not in that set: the skills reference says their ! commands "don't run", and lists hooks among the frontmatter fields Claude Code ignores for them.[4] Nothing is injected at load time for the hook to refuse, so the release note is distribution for server-delivered skills plus a gate over the ones already on disk.
They do not add up to a trust model. The naming tells you where a skill came from; the hook decides whether one class of side effects executes. Neither says whether the instructions inside are safe to follow, and both lines shipped in a single release note with no companion announcement.
How a skill arrives from a server
The release note gives the menu label and nothing else. The reference documentation fills in the rule: a skill's command name is server:skill, so a server named docs with a pdf skill is invoked as /docs:pdf report.pdf.[3] Connectors and plugin-bundled servers prefix further, as in claude_ai_Docs:pdf or plugin_my-plugin_docs:pdf, and any character outside letters, digits, -, and _ in the server segment becomes _.[3]
The prefix is not cosmetic. The Skills extension specification states that skill identity "consists of the originating server's identity and the skill URI," and that "names are labels and are not guaranteed to be unique."[5] Hosts must preserve both in registries, approvals, and caches.[5] Two servers can both publish a code-review skill; only the server: segment keeps them apart — the difference between a skill as a folder someone handed you and a skill as an addressable artifact with a provenance field.
The beta is narrow. The MCP page says MCP skills "are in public beta and require Claude Code v2.1.331 or later," one version below the changelog entry that announces them; I could not reconcile the two from published material.[3][1] Availability is plan- and surface-dependent: on by default for Pro, Max, and Ultra sign-ins, off for Team and Enterprise until an owner enables it.[3]
Terminal sessions, local Desktop sessions, and the VS Code extension once it reaches you are supported; cloud sessions, claude -p, Remote Control server mode, GitHub Actions, and the Agent SDK are not.[3] A headless CI skills workflow sits outside the beta.
Three more requirements decide whether a given install sees the beta at all. The model has to be a Fable model, or Claude Opus 4.8, Sonnet 5, Haiku 5.5, or later, and the connection has to be direct to Anthropic with feature flag fetching on; cloud providers, a custom ANTHROPIC_BASE_URL, apiKeyHelper, and ANTHROPIC_AUTH_TOKEN are listed as unsupported, along with HIPAA and zero-data-retention organizations and, in the Desktop app, connectors, Desktop extensions, and servers from claude_desktop_config.json.[3] The credential path matters too: a long-lived token gets MCP skills on any plan, while an API key or a Console login is "rolling out: off now", and with those credentials claude.ai connectors don't load, so only skills from other servers appear.[3]
Integrity is specified; trust is not
The interesting part of the MCP side is not the naming, it is the manifest. A server that serves skills must declare the resources capability plus the io.modelcontextprotocol/skills extension, and must implement skills/list and skills/get, with file contents delivered through resources/read.[5] Each entry carries the skill's frontmatter plus either a complete file manifest — a URI, SHA-256 digest, and byte size per file — or the value "dynamic" for generated content, which has no manifest to check.[5]
Hosts must then verify: restrict reads to the retained manifest, check each file's size and digest before use, and compare parsed frontmatter against the listed frontmatter.[5] A changed, added, or removed file revokes a persisted approval.[5] Claude Code's own flow binds similarly — "Allow this version" in Manual or acceptEdits mode skips the prompt until the server changes the skill's files.[3]
That beats the current default for cloned skills, where upstream can change the SKILL.md on disk with no notification and no version pin. It is narrower than it sounds: digests "establish consistency with the server's manifest, not trust in its content,"[5] and a malicious server signs its own manifest correctly.
Claude Code's scanning is partial in exactly the place that matters. Anthropic scans skills from third-party Directory connectors added on claude.ai, and from custom connectors while an Enterprise organization keeps skill scanning on; it "doesn't scan skills from other connectors or servers, including Directory servers added with claude mcp add."[3] The documentation's own warning is blunt: "Skills can direct Claude to run code. Servers can change skills at any time. Add only servers you trust."[3]
So the protocol solves provenance and integrity, not vetting. The review methodology — static red-flag scan, two-model static review, license and provenance check, re-vetting on change — is still what judges content, and it now applies to something arriving over a socket rather than a git clone. The Aug 2026 supply-chain research remains the right frame for what a hostile skill does once it is loaded.
The gate: what PreSkillShellCommand blocks
A locally supplied skill can run shell before Claude reads it. The ! syntax — inline as !`cmd` at the start of a line or after whitespace, or as a fenced ```! block for multi-line commands — executes during rendering and replaces the placeholder with the output, and an MCP-delivered skill can carry the same lines without any of them running.[4] Each command runs through the Bash or PowerShell tool, in the session's working directory, under the Bash tool's two-minute default timeout, and — with the default bash shell — with stderr merged into stdout.[4]
Those commands are not tool calls. PreToolUse — the hook most people use as a guard and an audit log — does not see them at all: "PreToolUse hooks don't fire for injected commands."[2] A third-party measurement of 78 headless runs recorded 43 PreToolUse invocations, none of them for the touch and curl lines a test skill injected at load; both ran five times out of five with only PreToolUse configured.[6] That is a class of command a PreToolUse guard never sees.
PreSkillShellCommand closes that specific gap. It fires before an injected command runs, matches on the tool that runs it (Bash, PowerShell), and can block.[2] Blocking follows PreToolUse's JSON shape: exit 2, permissionDecision: "deny", or a top-level decision: "block", and the command does not run.[2]
The skill still loads, and Claude reads [not run: blocked by hook: <reason>] where the output would have been.[2] Returning "ask", "defer", or any updatedInput is treated as a denial — this event has no approval path; continue: false goes further and fails the whole invocation with Operation stopped by hook: <reason>, before any of the skill's commands run.[2]
It also receives tool_name, tool_input.command, command_name, command_source (userSettings, projectSettings, policySettings, plugin, builtin), and invoked_by (user, claude, other).[2] Every documented command_source value is a local one, and an MCP-delivered skill never produces a command for this event to inspect, because its ! lines don't run.[2][4]
What the hook cannot do
Four limits matter more than the feature.
It can only deny. "You can block a command from this hook, but you can't approve or change one."[2] There is no rewrite and no "run this instead."
It fails open by default. If the hook exits 1, times out, or points at a missing script, the command runs — unless the entry sets onFailure: "block".[2] The same third-party test hit all three failure modes on 2.1.332, saw the command run under the default, and blocked with onFailure set.[6] The trap is how it fails: a missing Python script exits 2, which this event reads as "block," while a missing shell script exits 127, which reads as "failure" and lets the command through.[6]
It is not retrospective. The hook runs after the permission check on injected commands, so it only sees commands that survived your deny rules, and it runs in bypassPermissions mode too.[2] That is why the sane deployment is both layers: keep the Bash(curl *)-style deny rules, which already aborted injected commands on both versions, and add the hook for what rules cannot express.[6][4]
A skill's own hook is late. Injected commands run without the hooks in the skill's own frontmatter on its first load in a session and inside subagents, and a forked skill's commands run without the hooks in its own frontmatter or in its subagent's definition.[2] The third-party runs found the skill-declared hook never fired across three --resume invocations, only on a second load in the same process.[6] Define the hook in a settings file or a plugin.[2]
An MCP-delivered skill skips that whole problem: its hooks frontmatter is ignored, along with allowed-tools, model, paths, and the rest of the fields the skills reference lists.[4]
A minimal configuration
This is the documentation's own example, adapted: a settings-file entry that runs one script at the event and fails closed.
{
"hooks": {
"PreSkillShellCommand": [
{
"matcher": "Bash|PowerShell",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh",
"args": [],
"onFailure": "block"
}
]
}
]
}
}
Three details are doing the work. The matcher is Bash|PowerShell because those are the two tools that run injected commands.[2] The hook must be a command, http, or mcp_tool hook that is not async, "because an async hook can't block"; a prompt or agent hook configured here cannot run and blocks every command it matches.[2] onFailure: "block" is the difference between a guard and a suggestion, and the scripting contract is PreToolUse's, so an existing blocking script works on both events if you leave hookEventName as PreToolUse.[2]
One prerequisite: this event requires v2.1.332 or later. On 2.1.331 the entry is ignored and injected commands run without calling it; the older version opens a warning dialog in an interactive session, and in claude -p the third-party runs saw empty stderr and exit 0 while the commands ran.[2][6] Set requiredMinimumVersion so a fleet does not silently drop the gate.[2]
What to do with this
For publishers, serving skills over MCP is a distribution decision, not just a hosting one: implementing the extension promises digest-stable manifests and per-skill approval that hosts will verify.[5] The packaging model is the Agent Skills format you already write; what changes is that the artifact now has an address and an integrity check.
For installers, deploy the gate before the beta matters: a PreSkillShellCommand hook in managed settings or a plugin, reusing your PreToolUse script, with onFailure: "block" and your existing deny rules kept in place. Then check the audit log against a skill that injects a command, because a guard that never fires and a guard that always allows look identical from the outside.[6]
The hook still governs one load-time path. It does not review instructions, it does not constrain what the skill tells Claude to do afterward, and a server rewriting a skill you already approved is caught by the manifest and approval revocation rather than by this event.[2][5] The Claude Code MCP setup guide covers the server side of that pairing.
What I verified, and what I did not
I fetched and read the v2.1.332 release note, the hooks reference, the MCP reference, the skills reference, and the MCP Skills extension overview. Every configuration field above comes from the reference documentation rather than the changelog: the release note gives one sentence and no schema.[1][2]
I did not run Claude Code locally for this piece, so claims about blocked output, fail-open defaults, and skill-declared hook timing are attributed to the documentation and to third-party headless measurements rather than to my own test.[2][6]
A single release note is thin sourcing for a feature this consequential. Treat the naming and the hook as documented mechanics, and treat the beta's reach as provisional until the reference pages and the changelog agree on a version floor.[1][3][4]
Sources
[1] https://github.com/anthropics/claude-code/releases/tag/v2.1.332 — Release v2.1.332 · anthropics/claude-code [2] https://code.claude.com/docs/en/hooks.md — Hooks reference — Claude Code [3] https://code.claude.com/docs/en/mcp.md — Connect Claude Code to tools via MCP [4] https://code.claude.com/docs/en/skills.md — Extend Claude with skills [5] https://modelcontextprotocol.io/extensions/skills/overview — Skills — Model Context Protocol extension [6] https://gloss.run/post/claude-codes-pretooluse-hooks-dont-see-a-skills-own-commands — Claude Code's PreToolUse Hooks Don't See a Skill's Own Commands
Related Articles & Deep Dives
#reverse-engineeringReverse Engineer Anything (REA): How to Prompt the MCP
REA is an MIT-licensed MCP server that lets coding agents reverse engineer apps, games, and binaries locally. Install, three workflows, and the legal lines.
#agent-skillsMalicious Agent Skills & Supply Chain Attacks: Securing the SKILL.md Ecosystem
How third-party AI agent skills introduce hidden RCE, environment variable exfiltration, and prompt injection — and how to sandbox and audit SKILL.md packages.
#anthropicAnthropic brings Artifacts to Claude Code — sharing interactive pages from coding sessions
Claude Code can now turn session output into shareable, interactive web pages called artifacts. Complete guide to how it works, what you can build, sharing and permissions, and practical use cases for teams.