LLM agents violate logical skill relations in up to 70% of cases
LLM agents frequently fail to follow logical relations in skill files, leading to unsafe behavior
Software arXiv 10 Jul 2026 Measurement Prototype evidence
Published as “SLBench: Evaluating How LLM Agents Follow Logical Relations in Skills”
Why it matters
Logical-relation following must be addressed in skill-guided agents to prevent privacy leaks and unsafe configuration changes, and simple prompting scaffolds like SLGuard can markedly improve safety.
Summary
Agents frequently violate logical relations in skill files, with unsafe rates up to 70.2% (Codex GPT-5.5) and a median of 44.2% safe outcomes for Claude Code Sonnet 4.6; SLGuard reduces violations by 63% on the targeted cases. The study scans 5,000 public skills, finds 70% contain at least one logical relation, and builds the 86-case SLBench benchmark to measure this failure mode.
What they found 2
- 70% of public skills contain at least one logical relation.
“Using SkillLogic, we scan over 5,000 public skills and find that 70% contain at least one logical relation.”
- SLGuard reduces violations from 11 to 4 cases, increasing safe outcomes from 0 to 7.
“SLGuard substantially reduces unsafe behavior: violations drop from 11 cases to 4, while safe outcomes increase from 0 to 7 after merging guarded inconclusive no-violation outcomes into the safe category.”
Caveats 6
- If safe signals were given priority over violation signals, the unsafe rate on this subset would decrease from 37.5% to 18.8% (grading precedence effect).
- Claude Code with Opus 4.7 has the lowest violation rate (35.1%) but also the highest inconclusive rate (35.1%), indicating that lower violations may be offset by uncertainty.
- SLBench is a curated challenge set rather than a representative sample of all production skill failures.
- It contains 86 audited cases from SkillsMP and prioritizes high-impact relations that can be tested in local repositories, enabling executable and deterministic evaluation but excluding skills that require external APIs, cloud credentials, running services, real human approvals, or long-horizon deployment.
- Our taxonomy is grounded in public skills but may not cover relation patterns in specialized domains or future ecosystems.
- Our evaluation is also limited to two agent platforms and six LLM backbones, so results may differ for retrieval-augmented, multiagent, persistent-memory, or other agent architectures.
What’s new here 4
- Introduces SkillLogic, a framework to parse and analyze logical relations in skill files.
- Creates SLBench, an executable benchmark of 86 curated cases covering eight relation types.
- Evaluates six LLM backbones on skill-guided coding tasks, revealing high violation rates.
- Proposes SLGuard, an inference-time prompting scaffold that cuts violations by 63% on targeted cases.