Ai skill combinations expose new security risks in agent workflows

Detecting Insecure Compositions of Clean Agent Skills via Capability-Flow Graph Analysis

Cryptography and Security

Summary

Artificial intelligence agents often work by using small programs called skills. Each skill on its own is safe, but when these skills pass information between each other, they can unintentionally create security problems. The authors developed a tool called KnotScryer that maps how information flows between these skills to find unsafe chains before they cause harm. This approach finds problems that previous methods, which only look at individual skills, would miss.

What this means in practice

  • For ai platform developers: Inspect and prevent unsafe skill interactions in AI agent workflows to improve overall security before deployment.
  • For cybersecurity teams: Detect complex security risks arising from the interaction of safe AI skills, reducing overlooked vulnerabilities in deployed agents.

Authors

Yihao Li, Chuanpu Fu, Yizhou Zhao, Miao Chen, Qi Li, Ke Xu

Abstract

AI agents increasingly extend their capabilities by invoking third-party skills, where each skill encapsulates instructions, scripts, and resources for agents to execute on demand. This paper reveals that deploying many benign skills together introduces compositional security risks: multiple individually clean skills can compose into safety-violation chains, because the agent passes an upstream skill's output to a downstream skill's input across invocations. The risk arises not from any single skill, but from the agent's runtime orchestration, and thus cannot be captured by existing malicious skill detection methods. To this end, we develop KnotScryer to detect insecure skill compositions by treating skills as typed capability flows. In particular, we abstract each skill into a capability summary, and construct the Skill Capability-Flow Graph (SCFG), where edges denote cross-skill information flow. Moreover, we design a search policy that tracks protected or untrusted data along handoff edges to locate paths reaching insecure operations. Finally, a two-layer verification method replays the insecure information flow for reachability analysis and applies a task-anchored LLM chain audit to confirm the semantic plausibility of the identified violation chains. We deploy KnotScryer to analyze 13,598 clean skills from ClawHub, and validate the detected chains across three agent frameworks and three LLMs. KnotScryer identifies 612 insecure compositions, which are consistently exploited across agent frameworks. Meanwhile, under GLM-5.1, it outperforms tag-match and graph-only baselines by improving the exploitation rate from 16.5%-18.2% to 85.6%, while reducing the search space by 85.3%. Furthermore, 13.7% of the detected chains consist entirely of skills labeled safe by a single-skill scanner, showing that KnotScryer effectively identifies insecure compositions that per-skill auditing cannot.