neuroaihub/brainpilot/spikeinterface-skill

Claude Code and agent skill by neuroaihub/brainpilot

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Domain knowledge for building extracellular electrophysiology pipelines with SpikeInterface: loading data with extractors, preprocessing, running spike sorters, post-processing via SortingAnalyzer, quality metrics, curation, comparison, visualization, and export.

Install

npx vskill@latest install neuroaihub/brainpilot/spikeinterface-skill

SKILL.md

The same SKILL.md was published earlier as neuroaihub/brainpilot/spikeinterface-skill.

SpikeInterface Skill

1. Purpose

This skill encodes practical knowledge of the SpikeInterface Python framework — a unified API for extracellular electrophysiology spike sorting.

It captures, with verbatim signatures pulled from source, how to:

  • Read raw recordings from ~40 acquisition formats and write results back out.
  • Chain lazy preprocessors (filter, CMR, phase-shift, motion correction).
  • Run internal and external spike sorters (Kilosort family, Mountainsort, SpykingCircus, Tridesclous, Lupin, HerdingSpikes, ...) either natively or inside Docker/Singularity containers.
  • Build a SortingAnalyzer and populate it with postprocessing extensions (waveforms, templates, spike amplitudes, unit/spike locations, correlograms, PCA, template similarity).
  • Compute quality metrics (misc + PCA-based + spiketrain + template) and use them for automated curation.
  • Compare sortings pairwise, against ground truth, or across multiple sorters.
  • Visualize with plot_* widgets across matplotlib, ipywidgets, ephyviewer, figpack, and spikeinterface_gui backends (sortingview is deprecated).
  • Export to Phy, IBL alignment GUI, Pynapple, or a self-contained HTML report.
  • Build custom pipelines out of the low-level sortingcomponents (peak detection, localization, selection, clustering, template matching).
  • Generate synthetic ground-truth data and benchmark sorters/components.

2. When to Use This Skill

Trigger this skill when the user's task involves any of the following:

  • Loading extracellular ephys files (.bin, .dat, Open Ephys, SpikeGLX, Neuropixels, Blackrock, Plexon, NWB, MEArec, Intan, .h5, .nwb, .zarr, ...).
  • Preprocessing multichannel electrode traces (bandpass, notch, CMR, whitening, phase shift, drift/motion correction).
  • Running a spike sorter or comparing sorters.
  • Constructing a SortingAnalyzer, computing extensions, or asking about analyzer.compute(...).
  • Computing quality metrics (SNR, ISI violations, presence ratio, amplitude cutoff, drift, silhouette, nearest-neighbor isolation, ...) or PCA/template metrics.
  • Curation — manual (Phy, sortingview) or automated (metrics thresholding, auto_merge, model-based cleaning).
  • Ground-truth or cross-sorter comparison.
  • Visualization of traces, rasters, waveforms, templates, unit summary, drift, motion, agreement matrices.
  • Exporting to Phy / IBL / Pynapple / HTML report.
  • Custom sorter development using sortingcomponents (peak detection, localization, clustering, matching).
  • Simulating recordings (generate_ground_truth_recording, generate_drifting_recording, hybrid injection) or benchmarking with SorterStudy / BenchmarkStudy.

3. Reference Files (Progressive Disclosure)

References live under references/ and are organized into 12 subdirectories, one per SpikeInterface submodule. Each subdirectory has its own INDEX.md — a short table listing every leaf file, its scope, and when to read it. Start by reading only the `INDEX.md` for the relevant submodule, then open the specific leaf file(s) it points at. Every leaf file is kept under ~300 lines so you can load only what the current task needs.

PathScopeWhen to open its INDEX
references/core/INDEX.mdBase data-structure classes (BaseExtractor, BaseRecording, BaseSorting, BaseEvent, BaseSnippets, slicers, Numpy extractors), the SortingAnalyzer class + built-in analyzer extensions + ChannelSparsity + Templates, plus the core toolbelt (generate, aggregation/slicing, IO extractors, loading, job_tools, globals, datasets, recording_tools, core_tools, Motion).You need method signatures on BaseRecording / BaseSorting / SortingAnalyzer, are picking a storage format (memory / binary_folder / zarr), configuring parallelism (n_jobs, chunk_duration), downloading test data, or handling Motion / drift objects.
references/extractors/INDEX.mdEvery read_* recording extractor (SpikeGLX, Open Ephys, Blackrock, Intan, Neuralynx, Plexon/Plexon2, MEArec, NWB, IBL streaming, MDA, MCS, TDT, cbin, Zarr, ...), all sorting extractors (read_kilosort, read_phy, read_klusta, read_mda_sorting, read_nwb_sorting, ...), event extractors, snippets extractors, MATLAB / Neuropixels helpers, and registry dicts.User wants to load a specific raw file format, needs the exact read_<format>(...) signature or required extras (e.g. neo[ced], pynwb, mtscomp), or is reading a sorter's on-disk output / events / snippets.
references/preprocessing/INDEX.mdLazy preprocessors organized by family: filtering (bandpass_filter, notch_filter, highpass_filter, gaussian_filter, causal_filter), referencing (common_reference, phase_shift), spatial filtering, bad-channel handling, artifact / silence handling, scaling & normalization, clipping, resampling, dtype conversion, whitening, channel padding, deep-learning denoising, motion correction, plus recipe pipelines.Designing a preprocessing chain, verifying a signature, picking a reference / filter mode, or setting up drift correction.
references/sorters/INDEX.mdrun_sorter, run_sorter_jobs, run_sorter_by_property, available_sorters, installed_sorters, archived_sorters, get_default_sorter_params, Docker/Singularity dispatch, per-sorter class list (internal simple/spykingcircus2/tridesclous2/lupin; external Kilosort family, Mountainsort, SpykingCircus, Tridesclous, HerdingSpikes, IronClust, WaveClus, HDSort, Combinato, RTSort; archived Klusta / Yass).Running any sorter, choosing container fallback, or tweaking per-sorter parameters.
references/postprocessing/INDEX.mdEach analyzer.compute("<name>") extension in its own leaf: amplitude_scalings, correlograms (+ auto / ACG3D), isi_histograms, spike_amplitudes, spike_locations, unit_locations, principal_components, template_metrics (deprecated re-export), template_similarity, noise_levels, valid_unit_periods, plus localization tools, align-sorting, and the extension dependency graph.Choosing which extensions to compute, tuning per-extension parameters, or debugging the dependency chain.
references/metrics/INDEX.mdspikeinterface.metrics.quality (misc + PCA metrics; ComputeQualityMetrics, compute_quality_metrics, get_quality_metric_list, get_default_quality_metrics_params — the deprecated alias get_default_qm_params is scheduled for removal in 0.105.0), spikeinterface.metrics.spiketrain, spikeinterface.metrics.template (peak-to-valley, half-width, ...), plus package-level exports and utility helpers.Computing quality / template / spike-train metrics, understanding defaults, or picking a recommended metric set.
references/curation/INDEX.mdManual (CurationSorting, MergeUnitsSorting, SplitUnitSorting) + automated curation: auto_merge_units, spike-train cleaning (remove_duplicated_spikes, remove_excess_spikes), redundant-unit removal, the modern curation-format entry points (apply_curation, load_curation, validate_curation_dict), the legacy apply_sortingview_curation, threshold labeling, model-based cleaning (Bombcell, UnitRefine, SLAy), and a recommended workflow.Merging/splitting units, applying curation from Phy / sortingview / JSON, or wiring up automated cleanup.
references/comparison/INDEX.mdPair (compare_two_sorters), multi-sorter (compare_multiple_sorters), ground-truth (compare_sorter_to_ground_truth) and template comparisons, agreement / matching strategies, performance metrics, comparisontools utilities, and a note on the removed GroundTruthStudy (now SorterStudy under benchmark).Comparing sortings, computing performance metrics vs. ground truth, or cross-session unit matching.
references/widgets/INDEX.mdspikeinterface.widgets — every plot_* alias and its *Widget class, split into recording / sorting / analyzer / bombcell / comparison / motion plot groups, plus backend selection (matplotlib / ipywidgets / figpack / ephyviewer / spikeinterface_gui; sortingview is a legacy alias of figpack) and helper utilities.Building any visualization or picking the right backend for notebooks vs. shared links.
references/exporters/INDEX.mdexport_to_phy, export_report, export_to_ibl_gui, to_pynapple_tsgroup, plus module-level helpers, enum/literal parameter values, and the "required SortingAnalyzer extensions" summary.Exporting a SortingAnalyzer to Phy for manual curation, generating an HTML/image report, or handing data to IBL or Pynapple.
references/generation/INDEX.mdSynthetic data + template database: drifting generator, drift tools, hybrid injection, noise tools, splitting tools, template_database queries, plus the core generate_* re-exports (generate_recording, generate_ground_truth_recording, generate_drifting_recording, ...).Creating simulated recordings for tests/benchmarks or injecting hybrid ground truth into a real recording.
references/benchmark/INDEX.mdspikeinterface.benchmark — Benchmark / BenchmarkStudy base classes, SorterStudy, SorterStudyWithoutGroundTruth, component benchmark studies (peak detection, localization, selection, clustering, matching), motion / merging benchmarks, plot helpers, residual analysis, and cheatsheets.Setting up a systematic sorter or component comparison, replaying benchmarks on-disk, or plotting benchmark results.
references/sortingcomponents/INDEX.mdLow-level building blocks organized by subpackage: peak_detection/ (7 methods), peak_localization/ (center_of_mass, monopolar_triangulation, grid_convolution), peak_selection, clustering/ (7 methods including graph, iterative-hdbscan, iterative-isosplit), matching/ (nearest, tdc_peeler, circus_omp, wobble), motion/ (estimation, interpolation, peak helpers), features, waveforms, node_pipeline, tools, and a modular pipeline example.Writing a custom sorter, integrating a new component, or investigating what spykingcircus2 / tridesclous2 / lupin do internally.

How to navigate. Every INDEX.md is short (≤ 100 lines) and contains a table of leaf-file | scope | when-to-read. Read the INDEX first, jump to one or two leaves, and only open more if the task requires them. This keeps your context small even for a broad task like "build a full pipeline" — the SKILL body plus 2–3 leaves is usually all you need loaded at once.

4. Pipeline Overview

The canonical SpikeInterface workflow:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
894
Repository forks
63
7-day trend score
34

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 26 Sep 2026, 2 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/neuroaihub/brainpilot/spikeinterface-skill/badge)](https://verified-skill.com/skills/neuroaihub/brainpilot/spikeinterface-skill)

Something wrong with this skill or its page? Tell us.