Pretext: Defeating Malicious Skill Detection Frameworks for AI Agents

Tobias Kaiser, Aritra Dhar
9/30/2026
cs.CRcs.AI

No confident code implementation found for this paper.

Abstract

Skills extend an agent's capabilities by injecting instructions and information into the context, and are widely used by agents such as OpenClaw and Claude Code. Prior work shows third-party marketplaces host malicious skills that give attackers direct influence over the victim's agent.

Show full abstract

The emerging defense scans skills before installation, pairing deterministic static checks with an LLM-based semantic judge, as in NVIDIA's SkillSpector. We show that such defenses fall to an attacker who knows the detector. Our white-box LLM attacker, Pretext, iteratively crafts skills that evade detection while still delivering the payload and performing the benign task: moving the payload from code into natural language leaves static analysis inert, while framing it as the skill's legitimate purpose and splitting instructions across files keeps the LLM stage below its blocking threshold. Across three open-source models, Pretext achieves up to 97\% and 77\% against a frozen detector and a co-adaptive one, respectively, revealing major gaps in current skill scanners.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{kaiser2026pretext,
  title  = {Pretext: Defeating Malicious Skill Detection Frameworks for AI Agents},
  author = {Tobias Kaiser and Aritra Dhar},
  year   = {2026},
  eprint = {2609.39607},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.39607v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.39607.svg)](https://codeofpaper.com/paper/2609.39607)

Discussion