StealthyPoison changes a skill decision rule and keeps it running; SkillSpector flagged 0.7 percent of payloads. Pin skills by hash and test boundary cases you trust.
An attack that leaves the skill working
Agent skills are packages of procedure: a SKILL.md file with instructions, sometimes reference material and scripts. Agents retrieve them from registries and follow them. Earlier attacks on skills added something visibly wrong: an instruction to exfiltrate data, an extra script, an action outside the advertised task. Scanners look for exactly those signs.
On 9 November 2026 Jingfen Qiao, Rui Li, Shuaiqun Pan, Olga Gadyatskaya, Andrew Yates and Evangelos Kanoulas posted "StealthyPoison: Manipulating LLM Agent Behavior through Procedural Poisoning of Third-Party Skills" (arXiv 2611.12155v1). Their attack adds nothing. It changes a skill's decision-critical rules, such as a formula, a constant, a threshold or a boundary condition, while keeping its advertised task, its interface and its normal execution. The poisoned skill still runs without errors. It just gets the answer wrong.
This article summarises what the paper measured, why package scanning misses it, and how to defend with behaviour: pin skills by content, and run known-answer tests from a reference you trust before enabling one. A browser lab lets you see how the design of an acceptance suite changes the chance of catching a corrupted rule.
How the attack is built
The attacker has a public target skill and the public registry, but no access to real user requests or their correct answers. StealthyPoison works around that in two stages.
- Payload construction. A model generates synthetic requests that cover the skill's documented functions. A surrogate agent runs the clean skill on them to produce pseudo-references. An attack agent then edits decision-critical rules, a critic agent checks that the edited skill still executes and keeps its task and interface, and the loop keeps the edit that changes the most answers. Edits are confined to the instructions; metadata and bundled artifacts stay unchanged, and the rewritten document must not contain warnings that reveal the manipulation.
- Metadata augmentation. Separately, a model writes 20 plausible requests for the skill, and they are appended to its retrieval keywords so that the poisoned copy is retrieved and selected more often. This needs no feedback from the victim's retriever.
The evaluation used SRA-Bench: 566 eligible target skills, 5,244 requests, and a registry of 26,262 skills for the poisoned copies to compete against.
What it measured
The poisoned procedures transfer. With the skill delivered directly (no retrieval), the frozen payloads produced wrong answers on held-out requests in 32.9 percent of cases for the surrogate model, Qwen3-Coder-30B, and 31.0 to 31.9 percent for Llama-3.3-70B, Mistral-Small-24B and GPT-OSS-20B. Vulnerability varied a lot by task family: 62.2 percent on MedCalc, a medical calculation benchmark, and 7.5 percent on BigCode for the surrogate.
They reach real workflows. In a Claude Code workflow with Opus 4.8 selecting from the top 20 retrieved skills over 720 sampled queries, a poisoned skill appeared in the top 20 for 73.2 percent of queries, was selected for 49.4 percent, and produced an end-to-end wrong answer for 10.1 percent; 38.3 percent on MedCalc.
They get past scanners. Overall detection rates on poisoned packages were 0.7 percent for SkillSpector in static mode, 0.4 percent for Cisco Skill Scanner's non-LLM analyzers, 0 for VirusTotal, and 45.8 percent for GPT-5.4-mini as a semantic judge. The same detectors flagged 50.0 percent and 93.1 percent of overtly malicious SkillJect packages. The authors note that the scanners were not run in their full recommended LLM-enabled configurations.
Better selectors do not fix it. Five of seven skill selectors that reranked the retrieved candidates increased poisoned-skill placement, and stronger selectors were not consistently more robust.
The paper's conclusion is the useful part: package-level screening "cannot reliably distinguish subtle poisoning from an ordinary implementation error without a trusted behavioral reference", and defending against procedural poisoning "requires behavioral validation, such as testing candidate skills on reference requests or comparing their outputs with trusted implementations".
Defence one: pin what you reviewed
The first control is mundane. Do not let an agent fetch the latest version of a third-party skill at run time. Review a version, record its content hash (every file, not only SKILL.md), and load only that hash. A registry entry that changes, or a look-alike entry with better keywords, then cannot replace the skill you tested. In the companion, changing the return window from 30 to 33 days in the skill text gives a different SHA-256 hash, so a loader that checks the pin refuses the file.
Pinning does not tell you whether the version you pinned is honest. It makes sure that whatever you tested is what runs.
Defence two: known answers from a reference you own
The second control tests behaviour. Before enabling a skill, run it on cases whose correct answers you know from a source you trust: your own policy table, a reference implementation, a published formula with worked examples. Compare every answer.
The source of the expected answers is the whole point. If you generate expected answers by running the downloaded skill, the test can never disagree with it. The companion's window_3_self_reference preset does exactly that and catches nothing in 200 trials, whatever the suite.
Which cases you choose matters almost as much. The companion's skill is a returns-and-refund procedure for Belgavi's Book Store with five ordered rules: deny returns after a 30-day window, deny customer damage, send orders above 2,000 for inspection, refund opened items at a partial rate after 14 days, otherwise refund in full. The poisoned copy moves the window from 30 to 33 days, a change that affects about 1.56 percent of synthetic traffic.
| Suite | Cases | Trials that caught the poison |
|---|---|---|
| Random cases drawn like traffic | 50 | 104 of 200 (0.52) |
| Random cases drawn like traffic | 300 | 197 of 200 (0.985) |
| One mid-range case per decision branch | 5 | 0 of 200 |
| Boundary cases at each documented threshold | 13 | 200 of 200 |
Random cases catch the poison only when the suite is large enough to stumble into the changed region; with 50 cases it is a coin flip. Branch cases, one comfortable example per outcome, never touch the boundary and never catch it. Thirteen boundary cases, the threshold minus one, the threshold and the threshold plus one for each rule plus one case per damage cause, catch it every time.
Boundary cases are not a complete answer either. A poison that changes a branch rather than a threshold needs cases inside that branch. The companion's damage poison denies carrier-damaged returns in the last days of the window; five branch cases miss it, while the 13 boundary cases, which include carrier damage on the last day of the window, catch it. The lesson generalises: write cases where the rules can disagree, and derive them from the rule table, not from typical traffic.
The acceptance procedure
- Extract the decision rules the skill claims to implement: thresholds, formulas, branch conditions.
- Write the reference for those rules yourself, or take it from an authoritative source. For a medical or financial formula, use the published one with its worked examples.
- Generate boundary and branch cases from the reference, plus a random sample of realistic inputs.
- Run the pinned skill through the agent, the same way production will, and compare answers to the reference.
- Enable only on full agreement, record the hash, the suite and the results, and rerun the suite whenever the hash would change.
Run step 4 with your production model. The paper's poisoned procedures transferred across models, but the rate at which a model follows a subtly wrong rule still varies.
What this does not cover
Known-answer tests only check rules you can state. Skills whose value is judgement, such as summarising or drafting, need different checks. Testing also does not address the retrieval side of the attack: if your agent selects skills dynamically from an open registry, a poisoned look-alike can win selection for requests you never tested. The strongest position is a curated, pinned set of skills, each with an acceptance suite, and no run-time selection from public registries for tasks that move money or make decisions about people.
Limits
The lab and companion are a toy procedure with five rules and a synthetic traffic mix. They show how test design changes detection; they do not reproduce the paper's attack, benchmarks or numbers. The paper's results are for its benchmark, models, retrievers and scanner configurations, measured by the authors; they were not reproduced here.
Interactive experiment
Poisoned skill rules: known-answer tests, boundary cases and detection. Synthetic browser-local fixtures, adjustable inputs, decision traces and JSON export.