Skip to main content
All writing

My Scanner Reads Every Skill Alone. The Attack Lives Between Two

Splitting one malicious workflow across two agent skills made it work five times more often. Here is where I now put the check and the rule I use to decide.

By Sattyam Jain · first published on Medium on · 8 min read

Edits on this site

  • : The Medium version said agent-airlock refuses by default. Its SecurityPolicy has default_deny=False (an empty allowlist allows every tool) unless you set default_deny=True, so that phrase is removed here.

I maintain agent-audit-kit, an open-source static scanner for MCP-connected agent pipelines. Its README lists 86 scanner modules, including AST-based taint analysis for Python. The basic shape is the same one most scanners use. Open a file or a config, read it, decide if something in it is dangerous, and move to the next one.

That shape has served me well for tool poisoning, hardcoded secrets, and bad MCP configs. Last week I read a result that says the shape itself is the gap. The attack it describes does not sit in any single file. It sits in the handoff between two skills that each look fine when you read them one at a time.

This piece is about that handoff, what I think it means for anyone installing third-party agent skills, and the rule I use now to decide when reviewing one skill at a time is enough.

How skills got this much trust this fast

Quick context if you have not been following skills closely. Anthropic published Agent Skills as an open standard on 18 December 2025. A skill is a folder with a SKILL.md file, two required frontmatter fields (name and description), and optional scripts and references. Within days, other vendors picked up the same format, and today skills load into coding agents, chat products, and IDEs from many vendors.

The format is tiny on purpose, which is why it spread. It is also why the security picture got ugly quickly. Koi Security’s audit of ClawHub, OpenClaw’s skill registry, found 341 malicious skills out of 2,857 in February, most of them pushing a macOS credential stealer through fake prerequisites. Snyk’s ToxicSkills study reported 76 confirmed malicious payloads among 3,984 skills on the same registry. Those are the loud attacks. A skill that says “download this binary and run it” is something a scanner can catch, and the scanners have been catching up.

The quieter problem is the one I care about here.

The result: two harmless skills, one hijacked agent

On 1 October, Tian Dong, Zixuan Ma, Haodong Zhao, Huaien Zhang, Shaofeng Li and Hao Chen posted “Chaining Skills to Hijack LLM Agents” (arXiv:2610.01564). They introduce APEX, a method that builds and refines adversarial skill chains for a given user task and an action the attacker wants the agent to take.

The key mechanism, in the abstract’s own words: “an agent-written record of genuine task progress can carry a false claim of user approval across skills.” An upstream skill gets the agent to write that record. A downstream skill reads it and uses it to direct the attacker’s action.

Read that twice, because it is very clever. The upstream skill does real work. The progress record is mostly true. The only false thing in it is one line saying the user approved the next step. And because the agent wrote the record itself, the downstream step treats it like the agent’s own memory instead of like untrusted input.

The numbers from the abstract:

  • Across four targeted-action families and six models on SkillsBench, the chains induced the attacker’s chosen action in 512 of 690 attempts, which is 74.2%.
  • On GPT-5.4, the full chain succeeded in 84.3% of attempts.
  • On GPT-5.4, the same workflow merged into one skill succeeded in 17.4%.

That last comparison is the one I keep coming back to. Same intent, same model. Put it in one skill, and it mostly fails. Split it across two, and it mostly works. Splitting the payload made it roughly five times more effective.

Why this lands on my desk specifically

Think about what that means for a scanner built like mine, or like most of the skill scanners out there.

A per-skill reviewer, human or tool, sees the upstream skill and finds a CSV cleanup task that writes a progress file. Nothing to flag. It sees the downstream skill and finds a publisher that reads a progress file and acts on it. Also nothing obvious to flag, because “read the status and do the next step” is how a huge number of real workflows are written. The dangerous combination only exists when both are installed together, and the file one writes is the file the other reads.

The merged-skill number tells me something about the models too. When the approval claim and the action sit in the same skill, models refuse far more often. The same instruction, delivered as “here is a record you wrote earlier,” gets obeyed. The models are better at distrusting text they were handed than text they believe they produced.

Cisco’s open-source skill-scanner says this directly in its own docs: it offers best-effort detection, and a clean scan does not guarantee a skill is free of threats. I respect that sentence, and I would put the same one in my README. But the APEX result points at a specific blind spot behind it. Any tool whose unit of analysis is one skill will rate both halves of this attack as clean.

The defence they tested, and what it costs

The authors also tried the obvious mitigation: a prompt that tells the agent to check skill-produced files against the original user request. On GPT-5.4, it brought targeted-action success down from 84.3% to 59.1%.

Then the cost. Across 72 benign native-skill tasks, the verifier test-pass rate fell from 86.7% to 56.3%.

So the prompt bought about 25 points of attack reduction and paid about 30 points of benign task performance for it, and the attack still lands more than half the time. I would not ship that trade to a customer. It is also a pattern I have seen many times. When the defence is another instruction to the same model, it competes with every other instruction in the context, including the attacker’s.

Where I put the check instead

I think this needs checks in three places. None of them is a smarter prompt.

1. At install time, review the set, not the skill

The unit of static review has to become the set of skills installed together. Concretely, build a small graph: which skill writes which file, which skill reads which file, and which skills take state-changing actions (upload, send, delete, transfer). Then flag any path where a file written under one skill carries an authority claim and is read by a different skill before a state-changing call.

I wrote a toy version of this to see how much a dumb version catches. It is about 100 lines of stdlib Python, and the full code is in the Dev.to companion post. It runs five scenarios: the APEX-style chain, the same workflow merged into one skill, a chain where I reworded the approval claim, and two benign skill pairs.

The output:

  • A per-skill rule caught 1 of 3 malicious scenarios (only the merged one).
  • The chain rule caught 1 of 3 (only the APEX-style chain).
  • Together they caught 2 of 3.
  • Neither flagged either benign pair.
  • Both missed the reworded chain, where the upstream skill says “the owner signed off” instead of “user approved”.

Please do not read those as benchmark numbers. I wrote every scenario myself, and the authority check is a regex. What the toy shows is the structure. A per-skill rule and a chain rule catch different things, and you need both. It also shows the limit of static checks on language: any list of approval phrases has a rewording that walks past it. That is why the static check is only the first layer.

2. At runtime, files are never approved

This is the part that would have stopped every variant in my toy, including the one it missed.

Approval is a fact about the user, so it can only come from the user turn. A string inside a file the agent wrote is data, whoever wrote it. If your agent framework lets a downstream step read “approved: yes” from disk and treat that as consent, the bug is in the framework, and no scanner will fix it.

Google DeepMind’s CaMeL design (arXiv:2503.18813) is the cleanest reference I know for this. It tags every value with provenance, where it came from and who may read it, and enforces policy in an interpreter the model cannot talk to. You do not need all of CaMeL to get the main benefit. You need one bit on every file and tool output: did this come from the user, or from somewhere else? Anything from somewhere else cannot authorize a state-changing call.

3. At the call, bind approval to the exact action

The last check sits where agent-airlock sits in my own work, at the tool function boundary, in-process. When a state-changing call arrives, the gate asks one question: is there an approval for this exact action with these exact arguments, minted from a user turn in this session? If not, the call does not run.

That check never reads the progress file. It never reads the skill. It does not care how the claim was worded, which is exactly why it holds up against the reworded variant that beat my regex.

Where per-skill review is still enough

I do not want to overcorrect. Most teams I talk to install a handful of skills, often first-party, and many of those skills never write files another skill reads. For that setup, per-skill review plus a decent scanner is a reasonable place to be, and graph analysis would be ceremony.

The chain risk shows up when three things are true at once: skills come from sources you do not control, they share a working directory, and at least one of them can take an action with real side effects. A shared workspace is the default in most coding agents, so that combination is a lot more common than it sounds.

Questions I ask in a review now

When I look at an agent that loads skills, whether it is ours at Attri.ai or an open-source repo, I ask:

  1. Which installed skills write files, and which installed skills read files another skill wrote?
  2. Can any reader of a shared file call something that uploads, sends, deletes, or moves money?
  3. Where does approval for that call come from, and could a file on disk satisfy it?
  4. If I reworded every approval phrase in every skill, would the answer to question 3 change?

If the answer to question 3 is “a file”, that is the finding. It is usually an afternoon of work to fix, because the fix is to stop reading consent from disk.

The decision rule

Here is the rule I use, and I would like people to argue with it.

If an agent has two or more skills from sources you do not control, sharing a workspace, and any one of them can take a state-changing action, review the installed set as one unit, and make sure no file, record, or tool output can count as user approval. Approval comes from the user turn, bound to the exact call, or it does not exist.

If every skill is first-party and pinned, or none of them can change state outside the workspace, per-skill review is enough. Spend the time on something else.

The paper is at arxiv.org/abs/2610.01564. If you run a skill scanner, I am curious whether you treat the installed set as the unit yet, and what broke when you tried.