Skip to content

Guide · Agent skill

How to Use the Neuropixels Analysis Agent Skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The neuropixels-analysis skill teaches an AI agent a documented workflow for Neuropixels extracellular recordings, built on SpikeInterface. It covers loading SpikeGLX, Open Ephys and NWB data, preprocessing, drift checks and correction, spike sorting, quality metrics and unit curation. This guide explains what a skill is, how to install this one, how to ask for work in plain language, and what it needs and risks before you run it on real data.

Neuropixels Electrophysiology AnalysisK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download and unzip the skill. Download the ZIP from this page and unzip it so you have a neuropixels-analysis folder.
  2. 2Place it where the agent looks. Move the folder into ~/.claude/skills/ for all projects or into a project's .claude/skills/ folder for one project. In the Claude apps, upload the ZIP under Settings, Capabilities, Skills.
  3. 3Install the Python dependencies. Install SpikeInterface, ProbeInterface, Neo, NumPy, SciPy, pandas, matplotlib, numba and scikit-learn, plus any sorter you plan to use.
  4. 4Ask for one stage. Describe your recording format, file location and goal, such as loading the AP stream or checking drift.
  5. 5Review before sorting and curating. Inspect drift plots, quality metrics and any AI-suggested labels yourself before accepting units.

What is an agent skill and what does this one do?

An agent skill is a folder of instructions, reference notes and scripts that an AI agent can load when a task matches it. This skill is for researchers who already have raw Neuropixels 1.0 or 2.0 probe recordings and want the agent to follow a consistent pipeline instead of improvising one.

Once loaded, the agent works through the standard steps: inspect and load the data, filter and check the channels, look at drift, sort spikes with a sorter such as Kilosort4, compute quality metrics, and curate units. It also gets bundled Python scripts for quality metrics and quick exploration of a recording.

  • Loads SpikeGLX (.ap.bin, .lf.bin, .meta), Open Ephys and NWB data
  • Preprocessing: high-pass filter, bad-channel detection, phase shift and common reference
  • Drift detection and optional motion correction
  • Sorting with Kilosort4 or CPU sorters such as SpikeInterface-supported alternatives
  • Quality metrics (SNR, ISI violations, presence ratio, amplitude cutoff) and unit curation

How do you install the Neuropixels analysis skill?

Download the skill ZIP from this page and unzip it. Put the resulting neuropixels-analysis folder in one of two places: ~/.claude/skills/ to make it available across your projects, or a project's .claude/skills/ folder to limit it to that project.

If you use the Claude apps instead of a local setup, open Settings, go to Capabilities, then Skills, and upload the ZIP there.

Then install the Python dependencies the skill lists. The skill itself does not install SpikeInterface for you, and optional sorters such as Kilosort4 need their own separate installation.

  • Local: unzip into ~/.claude/skills/ or <project>/.claude/skills/
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

What do you need before you start?

You need a recent Python 3 environment with SpikeInterface (used as spikeinterface.full), ProbeInterface, Neo, NumPy, SciPy, pandas, matplotlib, numba and scikit-learn. The skill also expects raw probe files and their metadata, so it is not useful for other kinds of data.

Sorters and models are optional and have their own needs. Kilosort4 is an external install, with CUDA recommended and CPU mode also supported. Other sorters such as SpykingCircus2 and Tridesclous2 need SpikeInterface optional dependencies, and Mountainsort5 needs the mountainsort5 package.

  • Python 3 with the listed scientific packages
  • Raw Neuropixels recording files (.ap.bin, .lf.bin, .meta, or Open Ephys/NWB files)
  • Optional: Kilosort4 or other sorters, possibly a GPU, and network access for some models
  • Optional: ANTHROPIC_API_KEY, only for optional Claude API calls; it is not needed when the agent reviews plots itself

How do you ask the agent to use the skill?

You do not need special syntax. The skill is meant to load when your request is about Neuropixels recordings, spike sorting or extracellular electrophysiology. Name your data format and goal, and say where the files are.

Good requests state the recording type, the file location and the step you want. Ask for one stage at a time when you are unsure, such as checking drift before sorting.

  • "Load the SpikeGLX run in /data/run_g0 and list its streams."
  • "Check drift on this Neuropixels 1.0 recording before I run spike sorting."
  • "Compute quality metrics for my Kilosort4 output and suggest which units to review."
  • "Set up preprocessing for a 4-shank Neuropixels 2.0 recording, handling each shank separately."
stream_names, stream_ids = si.get_neo_streams("spikeglx", "/path/to/run_g0/") recording = si.read_spikeglx("/path/to/run_g0/", stream_name="imec0.ap")

What does a basic preprocessing step look like?

The skill's preprocessing chain starts with a high-pass filter and bad-channel detection, then removes bad channels. Phase shift needs valid inter-sample shift metadata. Common reference is for single-shank probes; multi-shank probes use the bundled reference_by_shank helper described in the preprocessing reference.

Cache preprocessed data only if you have the storage and will reuse it. Trace arrays are samples by channels, and the bundled commands reject uncalibrated, empty or multi-segment input instead of guessing.

rec = si.highpass_filter(recording, freq_min=400.0) bad_channel_ids, channel_labels = si.detect_bad_channels(rec) rec = rec.remove_channels(bad_channel_ids) rec = si.phase_shift(rec) rec = si.common_reference(rec, operator="median", reference="global")

Safety notes: scripts, network and disk use

The skill runs Python scripts and uses the network, so read what the agent is about to run before approving it. The workflow writes preprocessed copies, motion outputs and sorting folders to disk, which can be large and can overwrite earlier work if you reuse folder names.

Keep ANTHROPIC_API_KEY in an environment variable in your shell, not in scripts, because scripts end up in version control and logs. The skill's guidance says visual suggestions from AI-assisted curation must not automatically accept units; a person should review them.

  • Back up raw recordings before running the workflow
  • Use new output folder names for each run
  • Keep API keys in environment variables
  • Treat sorter calls and curation thresholds as starting points to validate on your own data

Tips for getting reliable results

Check drift before sorting and inspect the saved motion output rather than trusting the sorter. A spread of spike depths across neurons is not by itself evidence of drift over time.

Work on a short slice first to test your settings. The skill's quick-start example takes the first 60 seconds of a recording. The skill's guidance also notes that the bundled curation thresholds are local screening presets, not reproductions of any institution's pipeline.

The skill's SKILL.md mentions a full end-to-end pipeline script, but the package file list for this skill does not include it. Check the scripts folder before relying on that command; the included scripts are for quality metrics and exploration.

What people use it for

  • Loading a SpikeGLX run, selecting the imec0.ap stream and checking its channels before analysis
  • Checking a Neuropixels recording for drift with a drift raster map before choosing a sorting setup
  • Running quality metrics on sorter output and marking borderline units for manual review
  • Teaching a student the steps of preprocessing, sorting and curation with SpikeInterface code

Frequently asked questions

Is the Neuropixels analysis skill free to use?

The skill is published under the MIT licence. The required Python packages are open source, but optional sorters, models or API calls may have their own terms or costs, so check those separately.

How do I install an agent skill in Claude?

Download the skill ZIP and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder. In the Claude apps, you can instead upload the ZIP under Settings, then Capabilities, then Skills.

What do I need to run the Neuropixels skill?

You need Python 3 with SpikeInterface, ProbeInterface, Neo, NumPy, SciPy, pandas, matplotlib, numba and scikit-learn, plus raw Neuropixels files with their metadata. Kilosort4 and other sorters are optional and need separate installs, and some may need a GPU.

Does this skill work with Open Ephys or NWB files?

Yes. The skill's reader list includes si.read_openephys() for Open Ephys folders and si.read_nwb() for NWB files, alongside SpikeGLX.

Is it safe to let an agent run this skill on my data?

Review the commands it proposes, since the skill runs scripts and uses the network. Back up your raw data first, because the workflow writes preprocessed copies, motion outputs and sorting folders to disk.

How does this compare with running SpikeInterface by hand?

The skill packages the same SpikeInterface calls into a documented, repeatable workflow with checks and reference notes. You still need to understand the steps and validate results, because the skill's sorter calls and curation thresholds are illustrative until tested on your own recordings.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you run Neuropixels 1.0 or 2.0 recordings and want an agent to follow a documented SpikeInterface pipeline with drift checks and quality-based curation. Pick something else if your data is not extracellular electrophysiology, or if you need validated, publishable or clinical results without expert review of every step.

Download the skill