mne-preprocess — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited mne-preprocess (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Preprocessing & data-quality cleanup of neurophysiology data via the MNE MCP server. This skill is skeptical by design: nearly every preprocessing mistake (a too-aggressive high-pass that eats your slow ERP, a reference that fabricates connectivity, filtering before epoching, differential bad-channel handling between groups) runs without any error and silently biases everything downstream — so the discipline is to grill the downstream analysis before cleaning, and critique the pipeline before believing.
Companion skills:mne-mcp-guardfor technical execution safety;mne-methodology-criticfor Phase 3. Loaded objects persist in one MNE session, and preprocessing edits are in place.
Do not filter, reference, or resample until these are answered. If the user can't answer one, propose a sensible default and explicitly flag the open risk — never silently choose.
The question that decides every parameter
default: 0.1 Hz high-pass for ERP (slow components survive), ~1 Hz high-pass for ICA (drift hurts decomposition), broadband / no/low high-pass for TFR / low-frequency power. Set the pipeline to the analysis, not the other way round.
Filtering
attenuate/shift slow ERP components (CNV, P300, readiness potential). Justify the edge.
vs IIR (causal, ringing tradeoffs)?
below it?
Resampling
resampling continuous data jitters event sample positions. New sfreq must stay > 2× the low-pass (anti-aliasing) — MNE low-passes on resample, but verify.
Reference & montage
standard_1020, biosemi64, GSN-HydroCel-128, …)? Needed for interpolation,topomaps, and source work.
analysis? Average/common references inflate apparent connectivity and matter for source** modeling; pin the reference to those needs now, not after.
Bad channels & quality
or eyeballed? Will the two groups be treated differently (differential handling fabricates group effects)?
caps later ICA / source n_components.
mne_check_status; then look before cleaning: mne_plot_psd(read the PNG — find the line-noise spike at 50/60 Hz + harmonics, drift, dead/noisy channels) and mne_plot_raw (drifts, flat lines, jumps). mne_plot_sensors to confirm the montage.
mne_set_montage(name="raw", montage="standard_1020").
# ERP pipeline: gentle high-pass preserves slow components; low-pass + line notch
raw.filter(l_freq=0.1, h_freq=40.0, fir_design="firwin") # FIR, linear phase
raw.notch_filter(freqs=[50, 100, 150]) # 50 Hz region + harmonics(Structured form: mne_filter(name="raw", l_freq=0.1, h_freq=40, notch=50). For ICA use l_freq=1.0; for TFR/low-freq power keep the high-pass minimal/off.)
raw.set_eeg_reference("average", projection=False) # whole-head, common for source/ERP
# linked mastoid: raw.set_eeg_reference(["TP9", "TP10"])
# REST (infinity): raw.set_eeg_reference("REST") # needs a forward / sphere model(Structured form: mne_set_reference(name="raw", ref_channels="average") / "REST" / "TP9,TP10".)
# objective flag: flat or extreme-variance channels (illustrative thresholds)
data = raw.get_data(picks="eeg"); v = data.var(axis=1)
names = [raw.ch_names[i] for i in range(len(v))]
flat = [names[i] for i in np.where(v < 1e-14)[0]]
noisy = [names[i] for i in np.where(v > np.median(v) + 5 * np.std(v))[0]]
raw.info["bads"] = sorted(set(flat + noisy))
raw.interpolate_bads(reset_bads=True) # spline; needs montage(Structured form: mne_mark_bad_channels(name="raw", bads="Fp1,T7") then mne_interpolate_bads(name="raw"). Record how many channels were interpolated — it lowers data rank for any later ICA/source step.)
mne_resample(name="raw", sfreq=250) (verify new sfreq > 2× the low-pass).
mne_crop(name="raw", tmin=0, tmax=300), or markBAD_* annotations so epoching drops them.
mne_plot_psd again — confirm the line-noise spike is gone, the high-passremoved drift, and no channel still looks dead/noisy. Then archive the equivalent code + figures (the mne-analyst archiving convention).
Best-practice reminders: filter before epoching to avoid edge artifacts at every epoch boundary; pick the high-pass for the analysis; report per-group bad-channel/rejection counts; track how many channels were interpolated (rank).
Hand the pipeline (filter band, reference, bad channels, resampling, order of operations) to `mne-methodology-critic` (invoke the skill, or dispatch it as a subagent with references/methodology-checklist.md). For preprocessing it will specifically check:
every boundary);
apparent connectivity and shift source estimates);
effects);
n_components);timing).
Report its BLOCK / REVISE / PASS verdict to the user and act on it before stating that the data are "clean."
See references/preprocess-methods.md for deeper recipes (FIR vs IIR & transition bandwidth, notch strategies, reference math, objective bad-channel detection, rank bookkeeping, and pipeline order).
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.