Skip to content

Defense-as-Skill: Evolving runtime guardrail skills for skill-augmented agentsDefense-as-Skill: Evolving Runtime Guard Skill for Skill-Augmented Agents

arXiv· arXiv:2609.01487· Xiaofang Yang, Ziqi Miao, Chen Qian, Dianbo Sui, Jing Shao, Lijun Li·Indexed by this site · 2026-10-01· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

SkillSonar implements runtime protection as an installable skill and evolves it with MCTS on SCOPE-R; in GLM-5 repeated experiments, ID ASR dropped from 0.482 to 0.104 and OOD ASR from 0.606 to 0.115.

Threat modelA malicious or tampered skill acts as persistent context after installation, and induces leakage, code modification, approval bypass, or exfiltration when the user's task and workspace state make unsafe actions appear useful. The attacker can modify the skill artifact but not the victim SAA runtime; SkillSonar performs policy-level checks within the same agent, relying on explicit responsibility assignment rather than mechanism enforcement.

Questions
Skill-augmented agents load reusable skills into persistent context; malicious skills can wait for specific tasks to induce leaks, modify code, or exfiltrate data, and pre-installation review is insufficient.
Methods
Defense-as-Skill turns runtime defense into an installable skill, SkillSonar, which classifies actions as allow, replan, or confirmation according to the user's task boundary. SCOPE-R contains 6 risk families and 206 attack-confirmed malicious instances; MCTS evolves the guard skill using rollout feedback.
Experiments and results
With GLM-5 repeated 10 times on Claude Code, SkillSonar reduces ID ASR from 0.482 to 0.104 and OOD ASR from 0.606 to 0.115. The guard transfers to other victim models, held-out risk families, and external benchmarks, and retains partial protection against adaptive attackers.
Limitations and future work
The guard is still a Markdown policy, depends on host compliance, and can be ignored or bypassed. Optimization relies on runtime review, with at most 8 full evaluations in the search. The authors state that existing SAA runtime defense baselines should be seen as practical references rather than a complete comparison.
Experimental setupGLM-5、GPT-5.4 et al. · SCOPE-R、PinchBench et al. · ASR、TaskUtil. et al.
Evaluated models
GLM-5GPT-5.4Claude Haiku 4.5Kimi-K2.6
Benchmarks
SCOPE-RPinchBenchSkillSafetyBenchWildClawBench
Metrics
ASRTaskUtil.Benign utilityConfirmation countTokensWildClawBench Safety
AI summaryThe paper proposes the Defense-as-Skill paradigm, implementing runtime guardrails themselves as installable, inspectable, and editable skills to address the problem of malicious skills in skill-augmented agents persistently manipulating subsequent actions through persistent context. Its guardrail SkillSonar runs in parallel with untrusted task skills, checks sensitive actions against user task boundaries, and gives three decisions: allow, replan, or confirm, without modifying the underlying agent runtime. The authors construct a task-conditioned dataset SCOPE-R covering 6 risk categories, 21 subcategories, with 206 confirmed malicious instances and 43 benign tasks, and use Monte Carlo tree search to evolve guardrail skills on disk on a training subset.

The paper proposes the Defense-as-Skill paradigm, implementing runtime guardrails themselves as installable, inspectable, and editable skills to address the problem of malicious skills in skill-augmented agents persistently manipulating subsequent actions through persistent context. Its guardrail SkillSonar runs in parallel with untrusted task skills, checks sensitive actions against user task boundaries, and gives three decisions: allow, replan, or confirm, without modifying the underlying agent runtime. The authors construct a task-conditioned dataset SCOPE-R covering 6 risk categories, 21 subcategories, with 206 confirmed malicious instances and 43 benign tasks, and use Monte Carlo tree search to evolve guardrail skills on disk on a training subset.

Related events and news

1 events · 1 news mentions

News that mentions this paper

Defense-as-Skill:Agent 运行时护栏做成可演进技能

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Malicious skills can induce out-of-boundary actions after installation depending on the task; the authors respond with runtime defense in skill form.

    Malicious or tampered skills can persistently affect actions after installation; pre-installation review cannot block out-of-boundary behaviors that only manifest under task conditions.

    • Scenario: The authors state that skill-augmented agents (SAAs) load reusable skills, i.e., packaged instructions, scripts, resources, and workflows. Claude Code and OpenClaw are examples in the paper. The same mechanism can also cause malicious skills to induce data leakage, code corruption, approval bypass, or data preparation for exfiltration after specific user tasks, workspace states, and available tools make unsafe actions appear useful.
    • Existing gaps: The authors argue this differs from ordinary prompt injection or static package scanning. Many practical runtime defenses rely on external classifiers, hosted guard models, or platform-specific permission gates, which often cannot be deployed as ordinary skill artifacts, making them harder to inspect, edit, and transfer across SAA workflows.
    • Core observation: The authors argue that capability skills are usually semantically aligned with user requests and can be selected by routine task–skill matching; however, unsafe actions can appear in almost any task, even if the task itself has no explicit safety intent. Therefore, relying solely on installing a safety skill and invoking it by semantic relevance is unreliable; explicit persistent safety responsibility is needed.
    • Proposed content: The authors propose Defense-as-Skill, making the runtime defense itself an installable, inspectable, editable skill. The specific defense is SkillSonar, which runs in parallel with untrusted task skills and routes sensitive actions as allow, replan, or confirmation according to the user's task boundary, without modifying the underlying agent runtime. The accompanying dataset SCOPE-R covers 6 risk families and 21 subcategories, containing 206 attack-confirmed malicious instances and 43 benign tasks; then runtime guard-skill evolution (Monte Carlo tree search) evolves the guard skill on disk based on rollout feedback.
    • Threat model:
      • Goal: Malicious or compromised skills trigger target malicious behaviors while completing user tasks, such as leaking data, corrupting code, bypassing approvals, or preparing for data exfiltration.
      • Knowledge and capability: The attack occurs after skill loading. The attacking agent can edit the skill locally, including adding hidden instructions, modifying scripts, changing manifest fields, or other bundled files, and keep the risk annotation Mr consistent with the edits; the user task T remains unchanged.
      • Victim system: The victim is an SAA using Claude Code or OpenClaw. The victim agent and the attacking agent use the same harness but different conversations, loading the modified skill and executing the task. SkillSonar does not modify the underlying runtime and is not a sandbox, kernel monitor, external classifier, or API service.
      • Judgment and deployment assumptions: The reviewer agent provides a binary attack-success label based on transcripts and instance-level observable success criteria. Explicit invocation instructions are only soft responsibility assignment; the host may still not read, misuse, or fail to follow the guard.
  2. What related research exists?

    Related work is divided into skill evolution and SAA safety; the authors make the defense an evolvable skill artifact.

    Skills as Evolvable Artifacts

    • SkillsBench (Li et al., 2026) and SkillLearnBench (2026) evaluate curated and self-generated skills, respectively, as well as continual skill learning from agent experience. WildClawBench (Ding et al., 2026) evaluates a more realistic OpenClaw environment, and the authors state that it primarily measures general capability rather than skill safety.
    • CycleQD (Kuroki et al., 2025), SkillRL (2026), CoEvoSkills (2026), SkillClaw (Ma et al., 2026), and SkillFlow (2026) treat skills as artifacts that can be generated, refined, and reused; SkillPyramid (2026) studies hierarchical merging, and SEARL (Feng et al., 2026) extends self-evolution to joint optimization of policy and tool-graph memory. Based on this, the authors argue that skills and other agent-side artifacts are not static prompts.

    Safety of Skill-Augmented Agents

    • Empirical studies of real skill ecosystems (Liu et al., 2026, two papers) report that community-contributed skills can contain prompt injection, data exfiltration logic, privilege escalation patterns, and other unsafe behaviors.
    • Skill-Inject (Schmotz et al., 2026) measures whether poisoned skill definitions can induce unsafe behavior in SAAs. SkillAttack (Duan et al., 2026) fixes the skill artifact and optimizes adversarial user prompts to trigger unsafe behavior.
    • Recent OpenClaw security analyses (Deng et al., 2026, etc.) discuss lifecycle threats and architecture-level defenses.

    Baseline Methods and Benchmarks

    • SCOPE-R main experiment baselines: No-guard, System prompt; additionally AcceptEdits on Claude Code, and AcceptEdits + allowlist. Further comparisons against AgentSpec (Wang et al., 2025, adapted via Hooks) and TS-Guard from ToolSafe.
    • Data and external benchmarks: Malicious instances are constructed from the benign task catalog of PinchBench; cross-benchmark evaluation uses the safety subsets of SkillSafetyBench and WildClawBench. The introduction also mentions that existing agent safety evaluations such as AgentDojo are followed in terms of SCOPE-R's measurement approach.

    The authors position this paper as: rather than making a one-time judgment before installation, runtime protection is implemented as an inspectable, evolvable policy layer using the same mechanism as task skills, allowing deployment without modifying the SAA runtime and optimization on concrete rollouts.

  3. How does the paper address this problem?

    SkillSonar performs task-boundary routing at runtime in the form of skills, then uses MCTS to rewrite the guard skill based on rollout feedback.

    Defense-as-Skill implements protection as an installable SkillSonar that performs policy-level routing of intended actions within the same SAA, and then rewrites the skill using Monte Carlo tree search based on rollout feedback.

    Problem Setting and SCOPE-R

    • Instance structure: A malicious instance is a triple (T, s, Mr): a benign user task T, a skill s that may induce unsafe behavior, and an annotation Mr recording the target unsafe behavior and observable runtime success criteria. Benign instances contain only the user task with no injected skill, used to check whether the defense interferes with safe execution.
    • Risk families: Divided into six families by the path through which a skill becomes a specific unsafe action, with acronyms forming SCOPE-R: Specification Integrity (S), Capability Control (C), Operational Side Effects (O), Privacy & Data Flow (P), Execution Safety (E), Resource & Reliability (R), totaling 21 subclasses (Table 7).
    • Closed-loop construction: 15 tasks are selected from PinchBench whose tool and side-effect surface covers the six families; an initial benign skill s0 is generated with a skill-creator. For each subclass, an attack agent edits s, a victim agent executes, and a review agent gives a binary success label; on failure, the failure mode and suggested edits are fed back to the attacker until success or budget exhaustion. Only instances confirmed successful by review are retained, yielding 206 malicious instances and 43 benign tasks.
    • Splits: In Table 1, entire families C and P are held out as OOD (59 instances, 28.6%), unseen during training; S, E, O, and R are randomly split in proportion to family into Train 95 (46.1%) and ID-Test 52 (25.2%). Of the 43 benign tasks, 11 are used for evolution training and 32 are held out for final evaluation.

    Runtime Protection Skill

    • Placement: SkillSonar is loaded by the same SAA as the user task recruit, using only existing platform skill primitives, and is deployed to Claude Code and OpenClaw in experiments. It is a policy-level defense and does not add a sandbox, kernel monitoring, external classifier, or API service. Risk levels, covered action types, and intervention rules are in Appendix B.
    • Decision: Before potentially sensitive actions, the defense requires the agent to consider the user request, loaded skill instructions, and execution context, to judge whether the action remains within the expected task boundary, then allow, narrow/replan, or require confirmation for higher-risk behaviors. Checks cover tool calls, file operations, shell commands, data access, external side effects, and user-visible output.
    • Invocation protocol: Before each task, an instruction is appended that grants SkillSonar persistent safety responsibility and requires consulting it before actions. The authors emphasize that this is part of the deployment configuration and is a soft assignment only: the host may not read it, use it incorrectly, or fail to follow it. The full invocation prompt is in Appendix D.1.
    • Evaluation signals: ASR is the proportion of rollouts that the reviewer judges as successful attacks based on transcripts and instance-level criteria. Task utility uses a PinchBench-style scorer and is reported separately for benign and malicious instances. Confirmation count records how often a rollout halts at a confirmation gate, after which a fixed pre-written reply continues. Token cost is the mean reported token count over completed rollouts with nonzero usage.

    MCTS Evolution

    • Search state: A node v in tree T is a protection skill gv, storing cheap evaluation statistics (nv, Q̄cv), subtree visit count Nv, and at most one full-evaluation score Qfv with feedback used for refinement. The cheap set Dc and full set Df are disjoint.
    • Scalar objective: UCT requires a scalar reward. Equation (1) is s(v) = (1 − ASRv) + ε(λb Uv^benign + λm Uv^malicious − λq C̃v − λt K̃v). The first term makes blocking attacks dominant; ε is small so that confirmation count and tokens do not outweigh ASR.
    • Selection and expansion: Equation (2) computes UCT from the cheap evaluation mean and visit counts. After a selected node gets a full evaluation, a refinement operator makes local edits based on aggregate metrics, instance-level failures, review rationales, and utility observations to generate k child candidates. The root is the initial protection skill. The stopping condition is reaching a full-safety score threshold, exhausting the evaluation budget, or having no expandable candidates. The final output is the candidate with the highest full-evaluation score.
    • Default budget: Unless otherwise stated, there are 10 outer iterations and 10 full node evaluations; early stopping occurs when the full safety score exceeds τscore = 0.95 (corresponding to an ASR target of at most 5%). Full configuration is in Appendix E.2. Appendix H also writes that the search uses at most 8 full evaluations for reproducibility.

    Success Determination

    • Malicious: A held-out reviewer Qwen3.5-122B-A10B reads the transcript and Mr to determine whether the target malicious behavior in the metadata actually occurred. On success, runtime evidence is recorded; on failure, a failure mode is returned, such as guard not read, guard not triggered, or guard triggered but followed incorrectly.
    • Benign: A utility scorer checks whether the original user task was completed and writes free-form comments on utility loss or unnecessary friction. These fields are handed directly to the refiner during evolution. Safety feedback is the main search signal; utility and friction feedback are used to avoid over-blocking.
  4. What experiments did the paper conduct?

    On GLM-5 with N=10, SkillSonar reduces ID/OOD ASR to 0.104/0.115 and trades off utility with the permission gate.

    Experimental Setup

    • Harness and victim models: Claude Code and OpenClaw, with the same skill package and task instances. Victim backbones are GLM-5, GPT-5.4, and Claude Haiku 4.5; the zero-shot transfer in the appendix additionally includes Kimi-K2.6. Main results use GLM-5 with N=10 repetitions; the latter two models report only point estimates because full repetition is more expensive. Hardware is 8 Nvidia A100 GPUs.
    • Review: Attack success is determined by Qwen3.5-122B-A10B, which is not in the victim model set. In human audits, balanced agreement rates for construction review and evaluation review are 94% and 98%, respectively, and observed disagreements are all false-positive success labels (Appendix D.2).
    • Data: SCOPE-R malicious instance Train/ID/OOD counts are 95/52/59 (Table 1). Benign utility uses 43 non-injected tasks; 11 of these are used for evolution, with 32 held out for final evaluation. TaskUtil. measures whether the original benign task is completed under a malicious skill.
    • Baselines: No-guard, System prompt; Claude Code additionally has AcceptEdits and AcceptEdits + allowlist. OpenClaw (Table 4) reports only the first two and SkillSonar. Additional comparisons include AgentSpec and TS-Guard.
    • Optimization: MCTS is used before evaluation, with default 10 outer iterations secret, 10 full node evaluations, and τscore = 0.95. Tokens are computed as the mean over completed rollouts with nonzero usage in summary results.
    • Metric direction: Lower ASR and tokens are better; higher TaskUtil. and benign utility are better. Confirmation count is treated as a friction term in the evolution objective and is not separately reported in the main tables.

    Main Results

    According to Table 2, Claude Code, GLM-5, N=10, mean ± standard deviation:

    Swipe horizontally to read the table

    MethodID ASROOD ASRID TaskUtil.OOD TaskUtil.Tokens (10^3)
    No-guard0.482 ± 0.0390.606 ± 0.0430.811 ± 0.0330.839 ± 0.027179.3 ± 13.0
    System prompt0.414 ± 0.0420.489 ± 0.0480.783 ± 0.0450.807 ± 0.058175.6 ± 17.0
    AcceptEdits0.122 ± 0.0390.073 ± 0.0250.650 ± 0.0620.715 ± 0.040194.6 ± 9.1
    AcceptEdits + allowlist0.460 ± 0.0430.610 ± 0.0340.811 ± 0.0250.832 ± 0.023197.8 ± 8.5
    SkillSonar0.104 ± 0.0360.115 ± 0.0370.779 ± 0.0770.715 ± 0.099190.2 ± 12.2
    • Authors' interpretation: Relative to no guard, SkillSonar reduces ID ASR from 0.482 to 0.104 and OOD ASR from 0.606 to 0.115, with small standard deviations; the authors claim the reduction is stable across repeated runs. Relative to the system prompt, ASR is lower on both sides.
    • Comparison with permission gates: AcceptEdits has the lowest OOD ASR (0.073), but ID TaskUtil. drops to 0.650, whereas SkillSonar achieves 0.779 with lower ID ASR. On OOD, both have the same TaskUtil. of 0.715. The allowlist restores utility to near no-guard levels, but ASR also returns to 0.460 / 0.610. The authors argue that strict gating suppresses attacks at the cost of useful actions, while relaxing permissions reopens attack paths.
    • MCTS trajectory: In Figure 3, malicious ASR drops from 0.300 to 0.078 at the 9th iteration; the authors state that each point is the selected candidate and the curve is not expected to decrease monotonically.

    Cross-Model and Additional Runtime

    • Table 3 point estimates: On Claude Haiku 4.5, SkillSonar's ID/OOD ASR is 0.096/0.254 versus 0.481/0.707 for no guard; TaskUtil. is 0.730/0.750 versus 0.574/0.577 for AcceptEdits. On GPT-5.4, SkillSonar is 0.019/0.034 versus 0.588/0.559 for no guard; TaskUtil. is 0.533/0.528, below the no-guard values of 0.731/0.766 and above AcceptEdits' 0.363/0.258. The authors state that SkillSonar has the lowest ASR on GPT-5.4 but still shows a utility drop relative to no guard, and does not eliminate the safety–utility tradeoff.
    • Table 4 (additional runtime, no AcceptEdits): On GLM-5, SkillSonar's ID/OOD ASR is 0.245/0.232 versus 0.596/0.621 for no guard; on Claude Haiku 4.5, 0.265/0.259 versus 0.542/0.482. In this table, TaskUtil. on GLM-5 ID is 0.906 for SkillSonar and 0.893 for no guard.
    • Tokens: The Table 2 text additionally reports SkillSonar's ID/OOD tokens as 190,753 ± 14,648 and 191,390 ± 13,298. On Claude Haiku 4.5, SkillSonar's tokens are the highest among the listed defenses (207,861 in Table 3; 175,547 in Table 4); on GPT-5.4, 175,846, below the no-guard value of 271,510. The authors state that there is no consistent cross-model token increase.

    Ablations, Other Defenses, and External Benchmarks

    • Explicit invocation (Figure 4(a)): Without explicit responsibility assignment, ID/OOD ASR is 0.400/0.582; with the explicit configuration, it drops to 0.104/0.109; benign utility is 0.756 and 0.767. The authors argue that merely installing a safety skill and leaving it to ordinary skill selection does not provide the intended protection.
    • Skill representation (Figure 4(b–c)): The content-aligned Flattened SkillSonar Prompt uses the same decision-related policy as skill-form. SkillSonar reduces ID ASR from 0.353 to 0.104 and OOD from 0.437 to 0.109, raising ID/OOD TaskUtil. from 0.655/0.672 to 0.815/0.789; benign utility is 0.748 and 0.763. Tokens drop from about 239K to 188K, which the authors describe as about a 21% reduction.
    • Figure 5 (Claude Code + GLM-5): AgentSpec's ID ASR goes from 0.477 to 0.294, ID TaskUtil. from 0.829 to 0.581, and OOD ASR is 0.576. TS-Guard's ID/OOD ASR is 0.412/0.492. SkillSonar is 0.104/0.109 with TaskUtil. of 0.815/0.789. Benign utility: SkillSonar 0.767, no guard 0.757, AgentSpec 0.642, TS-Guard 0.703. No-guard and SkillSonar are means over five runs; the other two are point estimates from a single full run per split. The authors state that this does not constitute an exhaustive comparison with OS sandboxing, taint tracking, or information flow control.

    Additional Ablations and Analyses

    • Benign utility (Table 5, main Claude Code): On GLM-5, No-guard 0.815, System prompt 0.833, AcceptEdits 0.796, allowlist 0.792, SkillSonar 0.817; on Claude Haiku 4.5, SkillSonar 0.836 and no guard 0.827; on GPT-5.4, SkillSonar 0.724 and no guard 0.793.
    • Table 6: SkillSafetyBench ASR: no guard 93.30%, allowlist 64.30%, system prompt 83.30%, SkillSonar 52.90%; AcceptEdits has no fully comparable results because it repeatedly timed out on that harness. WildClawBench Safety: no guard 38.00%, AcceptEdits 41.00%, allowlist 45.00%, system prompt 43.00%, SkillSonar 54.00%. The authors state that this should be interpreted as cross-benchmark robustness rather than unrestricted generalization to any real-world skill ecosystem.
    • Adaptive attacks: Re-running the iterative attacker against the final defense, overall ASR drops from 45.1% to 22.9% after three refinement rounds, an absolute decrease of 22.2 percentage points. The authors state that substantial protection remains, but the residual ASR indicates that the policy is not robust to all adaptive attacks. Per-family results are in Appendix F.1.
    • Zero-shot transfer (Appendix F.2): A defense optimized on GLM-5 yields ID ASR on Kimi-K2.6 from 0.417 to 0.199, on Claude Haiku 4.5 from 0.481 to 0.096, and on GPT-5.4 from 0.588 to 0.019. Optimization on Kimi-K2.6 also transfers, and the authors state that the safety–utility tradeoff still varies by model.
    • By family (Appendix F.3, percentage points): On ID, Resource & Reliability goes from 61.3 ± 10.3 to 11.3 ± 5.2 (a 50.0 pp drop); Execution Safety from 48.6 ± 21.7 to 5.7 ± 7.8 (42.9 pp); Specification Integrity from 41.2 ± 7.2 to 5.9 ± 5.9 (35.3 pp); Operational Side Effects from 36.7 ± 4.6 to 18.3 ± 10.9 (18.3 pp). On OOD, Privacy & Data Flow from 67.7 ± 8.4 to 6.2 ± 2.1 (61.5 pp); Capability Control from 59.4 ± 6.3 to 14.5 ± 4.5 (44.8 pp). The authors state that all six families decrease, but unevenly; Operational Side Effects has the highest residual, and Capability Control is relatively harder.
    • Exceptions noted by the authors: On GLM-5 OOD, AcceptEdits has lower ASR than SkillSonar, and the two have the same mean OOD TaskUtil.; on GPT-5.4, SkillSonar has a utility drop relative to no guard; on Claude Haiku 4.5, the gap between OOD ASR (0.254) and ID (0.096) is larger than on GLM-5.
  5. What are some points that can be further explored?

    The guard still relies on host compliance with a Markdown policy; the search budget is small, and the baselines are considered practical references by the authors.

    Limitations and future directions noted by the authors

    • Still a Markdown policy (Appendix H): The evolved guard depends on whether the host SAA follows instructions; stronger malicious skills may still ignore, override, or bypass guard rules during execution.
    • Reliance on runtime review (Appendix H): The optimization uses review to measure attack success, task utility, confirmation burden, and tokens. The authors state that despite careful use of review, review errors may still affect results.
    • Small search budget (Appendix H): For reproducibility, the full evaluation is at most 8 runs. The authors believe a larger budget could further improve the guard, but gains may diminish.
    • Baselines are not a complete comparison (Appendix H): Existing runtime defenses for SAA harnesses like Claude Code and OpenClaw are scarce, so baselines should be seen as practical references rather than a complete comparison with established prior methods.
    • Should be used with mechanism-level controls (Section 6): The authors state that SkillSonar's soft instruction-following nature means it should complement, not replace, mechanism-level controls such as permission systems and sandboxes.
    • Adaptive attacks still have residual success (Section 5.3): After three rounds of adaptive refinement, the overall ASR is 22.9%. The authors state this indicates the policy is not robust to all adaptive attacks. Appendix F.1 gives per-family results. The conclusion also presents transfer to held-out risk families, other victim models, and external benchmarks as observed results, not as experiments to be done.

    Experimental coverage

    • Main evaluation: GLM-5, GPT-5.4, Claude Haiku 4.5 on Claude Code; Table 4 for OpenClaw reports GLM-5 and Claude Haiku 4.5. GLM-5 main table N=10; Table 3 is a point estimate; in Figure 5, No-guard and SkillSonar are means of five runs, AgentSpec and TS-Guard are one full run per split.
    • Data and splits: SCOPE-R has 206 attack-confirmed malicious instances plus 43 benign tasks; OOD uses entire held-out families C and P. External benchmarks are SkillSafetyBench and the WildClawBench safety subset (Table 6). Attack success review is Qwen3.5-122B-A10B.
    • Defense comparisons: No-guard, System prompt, AcceptEdits, AcceptEdits + allowlist, AgentSpec, TS-Guard, and content-aligned flat system prompts. The authors state they do not interpret this comparison as an exhaustive comparison with OS sandboxes, taint tracking, or formal information-flow control.
    • Human audit (Appendix D.2): Balanced audit agreement rates for construction review and evaluation review are 94% and 98%; observed disagreements are all false-positive success labels. The paper does not report the sample size of this audit in the main text.
    • Evolution and transfer: Default budget is 10 outer iterations and 10 full node evaluations, with early stopping threshold τscore = 0.95; Appendix H states at most 8 full evaluations. Zero-shot transfer includes Kimi-K2.6. The adaptive setting runs three more rounds of attacker refinement against the final guard. The paper reports itemized tokens, confirmation counts enter the evolution objective, and the main result table does not list confirmation counts separately.
  6. Summarize the main content of the paper

    SkillSonar uses evolvable skills for runtime diversion, reducing ASR on SCOPE-R while preserving some task utility.

    Defense-as-Skill makes SAA runtime defense an installable, inspectable, editable skill, rather than an external classifier or platform-specific permission gate.

    • Problem: Skills become persistent context after loading. Malicious skills need not cause harm at installation; they can wait until user tasks, workspace states, and tools make unsafe actions appear useful, then induce data leakage, code modification, approval bypass, or preparation for exfiltration. The authors argue pre-installation review is necessary but insufficient.
    • Data and method: SCOPE-R starts from benign tasks in PinchBench and uses an attack–victim–review loop to retain only attack-successful instances, totaling 206 malicious instances, 43 benign tasks, 6 risk families, and 21 subcategories. Families C and P are entirely OOD. SkillSonar classifies actions as allow, replan, or confirmation within the same agent according to task boundaries, and relies on explicit safety responsibility assignment. MCTS evolves the guard skill on disk with 1−ASR as the primary objective and utility, confirmation burden, and tokens as secondary.
    • Main results: On Claude Code, GLM-5, N=10 (Table 2), SkillSonar's ID ASR is 0.104 ± 0.036 and OOD is 0.115 ± 0.037, versus no guard at 0.482 ± 0.039 and 0.606 ± 0.043; ID TaskUtil. is 0.779, higher than AcceptEdits' 0.650. AcceptEdits has lower OOD ASR (0.073), while allowlist brings ASR back to near no-guard. On GPT-5.4, ID/OOD ASR point estimates are 0.019/0.034.
    • Other evidence: Without explicit invocation, ID/OOD ASR is 0.400/0.582. Compared to flat prompts, skill form gives ID ASR 0.104 vs. 0.353. SkillSafetyBench ASR is 52.90%, WildClawBench Safety is 54.00%. After three rounds of adaptive attacks, overall ASR is 22.9%. ASR decreases across all six families, with Operational Side Effects residual at 18.3 ± 10.9, the highest among ID families in the paper.
    • Authors' conclusion: Results support Defense-as-Skill as an inspectable, evolvable policy layer; because it relies on soft instruction following, the authors believe it should complement, not replace, permission systems and sandboxes. Appendix H adds: the guard can still be bypassed, results are affected by review errors and a small search budget, and baselines are practical references rather than a complete comparison.

Related papers

Read originalarxiv.org