mne-advanced — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited mne-advanced (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.
A hub for the non-standard analyses — microstates, entropy/complexity, graph metrics, the 1/f deep-dive, intracranial specifics, fNIRS GLM, real-time. Each runs mostly via mne_run_code with an external library that is an optional dependency (named per method below). This skill is extra skeptical: a smaller literature means more researcher degrees of freedom and easier over-interpretation, so the discipline is to grill appropriateness and parameter-sensitivity before computing, frame as exploratory, and critique before believing.
Companion skills:mne-mcp-guardfor technical execution safety;mne-methodology-criticfor Phase 3;mne-spectralfor the canonical PSD / aperiodic workflow. Loaded objects persist in one MNE session. Install the named library first (e.g.pip install pycrostates); flag it as an optional dependency to the user before running.
These methods are non-standard, so the intake is harsher. Do not compute until these are answered. If the user can't answer one, propose a sensible default and explicitly flag the open risk — never silently choose.
Appropriateness (the gate question)
it better**? (e.g. "network hubs" via graph theory when a simple ROI contrast suffices; entropy as a vague "complexity" proxy when band power is the real hypothesis.) Justify choosing the rare tool.
number as hypothesis-generating)? With a small literature, default to exploratory.
Parameters & sensitivity (these methods are parameter-hungry)
sweep, not a single setting. Examples: microstates n_maps (4–7) + GFP-peak selection; sample entropy m, r, length; multiscale entropy scales; graph threshold / density; HFO detector thresholds; specparam peak_width_limits / aperiodic_mode.
Method-specific preprocessing assumptions
ICA-cleaned); fit on GFP peaks.
coupling index (SCI)** QC before any GLM — raw intensity is not analyzable.
high-gamma is 70–150 Hz band-limited power; HFOs need high sampling rate + artifact rejection.
see mne-spectral / critic connectivity notes) and a justified thresholding scheme.
Inference & reproducibility (small-literature methods need this more, not less)
exploratory?
pinned (these tools change fast), equivalent code archived?
Capability + look first: mne_check_status; plot the relevant signal/PSD and read the PNG. Then run the matching skeleton via mne_run_code (objects raw/epochs are pre-bound). Each library is an optional dependency — install and flag it. Keep the framing exploratory.
Microstates — pip install pycrostates (optional):
from pycrostates.cluster import ModKMeans # optional dependency
gfp = raw.copy().pick("eeg").set_eeg_reference("average")
mk = ModKMeans(n_clusters=4, random_state=42).fit(gfp, n_jobs=1) # fits on GFP peaks
segm = mk.predict(gfp); params = segm.compute_parameters() # GEV, coverage, duration, occurrenceComplexity / entropy — pip install antropy neurokit2 (optional):
import antropy as ant # optional dependency
x = raw.get_data(picks="eeg")[0]
samp = ant.sample_entropy(x) # tune m, r
lziv = ant.lziv_complexity((x > np.median(x)).astype(int), normalize=True)
# multiscale entropy via neurokit2.entropy_multiscale(x, scale=range(1,21))Graph / network metrics from a connectivity matrix C (pip install networkx bctpy, optional):
import networkx as nx # optional dependency
A = (np.abs(C) > thr).astype(int); np.fill_diagonal(A, 0) # threshold → caveat: density-dependent
G = nx.from_numpy_array(A)
deg = dict(G.degree()); clust = nx.average_clustering(G); L = nx.average_shortest_path_length(G)
# small-worldness vs degree-matched random nulls; modularity via community detectionAperiodic 1/f deep-dive — pip install specparam (optional); see `mne-spectral` for the full workflow. Report exponent/offset + peaks; compare aperiodic_mode="fixed" vs "knee".
Intracranial sEEG/ECoG: re-reference bipolar (mne.set_bipolar_reference); high-gamma = filter 70–150 Hz → Hilbert envelope → log-power; HFO via a detector (ripples 80–250 Hz).
fNIRS GLM — pip install mne-nirs (optional):
import mne_nirs # optional dependency
od = mne.preprocessing.nirs.optical_density(raw)
sci = mne.preprocessing.nirs.scalp_coupling_index(od) # QC: drop channels with low SCI
hb = mne.preprocessing.nirs.beer_lambert_law(od, ppf=6.0) # OD → HbO/HbR
# design matrix + GLM via mne_nirs.statistics.run_glmReal-time / online — brief pointer: mne-realtime + an LSL stream (pylsl) for online epoching/decoding; out of scope for offline files. Treat as a separate, latency-aware pipeline.
Archive the equivalent code + figures (the mne-analyst archiving convention), and record the library version for every external tool.
Hand the design + result to `mne-methodology-critic` (invoke the skill, or dispatch it as a subagent with references/methodology-checklist.md). For rare/advanced work it will specifically check:
question? (FAIL if a complexity/graph metric is used where a direct contrast suffices);
n_maps, entropy m/r, graphthreshold with no sweep;
Laplacian referencing; microstates without a clean GFP;
matched random nulls; never report a single arbitrary density;
Report its BLOCK / REVISE / PASS verdict to the user and act on it before stating conclusions.
See references/advanced-methods.md for per-method recipes, parameters, the optional-dependency list, and failure modes.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.