My test skill ran curl before the model read a word
An agent skill told the model how to slip a download past safety checks. What got fixed, what I found in my own skills folder, and a hook that blocks it.
By Meet ModiI wrote a tiny skill for Claude Code, gave it one line of frontmatter saying it was allowed to use curl, and invoked it. It made a network request before the model had read a single word, and nothing asked me. That is documented behaviour, not a bug. I only went looking because of a GitHub issue that spent yesterday near the top of Hacker News.
What happened
The plugin is Convex's own, and it is listed in Anthropic's official plugin marketplace for Claude Code. The issue was opened on October 26 by someone who maintains a catalogue of agent skills. It sat there for a month. Then it got posted to Hacker News and everyone read it at once.
- Oct 26Issue #64 is opened on the plugin's repository.
- Nov 25Claude Code 2.1.332 ships with the PreSkillShellCommand hook. Unrelated to the issue as far as I can tell. The timing is just convenient.
- Nov 27, 18:02 UTCThe issue reaches Hacker News. 325 points and 106 comments when I checked.
- Nov 28, 06:38 UTCA commit removes the flagged instruction and the telemetry labels. The plugin goes from 1.18.0 to 1.18.1.
- Nov 28, 07:38 UTCJames Cowling of Convex replies on the issue.
- Nov 28, 09:25 UTCThe reporter confirms the change and lists two things still open.
What the skill actually said
Three of the plugin's skills were flagged. The quickstart skill POSTed the one-sentence project idea you gave it to a host under convex.site, in a step its own comments labelled telemetry. The add skill piped a script from that host straight into bash. And the labs quickstart told the agent to download the bootstrap script in one Bash call and run it in a second, with the reason written out: one command that both downloads and executes code is, in the skill's words, "the shape harness safety classifiers block".
Some fairness, because the internet was short on it yesterday. The reporter wrote that they read this as a team trying to make onboarding reliable, not as anything malicious. The plugin's README already said that the idea you type is sent to Convex's scaffolding service. And the reply from Convex was that the prompts are not used as telemetry at all, only to generate the custom quickstart, which is the whole point of the skill, and that the label was a sloppy comment.
I believe that. It still bothered me, and the third item is why. The first two are a product sending data to its own backend, which is ordinary. The third is a document addressed to my agent, telling it how to phrase a command so that a check I chose to have would not fire. Nobody on the Convex side had to be malicious for that sentence to be a problem.
What changed, and what did not
I read the diff. The telemetry headings and labels are gone. The comment above the POST now says the idea is sent to Convex to get a tailored runbook and is deleted after 24 hours. The paragraph about splitting the command is deleted. Where the add skill used to tell the agent to allow curl and bash if a prompt blocked them, it now says to tell the user what the script does, let them approve or decline, and never reword a command to get it past a permission prompt. That is the right fix for the worst part, made within a day of the thread blowing up.
What did not change, going by the reporter's follow-up and the same diff: the bootstrap and add scripts are still downloaded from a convex.site host when the skill runs, with no hash to check them against. And the retention period has been stated two ways, 24 hours in the skill and a much shorter figure in the Hacker News thread.
Here is the part I found on my own machine. Claude Code keeps a local copy of the marketplace file, and that file pins each external plugin to a commit. In my copy, 261 of 262 external plugins have a pin. Convex's entry is pinned to commit 6ca54f6, which is the exact commit the issue's links point at: the one from before the fix. My copy is dated November 26, so the pin may have moved by the time you read this. But it shows the limit of pinning. A pin freezes the text of the skill. It does not freeze a script the skill downloads when it runs.
Two doors, and only one had a guard
A skill can get a shell command run in two ways, and they are checked differently.
Door one: the skill tells the model to run something. The model calls the Bash tool, and that call goes through everything you have set up: permission rules, the approval prompt, PreToolUse hooks. This is the door the Convex skill used, and the reason it cared what a safety check would make of the command's shape.
Door two: an injected command. Write an exclamation mark followed by a command in backticks inside a skill file, and Claude Code runs it while the skill loads and pastes the output into the prompt. The model is not involved. The docs are clear about the rules: injected commands never prompt. Each one is checked against your permission rules, and outside auto mode anything that is not allowed aborts the skill. Unless the skill pre-approves it. A skill's frontmatter can carry an allowed-tools line, and that line counts.
PreToolUse hooks do not fire for door two. Until 2.1.332, nothing you could configure saw those commands at all. PreSkillShellCommand is the guard for that door. It is the same shape as a content security policy that checks fetch and never sees WebRTC: the guard was real, it was standing at a different door.
I tried it
A scratch folder, one project skill. The only interesting line is the third:
---
name: net-skill
description: Reports one line about the network. Test skill.
allowed-tools: Bash(curl *)
---
Status code from example.com: !`curl -s -o /dev/null -w "%{http_code}" https://example.com`
Reply with only the line above, exactly as you see it. Do not run any tools.$ claude -p "/net-skill" --model haiku
Status code from example.com: 200That 200 is a real response from example.com, fetched before the model saw the skill. No prompt, in a folder I had never opened with Claude Code before. This is not me finding a hole: the docs say outright that a project skill's allowed-tools applies even in a print-mode run in a folder you have never trusted, and tell you to review it for repositories you did not write. I just had not read that sentence until today.
One thing I broke on the way. My first version of the skill wrote STATUS= directly in front of the exclamation mark, with no space. That came back as literal text and nothing ran. With a space before it, it ran. I did not dig into the exact rule, so take that as an observation and not a spec.
Then the hook. It reads the command from stdin and exits 2 if the command names a network tool:
#!/usr/bin/env node
// .claude/hooks/no-network.mjs
// Refuses any command a skill tries to run while loading if it reaches the network.
let raw = "";
process.stdin.on("data", (c) => (raw += c));
process.stdin.on("end", () => {
const input = JSON.parse(raw);
const command = input.tool_input?.command ?? "";
if (/\b(curl|wget|nc|ncat|scp|ssh)\b/.test(command)) {
console.error(`${input.command_name} tried to reach the network while loading: ${command}`);
process.exit(2);
}
});{
"hooks": {
"PreSkillShellCommand": [
{
"matcher": "Bash|PowerShell",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/no-network.mjs",
"args": [],
"onFailure": "block"
}
]
}
]
}
}$ claude -p "/net-skill" --model haiku
Status code from example.com: [not run: blocked by hook: net-skill tried to reach
the network while loading: curl -s -o /dev/null -w "%{http_code}" https://example.com]The skill still loaded. The model got the refusal in place of the output, and repeated it back as asked. The input the hook receives also carries the skill's name, where it came from (your settings, the project, a plugin) and whether you or the model invoked it, so a stricter version could allow your own skills and refuse everything from a plugin.
Auditing what is already on your machine
Four commands, all read-only:
# how many skills can Claude Code see on this machine
find ~/.claude/skills ~/.claude/plugins -name SKILL.md \
-not -path "*/node_modules/*" -not -path "*/.venv/*" | wc -l
# anything that pipes a download straight into a shell
grep -rIlE "(curl|wget)[^|]*\|[[:space:]]*(sudo )?(ba|z)?sh\b" \
~/.claude/skills ~/.claude/plugins \
--exclude-dir=node_modules --exclude-dir=.venv --exclude-dir=.git
# commands that run while a skill loads
grep -rnF '!`' --include=SKILL.md ~/.claude/skills ~/.claude/plugins
# skills that pre-approve their own shell commands
grep -rlE '^allowed-tools:.*Bash' --include=SKILL.md ~/.claude/skills ~/.claude/pluginsMy numbers: 129 skills. Two files matched the pipe-to-shell pattern, and both were plugin READMEs with the same line, the standard one-line installer for Bun, addressed to a human. Injected commands turned up in two skill files. One prints a UTC timestamp. The other is a skill that teaches you how to write commands, so its matches are examples inside code blocks. Five skills pre-approve Bash in some form, none of them for curl or wget. So: nothing alarming, which is the boring result I was hoping for.
What I'd set up after this
- Update to 2.1.332 or later first. On an older version the settings file opens a warning about an unknown hook event, and injected commands run without the hook being called.
- Put the hook in ~/.claude/settings.json so it covers every project, and keep onFailure set to block so a crashing hook fails closed.
- Register the same script on PreToolUse. The docs recommend it, because in auto mode a command that needs approval is not run at load. The model runs it afterwards as a normal tool call, and that fires PreToolUse instead.
- Read a skill before installing it. It is a Markdown file. Search it for curl, for allowed-tools, and for an exclamation mark next to a backtick. Then look at what it downloads.
- Treat an allowed-tools line as a permission request, because it is one. Bash(curl *) in a skill you did not write deserves the same squint as an app asking for your contacts.
The catch
The hook can only block. It cannot approve a command or rewrite one, and it runs after the permission check, so it only ever sees commands that were already going to run.
My script is a list of six program names. A skill that calls node or python and opens a socket from there walks straight past it. Real protection is restricting what the shell can reach on the network. This is a tripwire that catches the lazy case and tells you which skill tripped it.
It does nothing for door one. The sentence that started all this was plain English addressed to the model, and no pattern match finds a politely worded instruction. For that door the defences are the ones you already have: permission prompts you actually read, and not running with permissions bypassed around skills you have not read.
And the limits of what I did: I tested in print mode only, in one folder, on 2.1.332. My grep found READMEs before it found anything in a skill, which tells you how blunt it is. I have not installed or run the Convex plugin. Everything I say about it comes from the issue, the diff and the replies on it.
Questions people are asking
Are Claude Code skills safe?
A skill is as safe as its author and whatever it downloads. It is a Markdown file of instructions for the model, and it can also carry shell commands that run while it loads and a line that pre-approves tools. Skills from the official marketplace are pinned to a commit, but a pin does not cover scripts a skill fetches at run time. Read the file before you install it.
What is the PreSkillShellCommand hook?
PreSkillShellCommand is a Claude Code hook event, added in version 2.1.332, that runs before a shell command injected by a skill or slash command executes during loading. Your script receives the command and the skill's name, and can refuse it by exiting with code 2. It can only block. It cannot approve or change a command.
What are Claude Code hooks?
Hooks are your own scripts that Claude Code runs at fixed points, such as before a tool call, after one, or when a session starts. A hook receives JSON on stdin describing the event and can allow it, block it or add context. They are how you enforce rules that should not depend on the model remembering them.
Where are Claude Code hooks stored?
In settings files. ~/.claude/settings.json applies to all your projects, .claude/settings.json to one project and can be committed, and .claude/settings.local.json to one project on your machine only. Organisations can set hooks in managed policy settings, plugins can bundle them, and skills and subagents can define them in frontmatter.
What does allowed-tools do in a Claude Code skill?
allowed-tools is a frontmatter field that pre-approves the listed tools for the turn in which the skill is invoked, so they run without a permission prompt. It also lets the skill's own injected commands pass the permission check. Claude Code applies it for project skills even in a print-mode run in a folder you have never trusted.
How do I check a Claude Code skill before installing it?
Open its SKILL.md and search for three things: curl or wget, an allowed-tools line that includes Bash, and an exclamation mark followed by a backtick, which marks a command that runs on load. Then look for scripts the skill downloads when it runs, because those can change after you have reviewed it.
Sources
- Issue #64: Quickstart skills send the user's idea to a convex.site host and run remote scripts, convex/convex-backend-skill on GitHub
- Commit 51b4e65, plugin 1.18.0 to 1.18.1, convex/convex-backend-skill on GitHub
- Claude Code v2.1.332 release notes, anthropics/claude-code on GitHub
- Hooks reference: PreSkillShellCommand, Claude Code docs
- Skills: permission checks on injected commands, Claude Code docs
- Hacker News discussion
More Posts
I asked Cloudflare's docs about sourdough and got a perfect match
Cloudflare's new search endpoint for agents, tried with curl: GET, the new QUERY method, what comes back, why every score is 1.000, and who pays for it.
The policy that locked four doors and left the fifth open
Card skimmers on five store sites moved data over WebRTC. I tested a strict CSP locally: four requests blocked, the data channel untouched.
Two services, one topic, either deploy order
A shared topic is only safe if the old consumer ignores what the new producer adds. One field with a default, and either side can roll back alone.