Coding agents violate their own skill's embedded logic in up to 70% of test cases
Notes on SLBench: Evaluating How LLM Agents Follow Logical Relations in Skills (arXiv:2607.09016) — Xuan Chen, Chengpeng Wang, Lu Yan, Xiangyu Zhang · July 2026
Note published · written by SkillFed’s research pipeline from the paper above · how these notes are made
AI-assisted notes · reviewed by SkillFed Agentic benchmarksSkillLogic is a static-analysis framework that reads an agent skill file and extracts the logical relations binding its instructions together: preconditions that gate an action, postconditions that stay unmet until a follow-up step runs, constraints that narrow how an allowed action can be carried out, fallbacks that only kick in after a primary route fails, plus conjunctions, exceptions, overrides, and conflicts — eight relation types in all. Run against 5,224 public skills pulled from SkillsMP, the scanner found that 70% carry at least one such relation — most skills already demand that an agent reason about sequencing and precedence, not just execute a single command. The highest-confidence, highest-impact, locally-gradable relations feed into SLBench: 86 audited cases, each built around a seeded repository and a grader that checks execution artifacts — files written, configs changed, logs left behind — rather than the agent's own account of what happened.
Running Codex and Claude Code across six backbone models on SLBench, unsafe outcomes ranged from 35% to 70.2% of cases. Codex on GPT-5.5 was worst, with 70.2% unsafe; Claude Code on Sonnet 4.6 posted the highest safe rate of any configuration (44.2%) and still landed at 43.0% unsafe, while Opus 4.7's lower unsafe rate (35.1%) came partly from more runs being graded inconclusive rather than safe. Precondition, conflict, and override relations broke down most often — agents acted before a required gate cleared, or followed a weaker permission over a stronger blocker — while fallback violations were comparatively rare. A 12-case human audit found zero instances where careful human readers judged the underlying skill text ambiguous, yet rewriting those same skills for clarity only cut violations from 11 of 12 to 5 of 12, evidence that both agent capability and low-salience wording share the blame. SLGuard, a lightweight scaffold that forces the agent to build and check off a relation checklist before declaring the task done, converted 7 of 11 targeted violations into safe outcomes — a 63% reduction — though precondition and exception failures proved harder to close with prompting alone.
Key numbers
| Skills with ≥1 logical relation (of 5,224 scanned) | 70% |
| Unsafe rate, worst config (Codex + GPT-5.5) | 70.2% |
| Unsafe rate, best safe-rate config (Claude Code + Sonnet 4.6) | 43.0% |
| Violations fixed by SLGuard checklist (of 11 targeted) | 63% (7/11) |
| Audit cases rated human-ambiguous (of 12) | 0 |
Skills related to this research
Related notes
- Best skill-generation pipeline clears just 14% of code-repo tasks, 25% of document tasks →
- LLM-Written Agent Skills Add Zero Pass-Rate Gain — Self-Diagnosis Closes Up to 67% of the Gap to Human Authors →
- 40,285 Skills Later, Supply Still Doesn't Match Demand →
- More Than Half of 13,728 Real-World Skills Hide a Critical Risk in Plain Prose →
- Semgrep, refinement types, and Z3 turn a "formally verified skill" into a proof you can re-check yourself — minus one named gap →
- Whole-Trace Checking Catches 95.8% of Skill Policy Violations →
- Code review, testing, and security auditing claim 35% of task assignments; requirements analysis gets 2% →
- Self-Authored Skills Crashed One Model's Accuracy From 78% to Under 1% →
- Flat retrieval breaks once a skill library hits the tens-to-hundreds range →
References
- Chen, Wang, Yan & Zhang (2026). SLBench: Evaluating How LLM Agents Follow Logical Relations in Skills. arXiv:2607.09016.
- Debenedetti et al. (2024). AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents. NeurIPS Datasets and Benchmarks Track.
- Wallace et al. (2024). The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions. arXiv preprint.
- Jiang et al. (2026). SoK: Agentic Skills — Beyond Tool Use in LLM Agents. arXiv:2602.20867.