File size: 9,346 Bytes
028abaa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
---
license: cc-by-4.0
language: en
pretty_name: SkillsAlign — Cross-Context Misalignment in AI Agent Skills
size_categories:
  - 100K<n<1M
task_categories:
  - text-classification
tags:
  - ai-agents
  - skill-packages
  - misalignment-detection
  - supply-chain-security
  - benchmark
  - neurips-2026
configs:
  - config_name: labeled
    data_files:
      - split: di
        path: labeled/eval_di.parquet
      - split: dic
        path: labeled/eval_dic.parquet
  - config_name: pairs_di
    data_files:
      - split: train
        path: pairs/pairs_di_train.parquet
      - split: val
        path: pairs/pairs_di_val.parquet
      - split: test
        path: pairs/pairs_di_test.parquet
  - config_name: pairs_dic
    data_files:
      - split: train
        path: pairs/pairs_dic_train.parquet
      - split: val
        path: pairs/pairs_dic_val.parquet
      - split: test
        path: pairs/pairs_dic_test.parquet
  - config_name: normalized
    data_files:
      - split: full
        path: normalized/normalized_skill_records.parquet
---

# SkillsAlign

> **Anonymous submission to NeurIPS 2026 — Datasets & Benchmarks Track.**
> Camera-ready metadata will be added after acceptance.

A 245 K-skill in-the-wild dataset for **cross-context misalignment** in AI
agent skill packages — when a skill's metadata description does not match
its instruction body or the resource files it ships. The dataset supports
training and evaluation of detectors that flag misaligned packages before
an agent loads them.

Code, Docker pipelines, and the paper LaTeX live in the companion
GitHub repository (linked from the paper's anonymous mirror).

## TL;DR

```python
from datasets import load_dataset

# 552-skill human-labelled evaluation set (DI = metadata + instruction).
labeled_di = load_dataset("anon-skillsalign-26/skill_align", "labeled", split="di")

# Synthetic typed-corruption training pairs (M+I+R variant).
pairs_dic = load_dataset("anon-skillsalign-26/skill_align", "pairs_dic")

# The full 245 K normalised corpus (parsed front-matter + rendered M/I/R).
corpus = load_dataset("anon-skillsalign-26/skill_align", "normalized", split="full")
```

## Composition

| Subset | Rows | Description |
|---|---|---|
| `normalized` (`full`)         | 264 937 | The full crawled corpus, normalised. Front-matter parsed, files walked, M/I/R rendered. |
| `labeled` (`di` / `dic`)      | 552 / 552 | Human-labelled evaluation slice (491 aligned + 61 misaligned). Same skills, two text variants. |
| `pairs_di` (`train/val/test`) | 40 000 / 2 000 / 2 000 | Synthetic typed-corruption pairs, M+I variant. 50 / 50 aligned vs misaligned. |
| `pairs_dic` (`train/val/test`) | 40 000 / 2 000 / 2 000 | Same, M+I+R variant. |

### Synthetic-pair statistics

```
fmt  split      rows  anchors  aligned  misalign     T2   T3a   T3b   T3c   med_chars  max_chars
----------------------------------------------------------------------------------------------------
di   train    40,000   20,000   20,000    20,000   5000  5000  5000  5000       4,651     16,382
di   val       2,000    1,000    1,000     1,000    250   252   250   248       4,425     16,209
di   test      2,000    1,000    1,000     1,000    250   250   252   248       4,783     16,332
dic  train    40,000   20,000   20,000    20,000   5000  5000  5000  5000      12,204     40,956
dic  val       2,000    1,000    1,000     1,000    250   250   250   250      12,831     40,956
dic  test      2,000    1,000    1,000     1,000    250   250   250   250      12,118     40,174
```

- 50 / 50 aligned vs misaligned at every split.
- Misaligned rows are **exactly balanced** across four corruption types
  (greedy least-filled sampler).

### Corruption-type taxonomy

| Code | Mutation | Layer touched |
|---|---|---|
| **T1** | Section reorder | metadata + instruction (excluded — preserves alignment) |
| **T2** | Donor-span swap | instruction OR resource |
| **T3a** | LLM-rewritten span | instruction OR resource |
| **T3b** | Donor-span replace | instruction OR resource |
| **T3c** | Rule-based identifier substitution (curated package / CLI / env names) | instruction OR resource |

## Schema

### `labeled` and `pairs_*`

| Column | Type | Description |
|---|---|---|
| `pair_id` | string | Stable SHA-1 unique ID per row. |
| `anchor_skill_id` | string | The skill being evaluated. |
| `text` | string | Tagged M/I/R block: `<METADATA>…</METADATA>\n<INSTRUCTION>…</INSTRUCTION>[\n<RESOURCE>…</RESOURCE>]`. |
| `label` | string | `"aligned"` or `"misaligned"`. |
| `corruption_type` | string | `aligned` / `T2` / `T3a` / `T3b` / `T3c` (synthetic), or `behavioral_misaligned` (labelled). |
| `split` | string | `train` / `val` / `test`. |
| `stage` | string | `stage1` (M+I) or `stage2` (M+I+R). |
| `source_skill_ids` | list[string] | Anchors used to build the row (always 1 for positives, 1-2 for negatives). |
| `sub_strategy` | string | Mutation sub-class for the negative (e.g. `pip_subs`, `cli_flag`). |
| `target_layer` | string | `I` (instruction), `R` (resource), or empty. |

### `normalized` (full corpus)

| Column | Type | Description |
|---|---|---|
| `skill_id` | string | Globally unique. |
| `name` | string | YAML front-matter `name`. |
| `description_text` | string | YAML front-matter `description` (or first-layer fallback). |
| `skill_md_non_description` | string | The instruction body (everything in SKILL.md outside front-matter). |
| `package_files_json` | string | JSON list of `{path, content}` for every file in the skill's `files/` directory. |
| `text` | string | The rendered M/I/R block (same convention as the pair tables). |
| … | | A handful of provenance fields (`record_sha1`, byte counts, etc.). |

The full schema is in `SCHEMA.md` at the dataset root.

## Label semantics

The labelled slice (552 skills) was scored by a **three-signal pipeline**:

1. **Static rule scan** — pattern-based, offline, on the SKILL.md + files.
2. **LLM auditor ensemble** — reasoning over (description, instruction, resource).
3. **Sandboxed execution** — Docker container with strace + tcpdump + a NOVA hook
   monitoring filesystem and network behaviour at runtime.

A skill is labelled **misaligned** if at least one of the three signals
disagrees with the description. AUP-blocked rows (Anthropic Usage Policy
refused to assess offensive-cyber playbooks) are excluded from the
parquet eval sets — see `alignment_summary.csv` at the dataset root for
the raw 554-row label table.

## Recommended use

- **Train** detectors on `pairs_di` and / or `pairs_dic` (synthetic typed-corruption pairs).
- **Evaluate** on `labeled` (the 552 human-verified skills). Both `di` and
  `dic` carry the same labels; they differ only in whether the RESOURCE
  block is included in `text`.
- **Class balance** in the labelled slice is ~89 % aligned (natural
  prevalence in the wild). Accuracy alone is misleading — report
  per-class precision / recall / F1 and AUC.

```python
import pyarrow.parquet as pq

eval_set = pq.read_table("labeled/eval_dic.parquet").to_pylist()
print(len(eval_set))                          # 552
print(eval_set[0].keys())                      # dict_keys(['pair_id', 'anchor_skill_id', ...])
print(sum(r["label"] == "misaligned" for r in eval_set))   # 61
```

## Excluded mutations

We **do not** ship T1 (section reorder) as a misalignment class. T1 only
permutes M/I/R sections without changing their content — the
description-vs-behaviour alignment is unbroken. Including T1 as
"misaligned" would teach the model that section order alone is a
misalignment signal, which is wrong.

## Licence

CC-BY 4.0 for everything in this dataset, with the caveat that the
**raw `packages/` trees** (when distributed) inherit each upstream
source repository's licence. Most are MIT or Apache-2.0; the dataset
carries the upstream licence file alongside each package. Redistributors
should honour those.

## Citation

Anonymous during review. After acceptance, please cite the NeurIPS 2026
D&B Track paper (camera-ready metadata pending). A `CITATION.cff`
template is in the companion code repository.

## Maintenance

The dataset will be maintained at this repository for the lifetime of
the NeurIPS submission process. Errata and version bumps will be
recorded in the dataset's commit history.

## Ethical considerations

- **Data sources.** Skills were crawled from public skill-marketplace
  listings between 2025-09 and 2026-04. Each source repository's licence
  is respected; we redistribute only what those licences permit.
- **Author handles.** Skill front-matter occasionally contains author
  handles. We do **not** redistribute author email or username
  metadata; only the public skill content.
- **Offensive-cyber playbooks.** Some skills in the corpus are offensive
  pen-testing playbooks. Two such skills were AUP-blocked during
  labelling; they are excluded from the labelled eval set. Researchers
  using the corpus for downstream training should consider their own
  mitigations (e.g. RLHF-style refusal training, content filtering).
- **Misalignment vs malware.** Most misaligned skills are *honest
  mistakes* (description drifted from updated code), not malware. The
  benchmark is for description-vs-behaviour alignment, not malware
  detection. Researchers should not infer malice from misalignment.