[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M739Z519Y87QANRDMAMYBN1X":3,"skill-same:01M739Z519Y87QANRDMAMYBN1X":121},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M739Z519Y87QANRDMAMYBN1X","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.","qhjqhj00\u002Fresearch-skills-pool","qhjqhj00","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F29684092?v=4","01M72AE0ZGXVM5C57N512DGQG8","Tommy Chien","01M72AE107ESJMHT7QC5SXX144",3,"MIT","https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002FSKILL.md",[],[],"2026-11-11 15:11:14",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":24,"metadata":25,"description":7},"MIT license",{"skill-author":26},"K-Dense Inc.","master","c247302c836de6438d746b45670990eb71691166","skills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis",1,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool","https:\u002F\u002Fgithub.com\u002Fqhjqhj00","chien.io","2026-05-11 15:07:59",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add qhjqhj00\u002Fresearch-skills-pool --skill neuropixels-analysis",{"tool":41,"command":42},"bunx","bunx skills add qhjqhj00\u002Fresearch-skills-pool --skill neuropixels-analysis",{"tool":44,"command":45},"pnpm","pnpm dlx skills add qhjqhj00\u002Fresearch-skills-pool --skill neuropixels-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002FSKILL.md",true,[49,55,61,65,69,73,77,81,85,89,93,97,101,105,109,113,117],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"assets\u002Fanalysis_template.py","SCRIPT","脚本",9014,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Fassets\u002Fanalysis_template.py",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002FAI_CURATION.md","REFERENCE","参考文档",8635,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002FAI_CURATION.md",{"path":62,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002FANALYSIS.md",9869,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002FANALYSIS.md",{"path":66,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fapi_reference.md",8153,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002Fapi_reference.md",{"path":70,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002FAUTOMATED_CURATION.md",10033,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002FAUTOMATED_CURATION.md",{"path":74,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002FMOTION_CORRECTION.md",8670,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002FMOTION_CORRECTION.md",{"path":78,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fplotting_guide.md",10837,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002Fplotting_guide.md",{"path":82,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002FPREPROCESSING.md",6696,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002FPREPROCESSING.md",{"path":86,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002FQUALITY_METRICS.md",9454,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002FQUALITY_METRICS.md",{"path":90,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002FSPIKE_SORTING.md",7918,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002FSPIKE_SORTING.md",{"path":94,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fstandard_workflow.md",8646,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Freferences\u002Fstandard_workflow.md",{"path":98,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":99,"sourceHtmlUrl":100},"scripts\u002Fcompute_metrics.py",5226,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Fscripts\u002Fcompute_metrics.py",{"path":102,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":103,"sourceHtmlUrl":104},"scripts\u002Fexplore_recording.py",5529,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Fscripts\u002Fexplore_recording.py",{"path":106,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":107,"sourceHtmlUrl":108},"scripts\u002Fexport_to_phy.py",2477,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Fscripts\u002Fexport_to_phy.py",{"path":110,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":111,"sourceHtmlUrl":112},"scripts\u002Fneuropixels_pipeline.py",13286,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Fscripts\u002Fneuropixels_pipeline.py",{"path":114,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":115,"sourceHtmlUrl":116},"scripts\u002Fpreprocess_recording.py",4235,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Fscripts\u002Fpreprocess_recording.py",{"path":118,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":119,"sourceHtmlUrl":120},"scripts\u002Frun_sorting.py",2573,"https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Fskills_collected\u002FK-Dense-AI--scientific-agent-skills--scientific-skills__neuropixels-analysis\u002Fscripts\u002Frun_sorting.py",[122,129,136,143,150,157],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":19},"01M73JJB6EQPFPPVQK2Y9N67Q0","transformer-lens-interpretability","Provides guidance for mechanistic interpretability research using TransformerLens to inspect and manipulate transformer internals via HookPoints and activation caching. Use when reverse-engineering model algorithms, studying attention patterns, or performing activation patching experiments.","https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Ftop100-runs\u002F130-transformer-lens\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":19},"01M73JHTANRRWEE9HP98TPEHAY","wiki-vitepress","Packages generated wiki Markdown into a VitePress static site with dark theme, dark-mode Mermaid diagrams with click-to-zoom, and production build output. Use when the user wants to create a browsable website from generated wiki pages.","https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Ftop100-runs\u002F126-wiki-vitepress\u002FSKILL.md",[],[],{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":19},"01M73JHJBMVFW46F1Y8K3SBF43","phoenix-observability","Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.","https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Ftop100-runs\u002F124-phoenix\u002FSKILL.md",[],[],{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":19},"01M73JHFPA3A2806PMP42ZN86Q","frontend-ui-dark-ts","Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations. Use when creating dashboards, admin panels, or data-rich interfaces with a refined dark aesthetic.","https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Ftop100-runs\u002F123-frontend-ui-dark-ts\u002FSKILL.md",[],[],{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":156,"publishedAt":19},"01M73JFVBVK57NRJS49TT2VDCT","tensorboard","Visualize training metrics, debug models with histograms, compare experiments, visualize model graphs, and profile performance with TensorBoard - Google's ML visualization toolkit","https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Ftop100-runs\u002F113-tensorboard\u002FSKILL.md",[],[],{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":161,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":19},"01M73JFF6PK6ZCN41C89J7HS2B","markdown-mermaid-writing","Comprehensive markdown and Mermaid diagram writing skill. Use when creating any scientific document, report, analysis, or visualization. Establishes text-based diagrams as the default documentation standard with full style guides (markdown + mermaid), 24 diagram type references, and 9 document templates.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fqhjqhj00\u002Fresearch-skills-pool\u002Fblob\u002Fmaster\u002Ftop100-runs\u002F110-markdown-mermaid-writing\u002FSKILL.md",[],[]]