Eeg
An (agentic) Claude/Codex/Copilot skill to aid ECRs write up preregistrations!From the repository description
npx -y skills add caggursoy/biopsych-prereg-skill --skill eegAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
7.4 KB, ~2.0k tokens by cl100k_base, as published. Nobody here has run it
EEG/ERP Preregistration Skill
Description
Analyzes EEG/ERP research projects and generates comprehensive preregistration documents following community standards. Detects EEG system details, preprocessing parameters, and analysis plan from existing files.
Objective
Generate modality-appropriate EEG/ERP preregistration by:
- Confirming EEG/ERP modality
- Extracting EEG acquisition parameters from scripts and documentation
- Detecting preprocessing pipeline decisions
- Extracting statistical analysis plan
- Creating preregistration draft using EEG template
- Guiding user through missing sections
Workflow
Step 1: Confirm Modality
Verify EEG/ERP detection:
- Display files found: .set, .vhdr, .fdt files
- Confirm with user: "I detected EEG/ERP files. Proceed?"
Step 2: Extract EEG Parameters
From EEGLAB script analysis (.m, .py):
pop_loadset()→ Identify input data formatpop_chanedit()→ Reference electrode, ground electrodepop_resample()→ Sampling rate changespop_eegfilter()→ Online/offline filters (high-pass, low-pass, notch)pop_runica()→ ICA componentspop_selectdata()→ Trial/epoch extractioneeglab_topoplot,figurecommands → Known electrode montage
From MNE Python (.py files):
raw.load_data()→ Data organizationraw.set_eeg_reference()→ Reference electroderaw.filter()→ Filter parametersepochs = Epochs()→ Epoch timing (tmin, tmax)ica = ICA()→ ICA parametersraw.get_montage()→ Electrode montage
From documentation:
- README: study design, hypothesis
- Protocol files: participant criteria, task description
- Data dictionaries: channel naming, sampling rates
Step 3: Detect Preprocessing Pipeline
Search scripts for patterns:
artifact_detection = grep(script, "reject_", "threshold", "badchans")
ica_components = grep(script, "n_components", "ica_fit", "exclude")
baseline_correction = grep(script, "baseline", "bl_range", "mode")
downsampling = grep(script, "resample", "decim")
Mark confidence for each parameter.
Step 4: Extract Analysis Plan
From statistical analysis scripts:
- Electrode selection (ROI or mass-univariate)
- Time windows (e.g., 100-300ms for P300)
- Statistical tests (ANOVA, t-test, linear mixed effects)
- Multiple comparisons correction (cluster, FDR, Bonferroni)
- Effect size reporting
Keywords to search:
erp,component,latency,amplitudestat.f_oneway,ttest_ind,lmm,lmercluster,p.adjust,mne.stats
Step 5: Generate Draft
Create PREREGISTRATION_DRAFT.md with:
- Metadata (from METADATA_SCHEMA.md)
- Study Information (title, hypotheses, design)
- EEG Acquisition (filled from scripts + [VERIFY:])
- Preprocessing (filled from scripts + [TO BE COMPLETED])
- Statistical Analysis (filled from scripts + [TO BE COMPLETED])
- Ethics (from ETHICS_PRIVACY_TEMPLATE.md)
Step 6: Interactive Completion
Guide user through sections:
- Confirm detected EEG parameters
- Specify preprocessing decisions not found in scripts
- Detail statistical analysis plan
- Complete missing sections
- Review final document
Detection Patterns
File Extensions
.set- EEGLAB dataset.vhdr- BrainVision header (Neuroscan).fdt- EEGLAB data file.eeg- Generic EEG.bdf- BioSemi format
Script Keywords (EEGLAB/MNE)
eeglab,pop_loadset,pop_eegfiltermne,raw.filter,Epochs,ICAfieldtrip,ft_preprocessing,ft_timelockanalysiselectrode,montage,reference,ICA,ERP,component
Documentation Keywords
electrode montage,impedance,artifact,preprocessingsampling rate,filter,high-pass,low-passICA,component,rejection criteria
Output Format
# Preregistration: [Study Title]
## Metadata
[From METADATA_SCHEMA.md - all fields required]
## Study Information
- Research question: [extracted or TO BE COMPLETED]
- Hypotheses: [extracted or TO BE COMPLETED]
- Design: [extracted]
## Participants
- N: [extracted or TO BE COMPLETED]
- Inclusion/exclusion: [TO BE COMPLETED]
- Compensation: [TO BE COMPLETED]
## EEG Acquisition
- System: [detected from scripts: EEGLAB/BrainVision/etc.]
- Electrodes: [montage if detected]
- Sampling rate: [VERIFY: detected value]
- Reference: [VERIFY: detected electrode]
- Ground: [TO BE COMPLETED]
- Online filters: [extracted from preprocessing script]
## Experimental Paradigm
- Task: [TO BE COMPLETED]
- Stimuli: [TO BE COMPLETED]
- Trial structure: [TO BE COMPLETED]
## Preprocessing Plan
- Artifact removal: [extracted from script]
- ICA: [extracted parameters if present]
- Re-referencing: [VERIFY: detected value]
- Baseline correction: [extracted or TO BE COMPLETED]
- Downsampling: [extracted if present]
## Analysis Plan
- ERP components: [TO BE COMPLETED]
- Time windows: [extracted if specified]
- Electrodes: [extracted if specified]
- Statistical tests: [extracted from analysis script]
- Multiple comparisons: [extracted if present]
## Ethics & Data Management
[From ETHICS_PRIVACY_TEMPLATE.md]
Behavior Rules
- Always scan script files before asking about parameters
- Mark confidence levels for each detection:
- ✓ High (direct in script, >2 mentions)
- ~ Medium (inferred from patterns)
- ? Low (guess, needs verification)
- Never modify project files
- Ask focused questions - one section at a time
- Provide examples for user input fields
- Save as
PREREGISTRATION_DRAFT.mdin project root
Example Interaction
User: Create a preregistration
Agent:
1. ✓ Confirms: "I found .set files. Continuing with EEG/ERP..."
2. Scans scripts:
- Finds: pop_eegfilter(EEG, 0.5, 40) → 0.5-40 Hz
- Finds: pop_chanedit(EEG, 'ref', 'FCz') → Reference: FCz
- Finds: erp_times = [100 300] → Time window: 100-300ms
3. Extracts: "Sampling rate 500 Hz, EEGLAB dataset format"
4. Generates draft with:
- ✓ EEG system: EEGLAB
- ✓ Filters: 0.5-40 Hz
- ~ Reference: FCz (verify)
- ? Components detected: [TO BE COMPLETED]
5. Asks:
- "Confirm reference as FCz?"
- "What components are you analyzing?"
- "Define artifact rejection thresholds"
6. Saves: PREREGISTRATION_DRAFT.md
Configuration
Load from configs/eeg-config.json:
{
"modality": "eeg",
"template": "templates/eeg/EEG_ERP_PREREGISTRATION_GUIDE.md",
"search_patterns": {
"software": ["eeglab", "mne", "fieldtrip"],
"parameters": ["pop_eegfilter", "raw.filter", "Epochs"],
"keywords": ["electrode", "component", "ICA", "ERP"]
},
"required_sections": [
"Metadata",
"Study Information",
"Participants",
"EEG Acquisition",
"Experimental Paradigm",
"Preprocessing Plan",
"Analysis Plan",
"Ethics"
]
}
Related Resources
- Template:
templates/eeg/EEG_ERP_PREREGISTRATION_GUIDE.md - Common metadata:
templates/biopsych/common/METADATA_SCHEMA.md - Ethics template:
templates/biopsych/common/ETHICS_PRIVACY_TEMPLATE.md - References: See README.md "EEG/ERP Templates" section
Key References
- Govaart et al. (2025). EEG ERP Preregistration Template. MetaArXiv. https://doi.org/10.31222/osf.io/4nvpt
- Pernet et al. (2020). Issues and recommendations from the OHBM COBIDAS MEEG committee for reproducible EEG and MEG research. Nature Neuroscience, 24, 1473-1474. https://doi.org/10.1038/s41593-020-00710-7
- Paul et al. (2021). Making ERP Research More Transparent. International Journal of Psychophysiology.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.