[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6M0643ZHCC4AKM2NHHVGRSK":3,"skill-same:01M6M0643ZHCC4AKM2NHHVGRSK":139},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":13,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":52,"install":53,"resources":66},"01M6M0643ZHCC4AKM2NHHVGRSK","neuropixels-analysis",null,"Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.","endman100\u002Fskill-router-nexus","endman100","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F31997019?v=4","01M6KPDX17BYDWW4RRB0TNGGMX","01M6KPDX64Y2QBEWVFG5W5PWPF",0,"MIT","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"analysis","neuropixels analysis","motion","when","for","load","recording","curation","with","sorting","unit","quality metrics","visual","spike","Neural","recordings","use","quality","open","data","metrics","2026-11-10 10:12:30",false,"---\nname: neuropixels-analysis\ndescription: Neuropixels neural recording analysis. Load SpikeGLX\u002FOpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen\u002FIBL curation, AI-assisted visual analysis, for Neuropixels 1.0\u002F2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.\nlicense: MIT license\nmetadata:\n    skill-author: K-Dense Inc.\n---\n\n# Neuropixels Data Analysis\n\n## Overview\n\nComprehensive toolkit for analyzing Neuropixels high-density neural recordings using current best practices from SpikeInterface, Allen Institute, and International Brain Laboratory (IBL). Supports the full workflow from raw data to publication-ready curated units.\n\n## When to Use This Skill\n\nThis skill should be used when:\n- Working with Neuropixels recordings (.ap.bin, .lf.bin, .meta files)\n- Loading data from SpikeGLX, Open Ephys, or NWB formats\n- Preprocessing neural recordings (filtering, CAR, bad channel detection)\n- Detecting and correcting motion\u002Fdrift in recordings\n- Running spike sorting (Kilosort4, SpykingCircus2, Mountainsort5)\n- Computing quality metrics (SNR, ISI violations, presence ratio)\n- Curating units using Allen\u002FIBL criteria\n- Creating visualizations of neural data\n- Exporting results to Phy or NWB\n\n## Supported Hardware & Formats\n\n| Probe | Electrodes | Channels | Notes |\n|-------|-----------|----------|-------|\n| Neuropixels 1.0 | 960 | 384 | Requires phase_shift correction |\n| Neuropixels 2.0 (single) | 1280 | 384 | Denser geometry |\n| Neuropixels 2.0 (4-shank) | 5120 | 384 | Multi-region recording |\n\n| Format | Extension | Reader |\n|--------|-----------|--------|\n| SpikeGLX | `.ap.bin`, `.lf.bin`, `.meta` | `si.read_spikeglx()` |\n| Open Ephys | `.continuous`, `.oebin` | `si.read_openephys()` |\n| NWB | `.nwb` | `si.read_nwb()` |\n\n## Quick Start\n\n### Basic Import and Setup\n\n```python\nimport spikeinterface.full as si\nimport neuropixels_analysis as npa\n\n# Configure parallel processing\njob_kwargs = dict(n_jobs=-1, chunk_duration='1s', progress_bar=True)\n```\n\n### Loading Data\n\n```python\n# SpikeGLX (most common)\nrecording = si.read_spikeglx('\u002Fpath\u002Fto\u002Fdata', stream_id='imec0.ap')\n\n# Open Ephys (common for many labs)\nrecording = si.read_openephys('\u002Fpath\u002Fto\u002FRecord_Node_101\u002F')\n\n# Check available streams\nstreams, ids = si.get_neo_streams('spikeglx', '\u002Fpath\u002Fto\u002Fdata')\nprint(streams)  # ['imec0.ap', 'imec0.lf', 'nidq']\n\n# For testing with subset of data\nrecording = recording.frame_slice(0, int(60 * recording.get_sampling_frequency()))\n```\n\n### Complete Pipeline (One Command)\n\n```python\n# Run full analysis pipeline\nresults = npa.run_pipeline(\n    recording,\n    output_dir='output\u002F',\n    sorter='kilosort4',\n    curation_method='allen',\n)\n\n# Access results\nsorting = results['sorting']\nmetrics = results['metrics']\nlabels = results['labels']\n```\n\n## Standard Analysis Workflow\n\n### 1. Preprocessing\n\n```python\n# Recommended preprocessing chain\nrec = si.highpass_filter(recording, freq_min=400)\nrec = si.phase_shift(rec)  # Required for Neuropixels 1.0\nbad_ids, _ = si.detect_bad_channels(rec)\nrec = rec.remove_channels(bad_ids)\nrec = si.common_reference(rec, operator='median')\n\n# Or use our wrapper\nrec = npa.preprocess(recording)\n```\n\n### 2. Check and Correct Drift\n\n```python\n# Check for drift (always do this!)\nmotion_info = npa.estimate_motion(rec, preset='kilosort_like')\nnpa.plot_drift(rec, motion_info, output='drift_map.png')\n\n# Apply correction if needed\nif motion_info['motion'].max() > 10:  # microns\n    rec = npa.correct_motion(rec, preset='nonrigid_accurate')\n```\n\n### 3. Spike Sorting\n\n```python\n# Kilosort4 (recommended, requires GPU)\nsorting = si.run_sorter('kilosort4', rec, folder='ks4_output')\n\n# CPU alternatives\nsorting = si.run_sorter('tridesclous2', rec, folder='tdc2_output')\nsorting = si.run_sorter('spykingcircus2', rec, folder='sc2_output')\nsorting = si.run_sorter('mountainsort5', rec, folder='ms5_output')\n\n# Check available sorters\nprint(si.installed_sorters())\n```\n\n### 4. Postprocessing\n\n```python\n# Create analyzer and compute all extensions\nanalyzer = si.create_sorting_analyzer(sorting, rec, sparse=True)\n\nanalyzer.compute('random_spikes', max_spikes_per_unit=500)\nanalyzer.compute('waveforms', ms_before=1.0, ms_after=2.0)\nanalyzer.compute('templates', operators=['average', 'std'])\nanalyzer.compute('spike_amplitudes')\nanalyzer.compute('correlograms', window_ms=50.0, bin_ms=1.0)\nanalyzer.compute('unit_locations', method='monopolar_triangulation')\nanalyzer.compute('quality_metrics')\n\nmetrics = analyzer.get_extension('quality_metrics').get_data()\n```\n\n### 5. Curation\n\n```python\n# Allen Institute criteria (conservative)\ngood_units = metrics.query(\"\"\"\n    presence_ratio > 0.9 and\n    isi_violations_ratio \u003C 0.5 and\n    amplitude_cutoff \u003C 0.1\n\"\"\").index.tolist()\n\n# Or use automated curation\nlabels = npa.curate(metrics, method='allen')  # 'allen', 'ibl', 'strict'\n```\n\n### 6. AI-Assisted Curation (For Uncertain Units)\n\nWhen using this skill with Claude Code, Claude can directly analyze waveform plots and provide expert curation decisions. For programmatic API access:\n\n```python\nfrom anthropic import Anthropic\n\n# Setup API client\nclient = Anthropic()\n\n# Analyze uncertain units visually\nuncertain = metrics.query('snr > 3 and snr \u003C 8').index.tolist()\n\nfor unit_id in uncertain:\n    result = npa.analyze_unit_visually(analyzer, unit_id, api_client=client)\n    print(f\"Unit {unit_id}: {result['classification']}\")\n    print(f\"  Reasoning: {result['reasoning'][:100]}...\")\n```\n\n**Claude Code Integration**: When running within Claude Code, ask Claude to examine waveform\u002Fcorrelogram plots directly - no API setup required.\n\n### 7. Generate Analysis Report\n\n```python\n# Generate comprehensive HTML report with visualizations\nreport_dir = npa.generate_analysis_report(results, 'output\u002F')\n# Opens report.html with summary stats, figures, and unit table\n\n# Print formatted summary to console\nnpa.print_analysis_summary(results)\n```\n\n### 8. Export Results\n\n```python\n# Export to Phy for manual review\nsi.export_to_phy(analyzer, output_folder='phy_export\u002F',\n                 compute_pc_features=True, compute_amplitudes=True)\n\n# Export to NWB\nfrom spikeinterface.exporters import export_to_nwb\nexport_to_nwb(rec, sorting, 'output.nwb')\n\n# Save quality metrics\nmetrics.to_csv('quality_metrics.csv')\n```\n\n## Common Pitfalls and Best Practices\n\n1. **Always check drift** before spike sorting - drift > 10μm significantly impacts quality\n2. **Use phase_shift** for Neuropixels 1.0 probes (not needed for 2.0)\n3. **Save preprocessed data** to avoid recomputing - use `rec.save(folder='preprocessed\u002F')`\n4. **Use GPU** for Kilosort4 - it's 10-50x faster than CPU alternatives\n5. **Review uncertain units manually** - automated curation is a starting point\n6. **Combine metrics with AI** - use metrics for clear cases, AI for borderline units\n7. **Document your thresholds** - different analyses may need different criteria\n8. **Export to Phy** for critical experiments - human oversight is valuable\n\n## Key Parameters to Adjust\n\n### Preprocessing\n- `freq_min`: Highpass cutoff (300-400 Hz typical)\n- `detect_threshold`: Bad channel detection sensitivity\n\n### Motion Correction\n- `preset`: 'kilosort_like' (fast) or 'nonrigid_accurate' (better for severe drift)\n\n### Spike Sorting (Kilosort4)\n- `batch_size`: Samples per batch (30000 default)\n- `nblocks`: Number of drift blocks (increase for long recordings)\n- `Th_learned`: Detection threshold (lower = more spikes)\n\n### Quality Metrics\n- `snr_threshold`: Signal-to-noise cutoff (3-5 typical)\n- `isi_violations_ratio`: Refractory violations (0.01-0.5)\n- `presence_ratio`: Recording coverage (0.5-0.95)\n\n## Bundled Resources\n\n### scripts\u002Fpreprocess_recording.py\nAutomated preprocessing script:\n```bash\npython scripts\u002Fpreprocess_recording.py \u002Fpath\u002Fto\u002Fdata --output preprocessed\u002F\n```\n\n### scripts\u002Frun_sorting.py\nRun spike sorting:\n```bash\npython scripts\u002Frun_sorting.py preprocessed\u002F --sorter kilosort4 --output sorting\u002F\n```\n\n### scripts\u002Fcompute_metrics.py\nCompute quality metrics and apply curation:\n```bash\npython scripts\u002Fcompute_metrics.py sorting\u002F preprocessed\u002F --output metrics\u002F --curation allen\n```\n\n### scripts\u002Fexport_to_phy.py\nExport to Phy for manual curation:\n```bash\npython scripts\u002Fexport_to_phy.py metrics\u002Fanalyzer --output phy_export\u002F\n```\n\n### assets\u002Fanalysis_template.py\nComplete analysis template. Copy and customize:\n```bash\ncp assets\u002Fanalysis_template.py my_analysis.py\n# Edit parameters and run\npython my_analysis.py\n```\n\n### references\u002Fstandard_workflow.md\nDetailed step-by-step workflow with explanations for each stage.\n\n### references\u002Fapi_reference.md\nQuick function reference organized by module.\n\n### references\u002Fplotting_guide.md\nComprehensive visualization guide for publication-quality figures.\n\n## Detailed Reference Guides\n\n| Topic | Reference |\n|-------|-----------|\n| Full workflow | [references\u002Fstandard_workflow.md](references\u002Fstandard_workflow.md) |\n| API reference | [references\u002Fapi_reference.md](references\u002Fapi_reference.md) |\n| Plotting guide | [references\u002Fplotting_guide.md](references\u002Fplotting_guide.md) |\n| Preprocessing | [references\u002FPREPROCESSING.md](references\u002FPREPROCESSING.md) |\n| Spike sorting | [references\u002FSPIKE_SORTING.md](references\u002FSPIKE_SORTING.md) |\n| Motion correction | [references\u002FMOTION_CORRECTION.md](references\u002FMOTION_CORRECTION.md) |\n| Quality metrics | [references\u002FQUALITY_METRICS.md](references\u002FQUALITY_METRICS.md) |\n| Automated curation | [references\u002FAUTOMATED_CURATION.md](references\u002FAUTOMATED_CURATION.md) |\n| AI-assisted curation | [references\u002FAI_CURATION.md](references\u002FAI_CURATION.md) |\n| Waveform analysis | [references\u002FANALYSIS.md](references\u002FANALYSIS.md) |\n\n## Installation\n\n```bash\n# Core packages\npip install spikeinterface[full] probeinterface neo\n\n# Spike sorters\npip install kilosort          # Kilosort4 (GPU required)\npip install spykingcircus     # SpykingCircus2 (CPU)\npip install mountainsort5     # Mountainsort5 (CPU)\n\n# Our toolkit\npip install neuropixels-analysis\n\n# Optional: AI curation\npip install anthropic\n\n# Optional: IBL tools\npip install ibl-neuropixel ibllib\n```\n\n## Project Structure\n\n```\nproject\u002F\n├── raw_data\u002F\n│   └── recording_g0\u002F\n│       └── recording_g0_imec0\u002F\n│           ├── recording_g0_t0.imec0.ap.bin\n│           └── recording_g0_t0.imec0.ap.meta\n├── preprocessed\u002F           # Saved preprocessed recording\n├── motion\u002F                 # Motion estimation results\n├── sorting_output\u002F         # Spike sorter output\n├── analyzer\u002F               # SortingAnalyzer (waveforms, metrics)\n├── phy_export\u002F             # For manual curation\n├── ai_curation\u002F            # AI analysis reports\n└── results\u002F\n    ├── quality_metrics.csv\n    ├── curation_labels.json\n    └── output.nwb\n```\n\n## Additional Resources\n\n- **SpikeInterface Docs**: https:\u002F\u002Fspikeinterface.readthedocs.io\u002F\n- **Neuropixels Tutorial**: https:\u002F\u002Fspikeinterface.readthedocs.io\u002Fen\u002Fstable\u002Fhow_to\u002Fanalyze_neuropixels.html\n- **Kilosort4 GitHub**: https:\u002F\u002Fgithub.com\u002FMouseLand\u002FKilosort\n- **IBL Neuropixel Tools**: https:\u002F\u002Fgithub.com\u002Fint-brain-lab\u002Fibl-neuropixel\n- **Allen Institute ecephys**: https:\u002F\u002Fgithub.com\u002FAllenInstitute\u002Fecephys_spike_sorting\n- **Bombcell (Automated QC)**: https:\u002F\u002Fgithub.com\u002FJulie-Fabre\u002Fbombcell\n- **SpikeAgent (AI Curation)**: https:\u002F\u002Fgithub.com\u002FSpikeAgent\u002FSpikeAgent\n\n","# Neuropixels Data Analysis\n\n## Overview\n\nComprehensive toolkit for analyzing Neuropixels high-density neural recordings using current best practices from SpikeInterface, Allen Institute, and International Brain Laboratory (IBL). Supports the full workflow from raw data to publication-ready curated units.\n\n## When to Use This Skill\n\nThis skill should be used when:\n- Working with Neuropixels recordings (.ap.bin, .lf.bin, .meta files)\n- Loading data from SpikeGLX, Open Ephys, or NWB formats\n- Preprocessing neural recordings (filtering, CAR, bad channel detection)\n- Detecting and correcting motion\u002Fdrift in recordings\n- Running spike sorting (Kilosort4, SpykingCircus2, Mountainsort5)\n- Computing quality metrics (SNR, ISI violations, presence ratio)\n- Curating units using Allen\u002FIBL criteria\n- Creating visualizations of neural data\n- Exporting results to Phy or NWB\n\n## Supported Hardware & Formats\n\n| Probe | Electrodes | Channels | Notes |\n|-------|-----------|----------|-------|\n| Neuropixels 1.0 | 960 | 384 | Requires phase_shift correction |\n| Neuropixels 2.0 (single) | 1280 | 384 | Denser geometry |\n| Neuropixels 2.0 (4-shank) | 5120 | 384 | Multi-region recording |\n\n| Format | Extension | Reader |\n|--------|-----------|--------|\n| SpikeGLX | `.ap.bin`, `.lf.bin`, `.meta` | `si.read_spikeglx()` |\n| Open Ephys | `.continuous`, `.oebin` | `si.read_openephys()` |\n| NWB | `.nwb` | `si.read_nwb()` |\n\n## Quick Start\n\n### Basic Import and Setup\n\n```python\nimport spikeinterface.full as si\nimport neuropixels_analysis as npa\n\n# Configure parallel processing\njob_kwargs = dict(n_jobs=-1, chunk_duration='1s', progress_bar=True)\n```\n\n### Loading Data\n\n```python\n# SpikeGLX (most common)\nrecording = si.read_spikeglx('\u002Fpath\u002Fto\u002Fdata', stream_id='imec0.ap')\n\n# Open Ephys (common for many labs)\nrecording = si.read_openephys('\u002Fpath\u002Fto\u002FRecord_Node_101\u002F')\n\n# Check available streams\nstreams, ids = si.get_neo_streams('spikeglx', '\u002Fpath\u002Fto\u002Fdata')\nprint(streams)  # ['imec0.ap', 'imec0.lf', 'nidq']\n\n# For testing with subset of data\nrecording = recording.frame_slice(0, int(60 * recording.get_sampling_frequency()))\n```\n\n### Complete Pipeline (One Command)\n\n```python\n# Run full analysis pipeline\nresults = npa.run_pipeline(\n    recording,\n    output_dir='output\u002F',\n    sorter='kilosort4',\n    curation_method='allen',\n)\n\n# Access results\nsorting = results['sorting']\nmetrics = results['metrics']\nlabels = results['labels']\n```\n\n## Standard Analysis Workflow\n\n### 1. Preprocessing\n\n```python\n# Recommended preprocessing chain\nrec = si.highpass_filter(recording, freq_min=400)\nrec = si.phase_shift(rec)  # Required for Neuropixels 1.0\nbad_ids, _ = si.detect_bad_channels(rec)\nrec = rec.remove_channels(bad_ids)\nrec = si.common_reference(rec, operator='median')\n\n# Or use our wrapper\nrec = npa.preprocess(recording)\n```\n\n### 2. Check and Correct Drift\n\n```python\n# Check for drift (always do this!)\nmotion_info = npa.estimate_motion(rec, preset='kilosort_like')\nnpa.plot_drift(rec, motion_info, output='drift_map.png')\n\n# Apply correction if needed\nif motion_info['motion'].max() > 10:  # microns\n    rec = npa.correct_motion(rec, preset='nonrigid_accurate')\n```\n\n### 3. Spike Sorting\n\n```python\n# Kilosort4 (recommended, requires GPU)\nsorting = si.run_sorter('kilosort4', rec, folder='ks4_output')\n\n# CPU alternatives\nsorting = si.run_sorter('tridesclous2', rec, folder='tdc2_output')\nsorting = si.run_sorter('spykingcircus2', rec, folder='sc2_output')\nsorting = si.run_sorter('mountainsort5', rec, folder='ms5_output')\n\n# Check available sorters\nprint(si.installed_sorters())\n```\n\n### 4. Postprocessing\n\n```python\n# Create analyzer and compute all extensions\nanalyzer = si.create_sorting_analyzer(sorting, rec, sparse=True)\n\nanalyzer.compute('random_spikes', max_spikes_per_unit=500)\nanalyzer.compute('waveforms', ms_before=1.0, ms_after=2.0)\nanalyzer.compute('templates', operators=['average', 'std'])\nanalyzer.compute('spike_amplitudes')\nanalyzer.compute('correlograms', window_ms=50.0, bin_ms=1.0)\nanalyzer.compute('unit_locations', method='monopolar_triangulation')\nanalyzer.compute('quality_metrics')\n\nmetrics = analyzer.get_extension('quality_metrics').get_data()\n```\n\n### 5. Curation\n\n```python\n# Allen Institute criteria (conservative)\ngood_units = metrics.query(\"\"\"\n    presence_ratio > 0.9 and\n    isi_violations_ratio \u003C 0.5 and\n    amplitude_cutoff \u003C 0.1\n\"\"\").index.tolist()\n\n# Or use automated curation\nlabels = npa.curate(metrics, method='allen')  # 'allen', 'ibl', 'strict'\n```\n\n### 6. AI-Assisted Curation (For Uncertain Units)\n\nWhen using this skill with Claude Code, Claude can directly analyze waveform plots and provide expert curation decisions. For programmatic API access:\n\n```python\nfrom anthropic import Anthropic\n\n# Setup API client\nclient = Anthropic()\n\n# Analyze uncertain units visually\nuncertain = metrics.query('snr > 3 and snr \u003C 8').index.tolist()\n\nfor unit_id in uncertain:\n    result = npa.analyze_unit_visually(analyzer, unit_id, api_client=client)\n    print(f\"Unit {unit_id}: {result['classification']}\")\n    print(f\"  Reasoning: {result['reasoning'][:100]}...\")\n```\n\n**Claude Code Integration**: When running within Claude Code, ask Claude to examine waveform\u002Fcorrelogram plots directly - no API setup required.\n\n### 7. Generate Analysis Report\n\n```python\n# Generate comprehensive HTML report with visualizations\nreport_dir = npa.generate_analysis_report(results, 'output\u002F')\n# Opens report.html with summary stats, figures, and unit table\n\n# Print formatted summary to console\nnpa.print_analysis_summary(results)\n```\n\n### 8. Export Results\n\n```python\n# Export to Phy for manual review\nsi.export_to_phy(analyzer, output_folder='phy_export\u002F',\n                 compute_pc_features=True, compute_amplitudes=True)\n\n# Export to NWB\nfrom spikeinterface.exporters import export_to_nwb\nexport_to_nwb(rec, sorting, 'output.nwb')\n\n# Save quality metrics\nmetrics.to_csv('quality_metrics.csv')\n```\n\n## Common Pitfalls and Best Practices\n\n1. **Always check drift** before spike sorting - drift > 10μm significantly impacts quality\n2. **Use phase_shift** for Neuropixels 1.0 probes (not needed for 2.0)\n3. **Save preprocessed data** to avoid recomputing - use `rec.save(folder='preprocessed\u002F')`\n4. **Use GPU** for Kilosort4 - it's 10-50x faster than CPU alternatives\n5. **Review uncertain units manually** - automated curation is a starting point\n6. **Combine metrics with AI** - use metrics for clear cases, AI for borderline units\n7. **Document your thresholds** - different analyses may need different criteria\n8. **Export to Phy** for critical experiments - human oversight is valuable\n\n## Key Parameters to Adjust\n\n### Preprocessing\n- `freq_min`: Highpass cutoff (300-400 Hz typical)\n- `detect_threshold`: Bad channel detection sensitivity\n\n### Motion Correction\n- `preset`: 'kilosort_like' (fast) or 'nonrigid_accurate' (better for severe drift)\n\n### Spike Sorting (Kilosort4)\n- `batch_size`: Samples per batch (30000 default)\n- `nblocks`: Number of drift blocks (increase for long recordings)\n- `Th_learned`: Detection threshold (lower = more spikes)\n\n### Quality Metrics\n- `snr_threshold`: Signal-to-noise cutoff (3-5 typical)\n- `isi_violations_ratio`: Refractory violations (0.01-0.5)\n- `presence_ratio`: Recording coverage (0.5-0.95)\n\n## Bundled Resources\n\n### scripts\u002Fpreprocess_recording.py\nAutomated preprocessing script:\n```bash\npython scripts\u002Fpreprocess_recording.py \u002Fpath\u002Fto\u002Fdata --output preprocessed\u002F\n```\n\n### scripts\u002Frun_sorting.py\nRun spike sorting:\n```bash\npython scripts\u002Frun_sorting.py preprocessed\u002F --sorter kilosort4 --output sorting\u002F\n```\n\n### scripts\u002Fcompute_metrics.py\nCompute quality metrics and apply curation:\n```bash\npython scripts\u002Fcompute_metrics.py sorting\u002F preprocessed\u002F --output metrics\u002F --curation allen\n```\n\n### scripts\u002Fexport_to_phy.py\nExport to Phy for manual curation:\n```bash\npython scripts\u002Fexport_to_phy.py metrics\u002Fanalyzer --output phy_export\u002F\n```\n\n### assets\u002Fanalysis_template.py\nComplete analysis template. Copy and customize:\n```bash\ncp assets\u002Fanalysis_template.py my_analysis.py\n# Edit parameters and run\npython my_analysis.py\n```\n\n### references\u002Fstandard_workflow.md\nDetailed step-by-step workflow with explanations for each stage.\n\n### references\u002Fapi_reference.md\nQuick function reference organized by module.\n\n### references\u002Fplotting_guide.md\nComprehensive visualization guide for publication-quality figures.\n\n## Detailed Reference Guides\n\n| Topic | Reference |\n|-------|-----------|\n| Full workflow | [references\u002Fstandard_workflow.md](references\u002Fstandard_workflow.md) |\n| API reference | [references\u002Fapi_reference.md](references\u002Fapi_reference.md) |\n| Plotting guide | [references\u002Fplotting_guide.md](references\u002Fplotting_guide.md) |\n| Preprocessing | [references\u002FPREPROCESSING.md](references\u002FPREPROCESSING.md) |\n| Spike sorting | [references\u002FSPIKE_SORTING.md](references\u002FSPIKE_SORTING.md) |\n| Motion correction | [references\u002FMOTION_CORRECTION.md](references\u002FMOTION_CORRECTION.md) |\n| Quality metrics | [references\u002FQUALITY_METRICS.md](references\u002FQUALITY_METRICS.md) |\n| Automated curation | [references\u002FAUTOMATED_CURATION.md](references\u002FAUTOMATED_CURATION.md) |\n| AI-assisted curation | [references\u002FAI_CURATION.md](references\u002FAI_CURATION.md) |\n| Waveform analysis | [references\u002FANALYSIS.md](references\u002FANALYSIS.md) |\n\n## Installation\n\n```bash\n# Core packages\npip install spikeinterface[full] probeinterface neo\n\n# Spike sorters\npip install kilosort          # Kilosort4 (GPU required)\npip install spykingcircus     # SpykingCircus2 (CPU)\npip install mountainsort5     # Mountainsort5 (CPU)\n\n# Our toolkit\npip install neuropixels-analysis\n\n# Optional: AI curation\npip install anthropic\n\n# Optional: IBL tools\npip install ibl-neuropixel ibllib\n```\n\n## Project Structure\n\n```\nproject\u002F\n├── raw_data\u002F\n│   └── recording_g0\u002F\n│       └── recording_g0_imec0\u002F\n│           ├── recording_g0_t0.imec0.ap.bin\n│           └── recording_g0_t0.imec0.ap.meta\n├── preprocessed\u002F           # Saved preprocessed recording\n├── motion\u002F                 # Motion estimation results\n├── sorting_output\u002F         # Spike sorter output\n├── analyzer\u002F               # SortingAnalyzer (waveforms, metrics)\n├── phy_export\u002F             # For manual curation\n├── ai_curation\u002F            # AI analysis reports\n└── results\u002F\n    ├── quality_metrics.csv\n    ├── curation_labels.json\n    └── output.nwb\n```\n\n## Additional Resources\n\n- **SpikeInterface Docs**: https:\u002F\u002Fspikeinterface.readthedocs.io\u002F\n- **Neuropixels Tutorial**: https:\u002F\u002Fspikeinterface.readthedocs.io\u002Fen\u002Fstable\u002Fhow_to\u002Fanalyze_neuropixels.html\n- **Kilosort4 GitHub**: https:\u002F\u002Fgithub.com\u002FMouseLand\u002FKilosort\n- **IBL Neuropixel Tools**: https:\u002F\u002Fgithub.com\u002Fint-brain-lab\u002Fibl-neuropixel\n- **Allen Institute ecephys**: https:\u002F\u002Fgithub.com\u002FAllenInstitute\u002Fecephys_spike_sorting\n- **Bombcell (Automated QC)**: https:\u002F\u002Fgithub.com\u002FJulie-Fabre\u002Fbombcell\n- **SpikeAgent (AI Curation)**: https:\u002F\u002Fgithub.com\u002FSpikeAgent\u002FSpikeAgent\n\n",{"name":5,"license":44,"metadata":45,"description":7},"MIT license",{"skill-author":46},"K-Dense Inc.","main","f19b254e8975d0bfddb394686706106930d7964d","Science\u002Fclinical-and-medical\u002Fneuropixels-analysis","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus","https:\u002F\u002Fgithub.com\u002Fendman100","2026-11-13 20:29:52",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add endman100\u002Fskill-router-nexus --skill neuropixels-analysis",{"tool":59,"command":60},"bunx","bunx skills add endman100\u002Fskill-router-nexus --skill neuropixels-analysis",{"tool":62,"command":63},"pnpm","pnpm dlx skills add endman100\u002Fskill-router-nexus --skill neuropixels-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002FSKILL.md",true,[67,73,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"assets\u002Fanalysis_template.py","SCRIPT","脚本",9014,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Fassets\u002Fanalysis_template.py",{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002FAI_CURATION.md","REFERENCE","参考文档",8635,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002FAI_CURATION.md",{"path":80,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002FANALYSIS.md",9869,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002FANALYSIS.md",{"path":84,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fapi_reference.md",8153,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002Fapi_reference.md",{"path":88,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002FAUTOMATED_CURATION.md",10033,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002FAUTOMATED_CURATION.md",{"path":92,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002FMOTION_CORRECTION.md",8670,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002FMOTION_CORRECTION.md",{"path":96,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Fplotting_guide.md",10837,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002Fplotting_guide.md",{"path":100,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002FPREPROCESSING.md",6696,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002FPREPROCESSING.md",{"path":104,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002FQUALITY_METRICS.md",9454,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002FQUALITY_METRICS.md",{"path":108,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002FSPIKE_SORTING.md",7918,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002FSPIKE_SORTING.md",{"path":112,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002Fstandard_workflow.md",8646,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Freferences\u002Fstandard_workflow.md",{"path":116,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":117,"sourceHtmlUrl":118},"scripts\u002Fcompute_metrics.py",5226,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Fscripts\u002Fcompute_metrics.py",{"path":120,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":121,"sourceHtmlUrl":122},"scripts\u002Fexplore_recording.py",5529,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Fscripts\u002Fexplore_recording.py",{"path":124,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":125,"sourceHtmlUrl":126},"scripts\u002Fexport_to_phy.py",2477,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Fscripts\u002Fexport_to_phy.py",{"path":128,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":129,"sourceHtmlUrl":130},"scripts\u002Fneuropixels_pipeline.py",13286,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Fscripts\u002Fneuropixels_pipeline.py",{"path":132,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":133,"sourceHtmlUrl":134},"scripts\u002Fpreprocess_recording.py",4235,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Fscripts\u002Fpreprocess_recording.py",{"path":136,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":137,"sourceHtmlUrl":138},"scripts\u002Frun_sorting.py",2573,"https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FScience\u002Fclinical-and-medical\u002Fneuropixels-analysis\u002Fscripts\u002Frun_sorting.py",[140,149,176,200,224,239],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":144,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":148},"01M7B8ZGJ7NXTMECB5GWFAAWM4","blender-web-3d","Work with Blender from Claude — headless CLI or the Blender MCP — to build, modify, render, and publish any 3D model as a stunning, fast Three.js\u002FNext.js web experience (gltf-transform meshopt\u002FKTX2, AgX colour pipeline, custom GLSL shaders and material patches, procedural sky\u002Fplanet, bloom, adaptive quality, runtime batching, baked lightmaps, Vercel deploy). Use whenever the user wants to create, improve, fix, render, or iterate on a Blender model or scene — \"improve the model\", \"make it look stunning\", \"render this\", \"make a 3D web demo\", \"export to GLB\", \"use blender\", \"looks wrong in the browser\", \"optimize the 3D scene\", \"add shaders\", \"it's slow\", or screenshot-driven feedback on a 3D asset. Also for debugging a Three.js viewer that renders black, glows wrong, or loses\u002Fdetaches parts, and for choosing Blender MCP vs headless CLI. Ships a runnable demo model and viewer template.","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FVideo-and-Print\u002Fblender-web-3d\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FVideo-and-Print\u002Fblender-web-3d\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":153,"licenseFileUrl":154,"sourceHtmlUrl":155,"categories":156,"keywords":157,"publishedAt":175},"01M6M35YSZVTJV8WKCPYTR1D7E","guizang-ppt-skill","生成横向翻页网页 PPT（单 HTML 文件），含 WebGL 背景、章节幕封、数据大字报、图片网格等模板。提供两种风格：① \"电子杂志 × 电子墨水\"（衬线 + 流体背景 + 暖色） ② \"瑞士国际主义\"（无衬线 + 网格点阵 + IKB\u002F柠檬黄\u002F柠檬绿\u002F安全橙高亮）。当用户需要制作分享 \u002F 演讲 \u002F 发布会风格的网页 PPT，或提到\"杂志风 PPT\"、\"瑞士风 PPT\"、\"Swiss Style\"、\"horizontal swipe deck\"时使用。","AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWeb-Design\u002Fmedia-docs-and-content\u002Fguizang-ppt-skill\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWeb-Design\u002Fmedia-docs-and-content\u002Fguizang-ppt-skill\u002FSKILL.md",[],[158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174],"pptx","guizang","guizang ppt","guizang ppt skill","数据","webgl","html","style","ikb","swipe","image","安全","生成","文件","deck","演讲","swiss","2026-11-12 13:55:43",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":180,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":175},"01M6M2975GEN1339YEPZ61XMRJ","youtube-clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FVideo-Editing\u002Fyoutube-clipper\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FVideo-Editing\u002Fyoutube-clipper\u002FSKILL.md",[],[184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,170,199],"youtube clipper","clipper","youtube","read","翻译","文案","Video","clip","关键词","总结","sonnet","下载","视频","Bash","工具","write",{"skillNo":201,"name":202,"nameZh":6,"description":203,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":204,"licenseFileUrl":205,"sourceHtmlUrl":206,"categories":207,"keywords":208,"publishedAt":175},"01M6KSWDBWVPF8ZKCVF2EXCBPH","slack-gif-creator","Toolkit for creating animated GIFs optimized for Slack, with validators for size constraints and composable animation primitives. This skill applies when users request animated GIFs or emoji animations for Slack from descriptions like \"make me a GIF for Slack of X doing Y\".","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FCommunication\u002Fslack-gif-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FCommunication\u002Fslack-gif-creator\u002FSKILL.md",[],[209,210,211,212,213,214,215,216,26,217,218,22,219,220,221,222,223],"slack gif creator","gif","creator","slack","users","emoji","constraints","size","toolkit","composable","make","primitives","request","me","Animation",{"skillNo":225,"name":226,"nameZh":6,"description":227,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":228,"sourceHtmlUrl":229,"categories":230,"keywords":231,"publishedAt":39},"01M6MPCT5BXVER8HQZTW3QE9AS","create-master","基于佛教经典文献，生成特定高僧大德的 AI 教学角色","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FMetaphysics-and-Spirituality\u002FMaster-skill\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FMetaphysics-and-Spirituality\u002FMaster-skill\u002FSKILL.md",[],[232,233,234,197,170,235,236,237,199,187,238],"create","create master","master","true","grep","edit","webfetch",{"skillNo":240,"name":241,"nameZh":6,"description":242,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":243,"sourceHtmlUrl":244,"categories":245,"keywords":246,"publishedAt":39},"01M6M43AKE95Y64E1JRXEF5QQ3","writing-dna-skill","从至少 20 篇完整文章中蒸馏可复用的写作 DNA，分析语言、文章结构、选题逻辑、素材策略、认知框架和视觉风格，并生成 Writing-DNA.md；按该 DNA 写作时会读取全部蒸馏产物和 5 篇相关原文。用于中英文作者、账号、品牌或出版物的风格分析与一致性写作。 Distill reusable Writing DNA from at least 20 complete articles for Chinese or English authors, publications, brands, and accounts; use for language, structure, topic logic, source strategy, cognitive-frame, and visual-style analysis.","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fwriting-dna-skill\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fendman100\u002Fskill-router-nexus\u002Fblob\u002Fmain\u002FWriting-and-Content\u002Fwriting-dna-skill\u002FSKILL.md",[],[247,248,249,250,22,251,252,253,170,254,255,256,257,165,258,259,18,30,260,34],"writing","writing dna skill","DNA","chinese","complete","distill","strategy","at","source","frame","logic","structure","english","reusable"]