[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75BDGTC6KY47TMMJM0TCDBB":3,"skill-same:01M75BDGTC6KY47TMMJM0TCDBB":120},{"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":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":30,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M75BDGTC6KY47TMMJM0TCDBB","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.","Lord1Egypt\u002Fai-skillforge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M7597M9CBBVAPX1CYE1KFTSM",2,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",[],[],"2026-11-12 13:55:43",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: Lord1Egypt\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":9},"main","3f88e1b76af67701a6405069a542e21a997d2868","js\u002Fskills\u002Fscientific\u002Fneuropixels-analysis",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-05 10:16:24",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Lord1Egypt\u002Fai-skillforge --skill neuropixels-analysis",{"tool":40,"command":41},"bunx","bunx skills add Lord1Egypt\u002Fai-skillforge --skill neuropixels-analysis",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fai-skillforge --skill neuropixels-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002FSKILL.md",true,[48,54,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"assets\u002Fanalysis_template.py","SCRIPT","脚本",9014,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Fassets\u002Fanalysis_template.py",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002FAI_CURATION.md","REFERENCE","参考文档",8635,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002FAI_CURATION.md",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002FANALYSIS.md",9869,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002FANALYSIS.md",{"path":65,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fapi_reference.md",8153,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002Fapi_reference.md",{"path":69,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002FAUTOMATED_CURATION.md",10033,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002FAUTOMATED_CURATION.md",{"path":73,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002FMOTION_CORRECTION.md",8670,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002FMOTION_CORRECTION.md",{"path":77,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fplotting_guide.md",10837,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002Fplotting_guide.md",{"path":81,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002FPREPROCESSING.md",6696,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002FPREPROCESSING.md",{"path":85,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002FQUALITY_METRICS.md",9454,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002FQUALITY_METRICS.md",{"path":89,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002FSPIKE_SORTING.md",7918,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002FSPIKE_SORTING.md",{"path":93,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fstandard_workflow.md",8646,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Freferences\u002Fstandard_workflow.md",{"path":97,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":98,"sourceHtmlUrl":99},"scripts\u002Fcompute_metrics.py",5226,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Fscripts\u002Fcompute_metrics.py",{"path":101,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":102,"sourceHtmlUrl":103},"scripts\u002Fexplore_recording.py",5529,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Fscripts\u002Fexplore_recording.py",{"path":105,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Fexport_to_phy.py",2477,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Fscripts\u002Fexport_to_phy.py",{"path":109,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Fneuropixels_pipeline.py",13286,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Fscripts\u002Fneuropixels_pipeline.py",{"path":113,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":114,"sourceHtmlUrl":115},"scripts\u002Fpreprocess_recording.py",4235,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Fscripts\u002Fpreprocess_recording.py",{"path":117,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":118,"sourceHtmlUrl":119},"scripts\u002Frun_sorting.py",2573,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fjs\u002Fskills\u002Fscientific\u002Fneuropixels-analysis\u002Fscripts\u002Frun_sorting.py",[121,128,135,142,149,156],{"skillNo":122,"name":123,"nameZh":6,"description":124,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":19},"01M75GWTHWA52GYQKS347FF6CD","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":129,"name":130,"nameZh":6,"description":131,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":19},"01M75GW9FBP9NAFBSNVJ23RHSX","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fwhat-if-oracle\u002FSKILL.md",[],[],{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":19},"01M75GW351MZZQ1V7207PDCX5D","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fvenue-templates\u002FSKILL.md",[],[],{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":19},"01M75GVYGMAZDV2NHWSV6PP6TK","vaex","Use this skill for processing and analyzing large tabular datasets (billions of rows) that exceed available RAM. Vaex excels at out-of-core DataFrame operations, lazy evaluation, fast aggregations, efficient visualization of big data, and machine learning on large datasets. Apply when users need to work with large CSV\u002FHDF5\u002FArrow\u002FParquet files, perform fast statistics on massive datasets, create visualizations of big data, or build ML pipelines that do not fit in memory.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fvaex\u002FSKILL.md",[],[],{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":19},"01M75GVS0ADH3DZ3QB564EVYC9","usfiscaldata","Query the U.S. Treasury Fiscal Data API for federal financial data including national debt, government spending, revenue, interest rates, exchange rates, and savings bonds. Access 54 datasets and 182 data tables with no API key required. Use when working with U.S. federal fiscal data, national debt tracking (Debt to the Penny), Daily Treasury Statements, Monthly Treasury Statements, Treasury securities auctions, interest rates on Treasury securities, foreign exchange rates, savings bonds, or any U.S. government financial statistics.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Fusfiscaldata\u002FSKILL.md",[],[],{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":19},"01M75GVDTBSXRQ4Q11RVJQC56M","treatment-plans","Generate concise (3-4 page), focused medical treatment plans in LaTeX\u002FPDF format for all clinical specialties. Supports general medical treatment, rehabilitation therapy, mental health care, chronic disease management, perioperative care, and pain management. Includes SMART goal frameworks, evidence-based interventions with minimal text citations, regulatory compliance (HIPAA), and professional formatting. Prioritizes brevity and clinical actionability.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fai-skillforge\u002Fblob\u002Fmain\u002Fskills\u002Fscientific\u002Ftreatment-plans\u002FSKILL.md",[],[]]