← Lab /Software

SkillGate detects malicious AI skill files with 81.7% F1 while cutting LLM token use by 77%

SkillGate achieves F1=0.817, FPR=1.13% and reduces LLM input tokens by 77% on a malicious skill file benchmark

Software arXiv 28 Jul 2026 Defense Prototype evidence Threat model

Published as “SkillGate: Cost Efficient Runtime Malicious Skill File Detection in Coding Agents”

Why it matters

Deployable runtime screening can block malicious skill installs with near-zero overhead, protecting AI coding agents from supply-chain attacks.

Summary

SKILLGATE detects malicious skill files with high accuracy, achieving F1=0.817, recall=0.769, false-positive rate=1.13% and AUPRC=0.830, while cutting LLM token usage by 77% and running in about 818 ms per file. The evidence comes from a benchmark of 1,650 skill files (150 malicious) compared against prior tools, showing a 5-6× AUPRC improvement and 7.7× lower latency. The paper provides full details, so the claim is well supported.

What they found 3

  1. High detection performance with low false positives

    “SKILLGATE achieves F1=0.817, R=0.769, FPR=1.13%, and AUPRC=0.830”

  2. Substantial token-cost reduction

    “The targeted snippet design reduces LLM input tokens by 77% relative to full-file screening on SkillsBench”

  3. Fast runtime latency compatible with install-time use

    “Weighted average latency is ∼818ms (prefiltersafe: ∼139ms at 67.2%; LLM-bound: ∼2,208ms at 32.8%)”

Caveats 6

  • Recall of 0.769 means roughly 23% of malicious skill files are missed
  • SKILLGATE achieves F1=0.817, R=0.769
  • The benchmark’s attack vocabulary may also not represent all real-world payloads or advanced obfuscation tactics, as evidenced by the residual encoding-based false negatives (RSA modular arithmetic, zero-width characters) that expose a concrete coverage gap.
  • A further limitation is that SkillsBench’s 150 malicious files are hand-crafted attack exemplars rather than captured in-the-wild samples, so measured recall may not transfer to organically evolving campaigns.
  • All results use gpt-5.4-mini (OpenAI); recall on the LLM path may differ for other backends (e.g., claude-haiku-4-5 or local Ollama models), which we do not evaluate.
  • The prefilter patterns are derived from the MITRE ATT&CK taxonomy which is the most comprehensive pattern collection we could find, but cannot guarantee to cover all known security patterns.

What’s new here 4

  • Combines a large regex prefilter with snippet-level LLM judging to avoid full-file analysis
  • Reduces LLM token consumption by 77% through targeted snippet extraction
  • Achieves deployable false-positive rate (~1%) versus >17% for prior scanners
  • Provides an open-source MCP proxy that integrates with multiple coding agents via a one-line config

Threat model stated by the source

Adversarynon-adaptive adversary controlling skill file content in a package registry or Git repository
Capabilitycan supply malicious skill files, does not know that SKILLGATE is deployed, cannot inspect the deployed ruleset