Skip to content

Pretext: Defeating Malicious Skill Detection Frameworks for AI Agents

Sep 2026 · arXiv.org · Vol abs/2609.39607 · 0 citations · 23 references
Computer Science

TL;DR

A 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, and splitting instructions across files keeps the LLM stage below its blocking threshold.

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. 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 source

Similar papers

Preprint Nov 2026

The Devil Wears Markdown: Detecting Malicious Intent Hidden in AI Agent Skill Instructions through Hybrid Static, Dynamic, and Agentic Analysis

Agentic AI ecosystems increasingly rely on reusable agent skills that combine executable code, natural-language instructions, configuration artifacts, and external tool integrations. These hybrid artifacts create software supply-chain risks because malicious intent may be distributed across instructions, code, metadata...

Thanh M. Truong-Le, Amber Bennoui, H. Nguyen et al. · 0 citations
#artificial intelligence Review Oct 2026

SkillScreen: High-Recall Screening of Malicious Agent Skills with Decision Models

Agent skills turn natural-language instructions into actions, creating a security challenge: legitimate automation and malicious behaviour can look deceptively similar. A practical screen must catch nearly every attack while keeping the review load manageable. We present SkillScreen, a compact decision model trained to...

Jerrold Huang, Jun-Wei Quan, Saiyue Lyu et al. · 2 citations
#artificial intelligence Preprint Oct 2026

Beyond Maliciousness: Static and Runtime Attack-Surface Profiling of Agent Skills

Agent skills are Markdown documents that a tool-using agent reads as instructions and then acts on with the privileges of the session that loaded them. Installing one grants authority (the standing to direct the agent, not new privilege), and the size of that grant is what we measure. We present a two-phase attack-surf...

Ratnesh Pandey, Japneet Singh, Harsh Akshit et al. · 0 citations
Review Oct 2026

From Instructions to Exploits: Applying Program Analysis to Malicious Agent Skills Across Natural Language and Code

The Supply-Chain Scanner for Agent Skills (SCS) is presented, a static analysis framework that unifies instructions and code for security analysis that achieves the highest average accuracy, recall, and F1-score among evaluated methods across five LLMs.

Shi-Wu Zhao, Bai-Zhu Wang, Guo-Qiang Zheng et al. · 0 citations
#artificial intelligence Preprint Nov 2026

RuntimeTickets: Source-Grounded Security Obligations for Agent Skills

Third-party Agent Skills extend what an autonomous agent can do, but a malicious Skill can hide data exposure or output manipulation inside a legitimate workflow. Neither reading a Skill's description nor granting it tool permissions tells whether its execution meets the user's security requirements. We introduce Runti...

Kui-Yi Gao, Xue Liu, Bo-Wei He · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.