AI agents increasingly rely on reusable "skills" that bundle instructions, code, and resources. During execution, these skills may create or modify persistent artifacts—files, configurations, cached data—that later skills reuse in future sessions. The authors of a new arXiv paper argue that this cross-session reuse introduces a largely unexplored attack surface: an attacker who controls or influences one skill's outputs can poison artifacts to manipulate subsequent executions.

The paper characterizes three attack mechanisms: Instruction Propagation, where malicious instructions are embedded in artifacts; Data Boundary Violation, where one skill's data leaks into another's context; and Evidence Poisoning, where cached results are tampered with to mislead later reasoning. To test real-world susceptibility, the authors built SkillRelayBench, a benchmark of 270 adversarial cases spanning 30 cross-session skill-composition scenarios across ten domains. Evaluating seven models across Codex CLI, Gemini CLI, and Claude Code, they found attack success rates between 46.7% and 77.4%, with successful attack chains covering all five target security consequence categories.

As a countermeasure, the authors propose SkillRelayGuard, which restores artifact provenance context and gives agents a pre-execution advisory review while leaving the final decision to the agent. Across three agent settings, SkillRelayGuard reduced overall attack success from 69.5% to 10.9% and attack chain success from 54.8% to 10.0%, while increasing legitimate task completion from 79.6% to 87.5%. The results suggest that provenance-aware safeguards can mitigate cross-session risks without fully removing agent autonomy.