Skip to content
AI & Agents
Skill

/neurokit2

Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware

From plugin
k-dense-ai-scientific-agent-skills
45k165 skills
Install
$ npx -y skills add k-dense-ai/claude-scientific-skills --skill neurokit2 --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/neurokit2

Context preview

The summary Claude sees to decide when to auto-load this skill.

Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware

SKILL.md

neurokit2.SKILL.md
name: neurokit2
description: Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.
license: MIT
compatibility: Python 3.10+ and uv; pinned workflows use NeuroKit2 0.2.13. Core processing needs NumPy, SciPy, pandas, scikit-learn, matplotlib, PyWavelets, requests, and setuptools; selected EEG, cvxEDA, plotting, file-format, and RQA features need separately locked optional packages.
allowed-tools: Read Write Edit Bash Glob
metadata:
  version: "1.2"
  skill-author: K-Dense Inc.

NeuroKit2

Scope and evidence cutoff

Use this skill for method-aware, reproducible biosignal research with NeuroKit2. The snapshot was checked on **2026-07-23** 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 live documentation can be ahead of the stable wheel. Prefer the pinned runtime for reproducible work and name both versions if consulting development docs.

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.

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.

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.

Core workflow

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.

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.

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.

Current patterns

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 `E

Read more
Ships withk-dense-ai-scientific-agent-skills

🔔 Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility — now works with any AI agent that supports the open Agent Skills standard, not just Claude.

Get the whole plugin
Stats
44,280
Stars
4,019
Forks
Active
Maintenance
Python
Language
MIT
License
8d ago
Last commit
11mo ago
Created
14d ago
Added

Repo: k-dense-ai/claude-scientific-skills