File size: 2,731 Bytes
7433844
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
license: mit
language: en
library_name: transformers
pipeline_tag: text-classification
base_model: answerdotai/ModernBERT-base
tags:
  - text-classification
  - security
  - agent-skills
  - malware-detection
  - shortcut-learning
---

# SkillShift scanner (ModernBERT, mixed-only)

A static detector for malicious agent skills (`SKILL.md` files). It is `ModernBERT-base` fine-tuned on
[MaliciousSkillBench](https://huggingface.co/datasets/ProtectSkills/MaliciousSkillBench), restricted to the
sources that contain **both** labels, and exported to int8 ONNX. Full study, code, and paper:
[github.com/Aryanbhargava18/SkillShift](https://github.com/Aryanbhargava18/SkillShift).

## Why this variant

Detectors trained on the full merged benchmark learn to recognise a skill's *source dataset* rather than
whether it is dangerous, and flag about two-thirds of benign skills from sources they were not trained on.
Training only on both-label sources cuts that over-blocking sharply. This checkpoint is the mixed-only
model; it is the one shipped as a scanner, not the lowest-FPR model in the study (a linear TF-IDF model
reaches a lower false-positive rate).

## Intended use

A cheap, first-pass triage filter that reads a skill's text before installation and routes suspicious
skills to human review. It is a signal, not a standalone verdict.

## Measured behaviour (unseen-source test set, threshold 0.5)

| metric | value |
|---|---|
| benign false-positive rate (ATR) | 4% |
| benign false-positive rate (aggregate) | 20% |
| malicious recall | ~53% |

Operating threshold 0.344 is calibrated to a 2% benign false-positive rate on validation data.

## Limitations

- **Thresholds do not transfer.** Validation comes from the training sources, so a threshold set there
  understates the false-positive rate on a new benign source. Recalibrate on in-domain benign skills.
- **Text only.** Payloads hidden from static text (bundled code, obfuscation, runtime-only behaviour) need
  dynamic or package-level analysis.
- **Evadable.** Appending benign source-style tokens can push a caught malicious skill below threshold
  (a good-word attack, documented in the paper), so this should not be the only line of defence.
- **One benchmark family.** Trained and evaluated on MaliciousSkillBench, whose benign training skills come
  almost entirely from one source.

## Citation

```bibtex
@misc{skillshift2026,
  title  = {Source Shortcuts in Malicious Agent-Skill Detection: Why Detectors Fail on Unseen Sources, and What the Fix Really Learns},
  author = {Bhargava, Aryan},
  year   = {2026},
  howpublished = {\url{https://github.com/Aryanbhargava18/SkillShift}}
}
```

Dataset: MaliciousSkillBench (CC-BY-4.0, arXiv:2608.19901).