Skill-augmented agents load reusable skills as persistent context, which improves task performance but also gives malicious skills a durable channel to influence future actions. A new paper, accepted at NeurIPS 2026, argues that such skills can leak secrets, corrupt code, bypass approvals, or stage data for exfiltration only after a user task and workspace state make the unsafe action seem useful. Because of that, the authors say, static vetting at install time is insufficient and protection must happen at runtime, conditioned on the task.
The proposed paradigm, Defense-as-Skill, turns the guard itself into an installable, inspectable, and editable skill. Their 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 the setting, the authors built SCOPE-R, a task-conditioned dataset covering 6 risk families and 21 sub-categories, with 206 attack-confirmed malicious instances and 43 benign tasks.
They then improved SkillSonar using runtime guard-skill evolution, a Monte-Carlo Tree Search procedure that evolves the on-disk guard skill from rollout feedback. Across Claude Code and OpenClaw, the evolved guard substantially reduced attack success while maintaining a favorable safety-utility trade-off. On repeated GLM-5 runs, in-distribution attack success dropped from 0.482 to 0.104 and out-of-distribution attack success from 0.606 to 0.115, with gains transferring across victim models, held-out risk families, and external benchmarks. The results position runtime guards as skill-native, transparent, and evolvable policy artifacts for skill-augmented agents.