mne-spectral — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited mne-spectral (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.
Power-spectral analysis of neurophysiology data via the MNE MCP server. This skill is skeptical by design: most spectral mistakes (relative-power compositionality, conflating oscillations with 1/f, asserting normality at small n) run without any error — so the discipline is to grill before computing and critique before believing.
Companion skills:mne-mcp-guardfor technical execution safety;mne-methodology-criticfor Phase 3. Loaded objects persist in one MNE session.
Do not compute a PSD until these are answered. If the user can't answer one, propose a sensible default and explicitly flag the open risk — never silently choose.
Design & claim
pre × post)
The two questions that decide validity
(they sum to ~1, are not independent). Per-band t-tests + FDR will be invalid. Plan a log-ratio (CLR/ALR) transform, or use absolute power. (This is the single most common fatal error here.)
power can masquerade as a band effect. Plan specparam/FOOOF (report exponent/offset + peaks), or justify why raw band power is adequate.
Data & parameters
justification*. Will the two groups have different* rejection rates? (differential rejection fabricates differences)
Inference plan (pin this down NOW, not after seeing results)
independence assumption valid? (neighbouring channels/freqs are correlated → consider cluster-based permutation across the spectrum)
mne_check_status; mne_plot_psd and read the PNG — find linenoise, bad channels, and whether the spectrum even looks like the expected 1/f + peaks shape.
mne_run_code for full control). Welch on (clean, epoched) data: # epochs already in the session; compute per-epoch PSD then average
spec = epochs.compute_psd(method="welch", fmin=1, fmax=45, n_fft=int(epochs.info["sfreq"]*2))
psds, freqs = spec.get_data(return_freqs=True) # (n_epochs, n_ch, n_freqs)
psd_mean = psds.mean(axis=0) # average over epochs(Multitaper: method="multitaper", bandwidth=2.)
import numpy as np
bands = {"delta":(1,4),"theta":(4,8),"alpha":(8,13),"beta":(13,30),"gamma":(30,45)}
def band_power(psd, freqs, lo, hi):
m = (freqs>=lo)&(freqs<hi)
return np.trapz(psd[..., m], freqs[m], axis=-1)
abs_pow = {b: band_power(psd_mean, freqs, lo, hi) for b,(lo,hi) in bands.items()}it into analysis via a centered log-ratio (CLR) so downstream tests are valid:
total = sum(abs_pow.values())
rel = {b: abs_pow[b]/total for b in bands} # compositional, sums to 1
# CLR for valid statistics:
import numpy as np
comp = np.stack([rel[b] for b in bands]) # (n_bands, n_ch)
clr = np.log(comp) - np.log(comp).mean(axis=0, keepdims=True)oscillatory peaks; report the exponent and offset plus periodic peak params:
from specparam import SpectralModel # (or: from fooof import FOOOF)
sm = SpectralModel(peak_width_limits=(1,12), max_n_peaks=6, aperiodic_mode="fixed")
sm.fit(freqs, psd_mean[ch_idx], freq_range=[1,45])
exponent = sm.get_params("aperiodic", "exponent"); offset = sm.get_params("aperiodic", "offset")mne-analyst archiving convention).Best-practice reminders: high-pass + line-notch before PSD; ≥ a few seconds per epoch for low bands; report per-group rejection rate; prefer ROI/band that was pre-specified.
Hand the design + result to `mne-methodology-critic` (invoke the skill, or dispatch it as a subagent with references/methodology-checklist.md). For spectral work it will specifically check:
Report its BLOCK / REVISE / PASS verdict to the user and act on it before stating conclusions.
See references/spectral-methods.md for deeper recipes (Welch vs multitaper, CLR statistics, specparam, individual alpha frequency, and spectral inference choices).
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.