neurokit2

K-Dense-AI/scientific-agent-skills · updated Jun 4, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill neurokit2
0 commentsdiscussion
summary

### Neurokit2

  • name: "neurokit2"
  • description: "Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activi..."
skill.md
name
neurokit2
description
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable for heart rate variability analysis, event-related potentials, complexity measures, autonomic nervous system assessment, psychophysiology research, and multi-modal physiological signal integration.
license
MIT license
metadata
version: "1.0" skill-author: K-Dense Inc.

NeuroKit2

Overview

NeuroKit2 is a comprehensive Python toolkit for processing and analyzing physiological signals (biosignals). Use this skill to process cardiovascular, neural, autonomic, respiratory, and muscular signals for psychophysiology research, clinical applications, and human-computer interaction studies.

When to Use This Skill

Apply this skill when working with:

  • Cardiac signals: ECG, PPG, heart rate variability (HRV), pulse analysis
  • Brain signals: EEG frequency bands, microstates, complexity, source localization
  • Autonomic signals: Electrodermal activity (EDA/GSR), skin conductance responses (SCR)
  • Respiratory signals: Breathing rate, respiratory variability (RRV), volume per time
  • Muscular signals: EMG amplitude, muscle activation detection
  • Eye tracking: EOG, blink detection and analysis
  • Multi-modal integration: Processing multiple physiological signals simultaneously
  • Complexity analysis: Entropy measures, fractal dimensions, nonlinear dynamics

Core Capabilities

1. Cardiac Signal Processing (ECG/PPG)

Process electrocardiogram and photoplethysmography signals for cardiovascular analysis. See references/ecg_cardiac.md for detailed workflows.

Primary workflows:

  • ECG processing pipeline: cleaning → R-peak detection → delineation → quality assessment
  • HRV analysis across time, frequency, and nonlinear domains
  • PPG pulse analysis and quality assessment
  • ECG-derived respiration extraction

Key functions:

import neurokit2 as nk

# Complete ECG processing pipeline
signals, info = nk.ecg_process(ecg_signal, sampling_rate=1000)

# Analyze ECG data (event-related or interval-related)
analysis = nk.ecg_analyze(signals, sampling_rate=1000)

# Comprehensive HRV analysis
hrv = nk.hrv(peaks, sampling_rate=1000)  # Time, frequency, nonlinear domains

2. Heart Rate Variability Analysis

Compute comprehensive HRV metrics from cardiac signals. See references/hrv.md for all indices and domain-specific analysis.

Supported domains:

  • Time domain: SDNN, RMSSD, pNN50, SDSD, and derived metrics
  • Frequency domain: ULF, VLF, LF, HF, VHF power and ratios
  • Nonlinear domain: Poincaré plot (SD1/SD2), entropy measures, fractal dimensions
  • Specialized: Respiratory sinus arrhythmia (RSA), recurrence quantification analysis (RQA)

Key functions:

# All HRV indices at once
hrv_indices = nk.hrv(peaks, sampling_rate=1000)

# Domain-specific analysis
hrv_time = nk.hrv_time(peaks)
hrv_freq = nk.hrv_frequency(peaks, sampling_rate=1000)
hrv_nonlinear = nk.hrv_nonlinear(peaks, sampling_rate=1000)
hrv_rsa = nk.hrv_rsa(peaks, rsp_signal, sampling_rate=1000)

3. Brain Signal Analysis (EEG)

Analyze electroencephalography signals for frequency power, complexity, and microstate patterns. See references/eeg.md for detailed workflows and MNE integration.

Primary capabilities:

  • Frequency band power analysis (Delta, Theta, Alpha, Beta, Gamma)
  • Channel quality assessment and re-referencing
  • Source localization (sLORETA, MNE)
  • Microstate segmentation and transition dynamics
  • Global field power and dissimilarity measures

Key functions:

# Power analysis across frequency bands
power = nk.eeg_power(eeg_data, sampling_rate=250, channels=['Fz', 'Cz', 'Pz'])

# Microstate analysis
microstates = nk.microstates_segment(eeg_data, n_microstates=4, method='kmod')
static = nk.microstates_static(microstates)
dynamic = nk.microstates_dynamic(microstates)

4. Electrodermal Activity (EDA)

Process skin conductance signals for autonomic nervous system assessment. See references/eda.md for detailed workflows.

Primary workflows:

  • Signal decomposition into tonic and phasic components
  • Skin conductance response (SCR) detection and analysis
  • Sympathetic nervous system index calculation
  • Autocorrelation and changepoint detection

Key functions:

# Complete EDA processing
signals, info = nk.eda_process(eda_signal, sampling_rate=100)

# Analyze EDA data
analysis = nk.eda_analyze(signals, sampling_rate=100)

# Sympathetic nervous system activity
sympathetic = nk.eda_sympathetic(signals, sampling_rate=100)

5. Respiratory Signal Processing (RSP)

Analyze breathing patterns and respiratory variability. See references/rsp.md for detailed workflows.

Primary capabilities:

  • Respiratory rate calculation and variability analysis
  • Breathing amplitude and symmetry assessment
  • Respiratory volume per time (fMRI applications)
  • Respiratory amplitude variability (RAV)

Key functions:

# Complete RSP processing
signals, info = nk.rsp_process(rsp_signal, sampling_rate=100)

# Respiratory rate variability
rrv = nk.rsp_rrv(signals, sampling_rate=100)

# Respiratory volume per time
rvt = nk.rsp_rvt(signals, sampling_rate=100)

6. Electromyography (EMG)

Process muscle activity signals for activation detection and amplitude analysis. See references/emg.md for workflows.

Key functions:

# Complete EMG processing
signals, info = nk.emg_process(emg_signal, sampling_rate=1000)

# Muscle activation detection
activation = nk.emg_activation(signals, sampling_rate=1000, method='threshold')

7. Electrooculography (EOG)

Analyze eye movement and blink patterns. See references/eog.md for workflows.

Key functions:

# Complete EOG processing
signals, info = nk.eog_process(eog_signal, sampling_rate=500)

# Extract blink features
features = nk.eog_features(signals, sampling_rate=500)

8. General Signal Processing

Apply filtering, decomposition, and transformation operations to any signal. See references/signal_processing.md for comprehensive utilities.

Key operations:

  • Filtering (lowpass, highpass, bandpass, bandstop)
  • Decomposition (EMD, SSA, wavelet)
  • Peak detection and correction
  • Power spectral density estimation
  • Signal interpolation and resampling
  • Autocorrelation and synchrony analysis

Key functions:

# Filtering
filtered = nk.signal_filter(signal, sampling_rate=1000, lowcut=0.5, highcut=40)

# Peak detection
peaks = nk.signal_findpeaks(signal)

# Power spectral density
psd = nk.signal_psd(signal, sampling_rate=1000)

9. Complexity and Entropy Analysis

Compute nonlinear dynamics, fractal dimensions, and information-theoretic measures. See references/complexity.md for all available metrics.

Available measures:

  • Entropy: Shannon, approximate, sample, permutation, spectral, fuzzy, multiscale
  • Fractal dimensions: Katz, Higuchi, Petrosian, Sevcik, correlation dimension
  • Nonlinear dynamics: Lyapunov exponents, Lempel-Ziv complexity, recurrence quantification
  • DFA: Detrended fluctuation analysis, multifractal DFA
  • Information theory: Fisher information, mutual information

Key functions:

# Multiple complexity metrics at once
complexity_indices = nk.complexity(signal, sampling_rate=1000)

# Specific measures
apen = nk.entropy_approximate(signal)
dfa = nk.fractal_dfa(signal)
lyap = nk.complexity_lyapunov(signal, sampling_rate=1000)

10. Event-Related Analysis

Create epochs around stimulus events and analyze physiological responses. See references/epochs_events.md for workflows.

Primary capabilities:

  • Epoch creation from event markers
  • Event-related averaging and visualization
  • Baseline correction options
  • Grand average computation with confidence intervals

Key functions:

# Find events in signal
events = nk.events_find(trigger_signal, threshold=0.5)

# Create epochs around events
epochs = nk.epochs_create(signals, events, sampling_rate=1000,
                          epochs_start=-0.5, epochs_end=2.0)

# Average across epochs
grand_average = nk.epochs_average(epochs)

11. Multi-Signal Integration

Process multiple physiological signals simultaneously with unified output. See references/bio_module.md for integration workflows.

Key functions:

# Process multiple signals at once
bio_signals, bio_info = nk.bio_process(
    ecg=ecg_signal,
    rsp=rsp_signal,
    eda=eda_signal,
    emg=emg_signal,
    sampling_rate=1000
)

# Analyze all processed signals
bio_analysis = nk.bio_analyze(bio_signals, sampling_rate=1000)

Analysis Modes

NeuroKit2 automatically selects between two analysis modes based on data duration:

Event-related analysis (< 10 seconds):

  • Analyzes stimulus-locked responses
  • Epoch-based segmentation
  • Suitable for experimental paradigms with discrete trials

Interval-related analysis (≥ 10 seconds):

  • Characterizes physiological patterns over extended periods
  • Resting state or continuous activities
  • Suitable for baseline measurements and long-term monitoring

Most *_analyze() functions automatically choose the appropriate mode.

Installation

uv pip install neurokit2

For development version:

uv pip install https://github.com/neuropsychology/NeuroKit/zipball/dev

Common Workflows

Quick Start: ECG Analysis

import neurokit2 as nk

# Load example data
ecg = nk.ecg_simulate(duration=60, sampling_rate=1000)

# Process ECG
signals, info = nk.ecg_process(ecg, sampling_rate=1000)

# Analyze HRV
hrv = nk.hrv(info['ECG_R_Peaks'], sampling_rate=1000)

# Visualize
nk.ecg_plot(signals, info)

Multi-Modal Analysis

# Process multiple signals
bio_signals, bio_info = nk.bio_process(
    ecg=ecg_signal,
    rsp=rsp_signal,
    eda=eda_signal,
    sampling_rate=1000
)

# Analyze all signals
results = nk.bio_analyze(bio_signals, sampling_rate=1000)

Event-Related Potential

# Find events
events = nk.events_find(trigger_channel, threshold=0.5)

# Create epochs
epochs = nk.epochs_create(processed_signals, events,
                          sampling_rate=1000,
                          epochs_start=-0.5, epochs_end=2.0)

# Event-related analysis for each signal type
ecg_epochs = nk.ecg_eventrelated(epochs)
eda_epochs = nk.eda_eventrelated(epochs)

References

This skill includes comprehensive reference documentation organized by signal type and analysis method:

  • ecg_cardiac.md: ECG/PPG processing, R-peak detection, delineation, quality assessment
  • hrv.md: Heart rate variability indices across all domains
  • eeg.md: EEG analysis, frequency bands, microstates, source localization
  • eda.md: Electrodermal activity processing and SCR analysis
  • rsp.md: Respiratory signal processing and variability
  • ppg.md: Photoplethysmography signal analysis
  • emg.md: Electromyography processing and activation detection
  • eog.md: Electrooculography and blink analysis
  • signal_processing.md: General signal utilities and transformations
  • complexity.md: Entropy, fractal, and nonlinear measures
  • epochs_events.md: Event-related analysis and epoch creation
  • bio_module.md: Multi-signal integration workflows

Load specific reference files as needed using the Read tool to access detailed function documentation and parameters.

Additional Resources

how to use neurokit2

How to use neurokit2 on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add neurokit2
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill neurokit2

The skills CLI fetches neurokit2 from GitHub repository K-Dense-AI/scientific-agent-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/neurokit2

Reload or restart Cursor to activate neurokit2. Access the skill through slash commands (e.g., /neurokit2) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.735 reviews
  • Dhruvi Jain· Dec 28, 2024

    neurokit2 has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Noor Park· Dec 20, 2024

    Solid pick for teams standardizing on skills: neurokit2 is focused, and the summary matches what you get after install.

  • Noor Kim· Dec 12, 2024

    neurokit2 fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Oshnikdeep· Nov 19, 2024

    Keeps context tight: neurokit2 is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Chen Kapoor· Nov 11, 2024

    Registry listing for neurokit2 matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Diego Haddad· Nov 3, 2024

    We added neurokit2 from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Camila Srinivasan· Oct 22, 2024

    Keeps context tight: neurokit2 is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Ganesh Mohane· Oct 10, 2024

    We added neurokit2 from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Noor Shah· Oct 2, 2024

    Useful defaults in neurokit2 — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Camila Shah· Sep 9, 2024

    We added neurokit2 from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 35

1 / 4