Skill Tracer
Skills › Scientific Agent Skills › neurokit2

neurokit2

skill · 358 lines · MIT · skills/neurokit2/SKILL.md

The facts

Its description

Builds and audits reproducible NeuroKit2 research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Use when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.

The description the agent reads to decide when to use it.

From its settingsline 3

Tools it may use, or may not

allowed-tools: Read Write Edit Bash Glob

Tools it may use while it runs without asking you first.

From its settingsline 6

Runs scripts

python skills/neurokit2/scripts/inspect_signal.py, python skills/neurokit2/scripts/ecg_hrv_pipeline.py, python skills/neurokit2/scripts/eda_pipeline.py, python skills/neurokit2/scripts/plan_epochs.py, python skills/neurokit2/scripts/validate_multimodal.py (first 5 of 12 lines)

Scripts the text names. Found by matching words, so treat them as pointers.

Found by matching wordsline 87 line 155 line 187 line 212 line 234

Files it mentions

scripts/generate_synthetic.py, scripts/inspect_signal.py, scripts/ecg_hrv_pipeline.py, scripts/eda_pipeline.py, scripts/plan_epochs.py (first 5 of 18 lines)

Files the text names, such as ones to read or write. Found by matching words, so treat them as pointers.

Found by matching wordsline 288 line 289 line 290 line 291 line 292

Licence

MIT, from the skill file

The terms its author shares it under, which let it be shown here.

From its settingsline 4 licence text

Other settings

compatibility: Python 3.10+ and uv; pinned workflows use NeuroKit2 0.2.13. Core processing needs NumPy, SciPy, pandas<3, scikit-learn, matplotlib, PyWavelets, requests, and setuptools; selected EEG, cvxEDA, plotting, file-format, and RQA features need separately locked optional packages. metadata: version: "1.4" last-reviewed: "2026-10-01" skill-author: K-Dense Inc.

More settings at the top of the file, shown as written.

From its settingsline 5 line 7
Other files in this skill (19) Close

The text

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1---
2name: neurokit2
3description: Builds and audits reproducible NeuroKit2 research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Use when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.
4license: MIT
5compatibility: Python 3.10+ and uv; pinned workflows use NeuroKit2 0.2.13. Core processing needs NumPy, SciPy, pandas<3, scikit-learn, matplotlib, PyWavelets, requests, and setuptools; selected EEG, cvxEDA, plotting, file-format, and RQA features need separately locked optional packages.
6allowed-tools: Read Write Edit Bash Glob
7metadata:
8 version: "1.4"
9 last-reviewed: "2026-10-01"
10 skill-author: K-Dense Inc.
11---
13# NeuroKit2
15## Scope and evidence cutoff
17Use this skill for method-aware, reproducible biosignal research with NeuroKit2. The
18snapshot was checked on **2026-10-01** against:
20- stable PyPI **0.2.13**, released 2026-03-02;
21- Python metadata (`>=3.10`; classifiers 3.10–3.14) and wheel dependencies;
22- GitHub release notes/tags, `NEWS.rst`, source at tag `v0.2.13`;
23- official API pages/examples (the live site identified itself as
24 `0.2.13.dev214`); and
25- pinned 0.2.13 runtime signatures and synthetic output schemas.
27The current wheel requires `pandas<3.0.0`. The refreshed core checks use Python 3.13,
28NumPy 2.5.3, and pandas 2.3.3; forcing pandas 3 conflicts with upstream metadata.
29API fragments below assume caller-provided arrays and imports. Optional MNE source
30reconstruction, cvxEDA, EMD, and pyRQA paths are source-reviewed, not runtime-validated
31by this refresh. Synthetic checks establish software behavior, not empirical validity.
33The live documentation can be ahead of the stable wheel. Prefer the pinned runtime
34for reproducible work and name both versions if consulting development docs.

Scope and evidence cutoff

Use this skill for method-aware, reproducible biosignal research with NeuroKit2. The snapshot was checked on 2026-10-01 against:

  • stable PyPI 0.2.13, released 2026-03-02;
  • Python metadata (>=3.10; classifiers 3.10–3.14) and wheel dependencies;
  • GitHub release notes/tags, NEWS.rst, source at tag v0.2.13;
  • official API pages/examples (the live site identified itself as 0.2.13.dev214); and
  • pinned 0.2.13 runtime signatures and synthetic output schemas.

The current wheel requires pandas<3.0.0. The refreshed core checks use Python 3.13, NumPy 2.5.3, and pandas 2.3.3; forcing pandas 3 conflicts with upstream metadata. API fragments below assume caller-provided arrays and imports. Optional MNE source reconstruction, cvxEDA, EMD, and pyRQA paths are source-reviewed, not runtime-validated by this refresh. Synthetic checks establish software behavior, not empirical validity.

The live documentation can be ahead of the stable wheel. Prefer the pinned runtime for reproducible work and name both versions if consulting development docs.

Raw lines 15 to 35
36## Boundary
38NeuroKit2 is a research and educational toolbox. Do **not** present its output as:
40- a diagnosis, treatment recommendation, patient-monitoring decision, or alarm;
41- validation, certification, or regulatory evidence for a medical device; or
42- proof that a physiological construct is measured validly in a new sensor,
43 protocol, environment, population, or disease group.
45Validate acquisition hardware, electrode/optode placement, units, sampling and clock
46accuracy, preprocessing, detector/decomposition method, population, task, and
47outcomes for the intended study. Preserve raw data and an auditable exclusion log.
48Use deidentified local files only; do not place PHI in prompts, logs, examples, or
49bundled fixtures.

Boundary

NeuroKit2 is a research and educational toolbox. Do not present its output as:

  • a diagnosis, treatment recommendation, patient-monitoring decision, or alarm;
  • validation, certification, or regulatory evidence for a medical device; or
  • proof that a physiological construct is measured validly in a new sensor, protocol, environment, population, or disease group.

Validate acquisition hardware, electrode/optode placement, units, sampling and clock accuracy, preprocessing, detector/decomposition method, population, task, and outcomes for the intended study. Preserve raw data and an auditable exclusion log. Use deidentified local files only; do not place PHI in prompts, logs, examples, or bundled fixtures.

Raw lines 36 to 50
51## Reproducible installation
53```bash
54uv pip install "neurokit2==0.2.13"
55```
57For optional features, create a uv project, add only the packages actually required at
58reviewed exact versions, and commit/review the resulting `uv.lock` before
59`uv sync --locked`. NeuroKit2 exposes an upstream `full` extra, but this skill
60intentionally does not install that floating transitive set in an automated workflow.
61Optional capabilities can require MNE, cvxopt, Plotly, PyEMD, pyRQA, Pillow, OpenCV,
62or file readers. Record the resolved environment with the analysis. Provision any MNE
63data/template download as an explicit, checksummed study input. Do not install a moving
64development branch for a reproducible study.

Reproducible installation

uv pip install "neurokit2==0.2.13"

For optional features, create a uv project, add only the packages actually required at reviewed exact versions, and commit/review the resulting uv.lock before uv sync --locked. NeuroKit2 exposes an upstream full extra, but this skill intentionally does not install that floating transitive set in an automated workflow. Optional capabilities can require MNE, cvxopt, Plotly, PyEMD, pyRQA, Pillow, OpenCV, or file readers. Record the resolved environment with the analysis. Provision any MNE data/template download as an explicit, checksummed study input. Do not install a moving development branch for a reproducible study.

Raw lines 51 to 65
66## Required data contract
68Before processing, record:
701. signal identity and sensor/channel configuration;
712. native sampling rate in Hz and physical unit (or explicitly `arbitrary_unit`);
723. clock, timestamp origin, drift correction, and synchronization evidence;
734. polarity/orientation and acquisition-side filters/gain;
745. missing samples, discontinuities, saturation, flatlines, motion, and annotations;
756. whether event onsets are zero-based sample indices or seconds;
767. planned preprocessing order, methods, parameters, exclusions, and outputs; and
778. participant-level grouping needed to prevent leakage in later statistics.
79Never infer units from a column name. Do not silently treat samples as milliseconds,
80volts, microsiemens, or arbitrary units.

Required data contract

Before processing, record:

  1. signal identity and sensor/channel configuration;
  2. native sampling rate in Hz and physical unit (or explicitly arbitrary_unit);
  3. clock, timestamp origin, drift correction, and synchronization evidence;
  4. polarity/orientation and acquisition-side filters/gain;
  5. missing samples, discontinuities, saturation, flatlines, motion, and annotations;
  6. whether event onsets are zero-based sample indices or seconds;
  7. planned preprocessing order, methods, parameters, exclusions, and outputs; and
  8. participant-level grouping needed to prevent leakage in later statistics.

Never infer units from a column name. Do not silently treat samples as milliseconds, volts, microsiemens, or arbitrary units.

Raw lines 66 to 81
82## Core workflow

Core workflow

Raw lines 82 to 83
84### 1. Inspect before transforming
86```bash
87python skills/neurokit2/scripts/inspect_signal.py \
88 --input recording.csv --root . --deidentified \
89 --columns ECG,RSP,EDA --time-column time_s \
90 --units ECG=mV,RSP=a.u.,EDA=uS
91```
93The inspector is bounded and emits no row values or paths. Resolve non-monotonic time,
94duplicate samples, gaps, non-finite values, flat runs, and sampling-rate disagreement
95before filtering.

1. Inspect before transforming

python skills/neurokit2/scripts/inspect_signal.py \
  --input recording.csv --root . --deidentified \
  --columns ECG,RSP,EDA --time-column time_s \
  --units ECG=mV,RSP=a.u.,EDA=uS

The inspector is bounded and emits no row values or paths. Resolve non-monotonic time, duplicate samples, gaps, non-finite values, flat runs, and sampling-rate disagreement before filtering.

Raw lines 84 to 96
Runs code python skills/neurokit2/scripts/inspect_signal.py :87
97### 2. Preserve preprocessing order
99Use this default reasoning order, adapting it to the acquisition and cited method:
1011. preserve immutable raw signal and annotations;
1022. verify time base, units, polarity, clipping, gaps, and artifacts;
1033. segment at long gaps; only interpolate short gaps under a declared policy;
1044. apply modality-specific cleaning at the native sampling rate;
1055. detect peaks/onsets or decompose components;
1066. inspect quality outputs and raw overlays;
1077. correct peaks only with logged categories and sensitivity checks;
1088. derive rates/features;
1099. align continuous modalities on a declared common time grid; and
11010. map event indices to that grid, epoch, baseline, and analyze.
112Do not resample binary markers or peak-index arrays as ordinary continuous signals.
113Map their timestamps to the target grid. Filtering and interpolation can create edge
114artifacts and false precision; retain masks for padded, missing, and rejected regions.

2. Preserve preprocessing order

Use this default reasoning order, adapting it to the acquisition and cited method:

  1. preserve immutable raw signal and annotations;
  2. verify time base, units, polarity, clipping, gaps, and artifacts;
  3. segment at long gaps; only interpolate short gaps under a declared policy;
  4. apply modality-specific cleaning at the native sampling rate;
  5. detect peaks/onsets or decompose components;
  6. inspect quality outputs and raw overlays;
  7. correct peaks only with logged categories and sensitivity checks;
  8. derive rates/features;
  9. align continuous modalities on a declared common time grid; and
  10. map event indices to that grid, epoch, baseline, and analyze.

Do not resample binary markers or peak-index arrays as ordinary continuous signals. Map their timestamps to the target grid. Filtering and interpolation can create edge artifacts and false precision; retain masks for padded, missing, and rejected regions.

Raw lines 97 to 115
116### 3. Treat schemas as runtime observations
118Return columns depend on NeuroKit2 version, function, method, signal availability, and
119analysis mode. Never claim that one column list is universal.
121```python
122signals, info = nk.ecg_process(ecg, sampling_rate=250)
123observed_schema = {
124 "columns": list(signals.columns),
125 "info_keys": sorted(info),
127```
129Persist the observed schema with package version, method parameters, sampling rate, and
130quality/exclusion summary. Reference files list verified default schemas for 0.2.13,
131not guarantees for every method.

3. Treat schemas as runtime observations

Return columns depend on NeuroKit2 version, function, method, signal availability, and analysis mode. Never claim that one column list is universal.

signals, info = nk.ecg_process(ecg, sampling_rate=250)
observed_schema = {
    "columns": list(signals.columns),
    "info_keys": sorted(info),
}

Persist the observed schema with package version, method parameters, sampling rate, and quality/exclusion summary. Reference files list verified default schemas for 0.2.13, not guarantees for every method.

Raw lines 116 to 132
133## Current patterns

Current patterns

Raw lines 133 to 134
135### ECG, corrected peaks, and duration-aware HRV
137In stable 0.2.13, `ecg_process()` performs cleaning, R-peak detection with
138`correct_artifacts=True`, rate, default `averageQRS` quality, DWT delineation, and phase.
140```python
141signals, info = nk.ecg_process(ecg, sampling_rate=250, method="neurokit")
142time_hrv = nk.hrv_time(info, sampling_rate=250)
143```
145Inspect `ECG_R_Peaks_Uncorrected` and `ECG_fixpeaks_*`; a corrected series is not
146automatically a valid NN series. For frequency/nonlinear HRV, enforce metric-specific
147duration and beat-count requirements. Five minutes is the conventional short-term
148reference; ULF is a long-recording measure, and VLF interpretation from short records
149is unsafe. Do not interpret LF/HF as a direct sympathovagal balance. PPG pulse-rate
150variability is not interchangeable with ECG HRV.
152Use the bounded pipeline:
154```bash
155python skills/neurokit2/scripts/ecg_hrv_pipeline.py \
156 --synthetic --sampling-rate 250 --duration 300 \
157 --domains time,frequency,nonlinear
158```
160The helper gates frequency analysis using the first-to-last corrected-peak span,
161separately from recording duration. It uses Welch, 4 Hz interval interpolation, and
162`normalize=False`; absolute band powers are in ms². Its numerical gates do not
163establish valid NN intervals or adequate data for every returned metric. ULF remains
164unsupported by this short-recording workflow; VLF needs separate justification.

ECG, corrected peaks, and duration-aware HRV

In stable 0.2.13, ecg_process() performs cleaning, R-peak detection with correct_artifacts=True, rate, default averageQRS quality, DWT delineation, and phase.

signals, info = nk.ecg_process(ecg, sampling_rate=250, method="neurokit")
time_hrv = nk.hrv_time(info, sampling_rate=250)

Inspect ECG_R_Peaks_Uncorrected and ECG_fixpeaks_*; a corrected series is not automatically a valid NN series. For frequency/nonlinear HRV, enforce metric-specific duration and beat-count requirements. Five minutes is the conventional short-term reference; ULF is a long-recording measure, and VLF interpretation from short records is unsafe. Do not interpret LF/HF as a direct sympathovagal balance. PPG pulse-rate variability is not interchangeable with ECG HRV.

Use the bounded pipeline:

python skills/neurokit2/scripts/ecg_hrv_pipeline.py \
  --synthetic --sampling-rate 250 --duration 300 \
  --domains time,frequency,nonlinear

The helper gates frequency analysis using the first-to-last corrected-peak span, separately from recording duration. It uses Welch, 4 Hz interval interpolation, and normalize=False; absolute band powers are in ms². Its numerical gates do not establish valid NN intervals or adequate data for every returned metric. ULF remains unsupported by this short-recording workflow; VLF needs separate justification.

Raw lines 135 to 165
Runs code python skills/neurokit2/scripts/ecg_hrv_pipeline.py :155
166### EDA with explicit decomposition
168The stable default `eda_process(method="neurokit")` uses high-pass tonic/phasic
169decomposition, not cvxEDA. Choose and report decomposition explicitly:
171```python
172clean = nk.eda_clean(eda, sampling_rate=100, method="neurokit")
173components = nk.eda_phasic(clean, sampling_rate=100, method="highpass")
174markers, info = nk.eda_peaks(
175 components["EDA_Phasic"],
176 sampling_rate=100,
177 method="neurokit",
178 amplitude_min=0.1,
180```
182For `neurokit`/`kim2004`, `amplitude_min` is relative to the largest detected response;
183it is not an absolute microsiemens threshold. Other supported detectors ignore that
184argument, which the helper records explicitly. cvxEDA needs optional `cvxopt`.
186```bash
187python skills/neurokit2/scripts/eda_pipeline.py \
188 --synthetic --sampling-rate 100 --duration 60 \
189 --phasic-method highpass --peak-method neurokit
190```

EDA with explicit decomposition

The stable default eda_process(method="neurokit") uses high-pass tonic/phasic decomposition, not cvxEDA. Choose and report decomposition explicitly:

clean = nk.eda_clean(eda, sampling_rate=100, method="neurokit")
components = nk.eda_phasic(clean, sampling_rate=100, method="highpass")
markers, info = nk.eda_peaks(
    components["EDA_Phasic"],
    sampling_rate=100,
    method="neurokit",
    amplitude_min=0.1,
)

For neurokit/kim2004, amplitude_min is relative to the largest detected response; it is not an absolute microsiemens threshold. Other supported detectors ignore that argument, which the helper records explicitly. cvxEDA needs optional cvxopt.

python skills/neurokit2/scripts/eda_pipeline.py \
  --synthetic --sampling-rate 100 --duration 60 \
  --phasic-method highpass --peak-method neurokit
Raw lines 166 to 191
Runs code python skills/neurokit2/scripts/eda_pipeline.py :187
192### Events, epochs, and baseline
194`events_find()` reports zero-based sample onsets; duration/spacing arguments are in
195samples. `epochs_create()` takes epoch limits in seconds.
197```python
198events = nk.events_find(trigger, threshold=0.5, duration_min=2)
199epochs = nk.epochs_create(
200 signals,
201 events,
202 sampling_rate=100,
203 epochs_start=-0.2,
204 epochs_end=0.8,
205 baseline_correction=False,
207```
209Plan sample-exact windows first:
211```bash
212python skills/neurokit2/scripts/plan_epochs.py \
213 --events 1000,2500,4000 --event-unit samples \
214 --sampling-rate 100 --recording-samples 5000 \
215 --epoch-start -0.2 --epoch-end 0.8 \
216 --baseline-start -0.2 --baseline-end 0
217```
219In 0.2.13 the epoch slice is end-exclusive, but the generated floating time index
220includes `epochs_end`. Built-in baseline correction subtracts the epoch mean from its
221start through `t=0`; use manual correction for a narrower prespecified baseline.
222Boundary epochs are padded and can contain NaN. Decide drop/pad/error before analysis.

Events, epochs, and baseline

events_find() reports zero-based sample onsets; duration/spacing arguments are in samples. epochs_create() takes epoch limits in seconds.

events = nk.events_find(trigger, threshold=0.5, duration_min=2)
epochs = nk.epochs_create(
    signals,
    events,
    sampling_rate=100,
    epochs_start=-0.2,
    epochs_end=0.8,
    baseline_correction=False,
)

Plan sample-exact windows first:

python skills/neurokit2/scripts/plan_epochs.py \
  --events 1000,2500,4000 --event-unit samples \
  --sampling-rate 100 --recording-samples 5000 \
  --epoch-start -0.2 --epoch-end 0.8 \
  --baseline-start -0.2 --baseline-end 0

In 0.2.13 the epoch slice is end-exclusive, but the generated floating time index includes epochs_end. Built-in baseline correction subtracts the epoch mean from its start through t=0; use manual correction for a narrower prespecified baseline. Boundary epochs are padded and can contain NaN. Decide drop/pad/error before analysis.

Raw lines 192 to 223
Runs code python skills/neurokit2/scripts/plan_epochs.py :212
224### RSA and multimodal processing
226`bio_process()` assumes all inputs already share one sampling rate and alignment. It
227does not resample, synchronize, estimate drift, or create nested modality dictionaries;
228its `info` output is flat. Unequal lengths are concatenated by index and can introduce
229NaN. RSA is added only when synchronized ECG and RSP are present.
231Validate a strict local manifest before calling it:
233```bash
234python skills/neurokit2/scripts/validate_multimodal.py \
235 --manifest streams.json --root . --deidentified
236```
238The validator checks every observed timestamp against the declared regular grid and
239the reference stream, with a half-sample tolerance. Matching starts alone cannot rule
240out drift. Without time columns, it can only check the declared grid, not clock accuracy.
242After independent modality QC and alignment:
244```python
245bio_signals, bio_info = nk.bio_process(
246 ecg=ecg_aligned,
247 rsp=rsp_aligned,
248 eda=eda_aligned,
249 sampling_rate=common_rate,
251rsa_summary = nk.hrv_rsa(
252 bio_signals,
253 bio_signals,
254 rpeaks=bio_info,
255 sampling_rate=common_rate,
256 continuous=False,
258```
260Summary RSA is a dictionary; `continuous=True` returns a DataFrame with `RSA_P2T` and
261`RSA_Gates` in the verified default workflow. Co-record respiration and report its
262rate/depth/context; RSA is not a direct, context-free measure of vagal tone.

RSA and multimodal processing

bio_process() assumes all inputs already share one sampling rate and alignment. It does not resample, synchronize, estimate drift, or create nested modality dictionaries; its info output is flat. Unequal lengths are concatenated by index and can introduce NaN. RSA is added only when synchronized ECG and RSP are present.

Validate a strict local manifest before calling it:

python skills/neurokit2/scripts/validate_multimodal.py \
  --manifest streams.json --root . --deidentified

The validator checks every observed timestamp against the declared regular grid and the reference stream, with a half-sample tolerance. Matching starts alone cannot rule out drift. Without time columns, it can only check the declared grid, not clock accuracy.

After independent modality QC and alignment:

bio_signals, bio_info = nk.bio_process(
    ecg=ecg_aligned,
    rsp=rsp_aligned,
    eda=eda_aligned,
    sampling_rate=common_rate,
)
rsa_summary = nk.hrv_rsa(
    bio_signals,
    bio_signals,
    rpeaks=bio_info,
    sampling_rate=common_rate,
    continuous=False,
)

Summary RSA is a dictionary; continuous=True returns a DataFrame with RSA_P2T and RSA_Gates in the verified default workflow. Co-record respiration and report its rate/depth/context; RSA is not a direct, context-free measure of vagal tone.

Raw lines 224 to 263
Runs code python skills/neurokit2/scripts/validate_multimodal.py :234
264### Complexity returns values plus metadata
266Most complexity functions in 0.2.13 return `(value, info)`. The convenience function
267also returns two objects:
269```python
270features, details = nk.complexity(signal) # default which="makowski2022"
271sampen, sampen_info = nk.entropy_sample(signal)
272dfa, dfa_info = nk.fractal_dfa(signal)
273```
275The default convenience selection is not “all measures.” Complexity estimates are
276sensitive to length, stationarity, normalization, delay, dimension, tolerance, scale,
277and implementation. Predefine them and run sensitivity/surrogate analyses.

Complexity returns values plus metadata

Most complexity functions in 0.2.13 return (value, info). The convenience function also returns two objects:

features, details = nk.complexity(signal)  # default which="makowski2022"
sampen, sampen_info = nk.entropy_sample(signal)
dfa, dfa_info = nk.fractal_dfa(signal)

The default convenience selection is not “all measures.” Complexity estimates are sensitive to length, stationarity, normalization, delay, dimension, tolerance, scale, and implementation. Predefine them and run sensitivity/surrogate analyses.

Raw lines 264 to 278
279## Bundled command-line helpers
281All helpers reject URLs, path traversal, and symlinks; bound bytes/rows/channels; refuse
282overwrite unless `--force`; use lazy scientific imports so `--help` works without
283NeuroKit2; never use pickle; and produce deterministic JSON/CSV. Real-data commands
284require `--deidentified`.
286| Helper | Purpose |
287|---|---|
288| `scripts/generate_synthetic.py` | Dependency-free deterministic CSV fixtures |
289| `scripts/inspect_signal.py` | Bounded CSV/time/gap/flatline inspection |
290| `scripts/ecg_hrv_pipeline.py` | Pinned ECG, quality, peak-correction, HRV workflow |
291| `scripts/eda_pipeline.py` | Explicit cleaning, decomposition, SCR workflow |
292| `scripts/plan_epochs.py` | Sample-exact event, boundary, baseline planner |
293| `scripts/validate_multimodal.py` | Strict units/rates/clocks/alignment schema validator |
295Generate a fixture without exposing participant data:
297```bash
298python skills/neurokit2/scripts/generate_synthetic.py \
299 --output synthetic.csv --root . --duration 30 \
300 --sampling-rate 250 --seed 42
301```

Bundled command-line helpers

All helpers reject URLs, path traversal, and symlinks; bound bytes/rows/channels; refuse overwrite unless --force; use lazy scientific imports so --help works without NeuroKit2; never use pickle; and produce deterministic JSON/CSV. Real-data commands require --deidentified.

HelperPurpose
scripts/generate_synthetic.pyDependency-free deterministic CSV fixtures
scripts/inspect_signal.pyBounded CSV/time/gap/flatline inspection
scripts/ecg_hrv_pipeline.pyPinned ECG, quality, peak-correction, HRV workflow
scripts/eda_pipeline.pyExplicit cleaning, decomposition, SCR workflow
scripts/plan_epochs.pySample-exact event, boundary, baseline planner
scripts/validate_multimodal.pyStrict units/rates/clocks/alignment schema validator

Generate a fixture without exposing participant data:

python skills/neurokit2/scripts/generate_synthetic.py \
  --output synthetic.csv --root . --duration 30 \
  --sampling-rate 250 --seed 42
Raw lines 279 to 302
Reads a file scripts/inspect_signal.py :289
Reads a file scripts/ecg_hrv_pipeline.py :290
Reads a file scripts/eda_pipeline.py :291
Reads a file scripts/plan_epochs.py :292
Runs code python skills/neurokit2/scripts/generate_synthetic.py :298
303## Security note
305No example or helper uses Python `eval()` or `exec()`. NeuroKit2 names such as
306`eeg_*`, `events_*`, and `*_eventrelated()` are ordinary library calls. If a static
307scanner reports an eval/exec pattern based on a substring, inspect the exact line and
308record it as a scanner false positive only after confirming no dynamic execution exists.

Security note

No example or helper uses Python eval() or exec(). NeuroKit2 names such as eeg_*, events_*, and *_eventrelated() are ordinary library calls. If a static scanner reports an eval/exec pattern based on a substring, inspect the exact line and record it as a scanner false positive only after confirming no dynamic execution exists.

Raw lines 303 to 309
310## References
312Read only the files needed for the modality or decision:
313All bundled Markdown paths below are under `references/`; this skill has no
314`templates/` or `assets/` reference paths.
316| File | Contents |
317|---|---|
318| `references/signal_processing.md` | Filters, gaps, resampling, peaks, PSD, schemas |
319| `references/epochs_events.md` | Event indexing, epoch boundaries, baselines |
320| `references/ecg_cardiac.md` | ECG process, quality, delineation, peak correction |
321| `references/hrv.md` | HRV/RSA inputs, duration, ectopy, interpretation |
322| `references/eda.md` | Cleaning, decomposition, SCR detection |
323| `references/emg.md` | EMG cleaning, amplitude, activation |
324| `references/eog.md` | EOG polarity, MNE default, blink features |
325| `references/eeg.md` | EEG/MNE helpers, power, QC, microstates |
326| `references/ppg.md` | PPG methods, quality semantics, PRV limitations |
327| `references/rsp.md` | Respiration polarity, rate, RRV/RVT/RAV |
328| `references/bio_module.md` | Multimodal alignment and `bio_*` schemas |
329| `references/complexity.md` | Tuple returns, parameter sensitivity, RQA |

References

Read only the files needed for the modality or decision: All bundled Markdown paths below are under references/; this skill has no templates/ or assets/ reference paths.

FileContents
references/signal_processing.mdFilters, gaps, resampling, peaks, PSD, schemas
references/epochs_events.mdEvent indexing, epoch boundaries, baselines
references/ecg_cardiac.mdECG process, quality, delineation, peak correction
references/hrv.mdHRV/RSA inputs, duration, ectopy, interpretation
references/eda.mdCleaning, decomposition, SCR detection
references/emg.mdEMG cleaning, amplitude, activation
references/eog.mdEOG polarity, MNE default, blink features
references/eeg.mdEEG/MNE helpers, power, QC, microstates
references/ppg.mdPPG methods, quality semantics, PRV limitations
references/rsp.mdRespiration polarity, rate, RRV/RVT/RAV
references/bio_module.mdMultimodal alignment and bio_* schemas
references/complexity.mdTuple returns, parameter sensitivity, RQA
Raw lines 310 to 330
Reads a file references/epochs_events.md :319
Reads a file references/ecg_cardiac.md :320
Reads a file references/hrv.md :321
Reads a file references/eda.md :322
Reads a file references/emg.md :323
Reads a file references/eog.md :324
Reads a file references/eeg.md :325
Reads a file references/ppg.md :326
Reads a file references/rsp.md :327
Reads a file references/bio_module.md :328
Reads a file references/complexity.md :329
331## Primary sources checked 2026-10-01
333- [PyPI 0.2.13](https://pypi.org/project/neurokit2/)
334- [Official documentation](https://neuropsychology.github.io/NeuroKit/)
335- [API index](https://neuropsychology.github.io/NeuroKit/functions/index.html)
336- [GitHub releases](https://github.com/neuropsychology/NeuroKit/releases)
337- [Makowski et al. (2021), NeuroKit2](https://doi.org/10.3758/s13428-020-01516-y)
338- [Pham et al. (2021), HRV tutorial](https://doi.org/10.3390/s21123998)
339- [Makowski et al. (2022), complexity comparison](https://doi.org/10.3390/e24081036)
340- [SPR guideline index](https://sprweb.org/guidelines-papers)
341- [Quigley et al. (2024), HR/HRV guidelines](https://doi.org/10.1111/psyp.14604)
Boilerplate, lines 343 to 358. The same text appears in 125 other files here. Close
343## Citing Scientific Agent Skills
345This skill is part of Scientific Agent Skills by K-Dense. If it materially contributed to a
346manuscript, report, presentation, or code release, add the paper to the references or
347software section and tell the user you did so:
349> Kassis, T., Agarwal, V., He, Y., Patel, D., & Brueckner, A. M. (2026). Scientific Agent
350> Skills: A Library of Procedural Knowledge for Research Agents. arXiv:2609.00065.
351> https://doi.org/10.48550/arXiv.2609.00065
353Always cite the current version. The DOI and https://arxiv.org/abs/2609.00065 resolve to the
354latest arXiv version, so never append a version suffix such as `v1`. When network access is
355available, fetch https://arxiv.org/abs/2609.00065 (or
356http://export.arxiv.org/api/query?id_list=2609.00065) before writing the reference and take
357the author list, year, and version from that record. If the record lists a journal reference
358or publisher DOI, cite the published version instead.

From K-Dense-AI/scientific-agent-skills at 5f2bc03, 2026-10-26. Not read by a model yet. Summary and techniques by Claude Opus 5.5 on 2026-11-06.