# Defense-as-Skill: Evolving Runtime Guard Skill for Skill-Augmented Agents

DevFeed: [Defense-as-Skill: Evolving Runtime Guard Skill for Skill-Augmented Agents](<https://devfeed.tech/articles/defense-as-skill-evolving-runtime-guard-skill-for-skill-augmented-agents-101357.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2609.01487>)

Author: Xiaofang Yang, Ziqi Miao, Chen Qian, Dianbo Sui, Jing Shao, Lijun Li

Published: 2026-10-27T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Cryptography and Security](<https://devfeed.tech/sources/arxiv-cryptography-and-security.md>)

Topics: [Agent Skills](<https://devfeed.tech/topics/agent-skills.md>), [monte carlo tree search](<https://devfeed.tech/topics/monte-carlo-tree-search.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [attack](<https://devfeed.tech/tags/attack.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [bypass](<https://devfeed.tech/tags/bypass.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [code](<https://devfeed.tech/tags/code.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cr](<https://devfeed.tech/tags/cs-cr.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [defense](<https://devfeed.tech/tags/defense.md>), [evolution](<https://devfeed.tech/tags/evolution.md>), [exfiltration](<https://devfeed.tech/tags/exfiltration.md>), [external](<https://devfeed.tech/tags/external.md>), [feedback](<https://devfeed.tech/tags/feedback.md>), [glm](<https://devfeed.tech/tags/glm.md>), [guards](<https://devfeed.tech/tags/guards.md>), [id](<https://devfeed.tech/tags/id.md>), [monte-carlo](<https://devfeed.tech/tags/monte-carlo.md>), [monte-carlo-tree-search](<https://devfeed.tech/tags/monte-carlo-tree-search.md>), [native](<https://devfeed.tech/tags/native.md>), [runtime](<https://devfeed.tech/tags/runtime.md>)

## AI overview

SkillSonar is a runtime guard implemented as an installable, inspectable skill that checks sensitive actions from other skills against the user's task boundary and chooses to allow, replan, or request confirmation, without changing the agent runtime. The authors evolve the on-disk guard using Monte-Carlo Tree Search and rollout feedback. On SCOPE-R, which covers six risk families and 21 subcategories, repeated GLM-5 runs report attack success rates falling from 0.482 to 0.104 in-distribution and from 0.606 to 0.115 out-of-distribution. The abstract reports evaluation across Claude Code and OpenClaw, with gains transferring to other victim models, held-out risk families, and external benchmarks; it does not provide further methodological or comparative detail here.

## Source excerpt

arXiv:2609.01487v3 Announce Type: replace Abstract: Skill-augmented agents load reusable skills as persistent runtime context, improving task performance but also giving malicious skills a durable channel for steering future actions. Such skills may leak secrets, corrupt code, bypass approvals, or stage data for exfiltration only after a concrete user task and workspace state make the unsafe action appear useful. This makes pre-install vetting insufficient and calls for runtime, task-conditioned protection. We propose Defense-as-Skill, a defense paradigm that implements the runtime guard itself as an installable, inspectable, and editable skill. Our guard, SkillSonar, runs alongside untrusted task skills and checks sensitive actions against the user's task boundary, routing each action to an allow, replan, or confirmation decision without modifying the underlying agent runtime. To study this setting, we construct SCOPE-R, a task-conditioned dataset covering 6 risk families and 21 sub-categories, with 206 attack-confirmed malicious instances and 43 benign tasks. We then improve SkillSonar on the SCOPE-R training subset using runtime guard-skill evolution, a Monte-Carlo Tree Search procedure that evolves the on-disk guard skill from feedback on the rollouts. Across Claude Code and OpenClaw, the evolved guard substantially reduces attack success while maintaining a favorable safety-utility trade-off; on repeated GLM-5 runs, ID ASR drops from 0.482 to 0.104 and OOD ASR from 0.606 to 0.115, with gains transferring across victim models, held-out risk families, and external benchmarks. These results show that runtime guards can be skill-native, transparent, and evolvable policy artifacts for skill-augmented agents.