Help us improve
Share bugs, ideas, or general feedback.
From neuroflow
This skill should be used whenever the user mentions BIDS, Brain Imaging Data Structure, BIDS conversion, BIDS validation, BIDS compliance, organizing neuroimaging data, dataset_description.json, participants.tsv, bids-validator, pybids, MNE-BIDS, or asks how to structure EEG/MEG/fMRI/iEEG/PET/DWI data for sharing or preprocessing. Also invoke when the user asks how to name scan files, what sidecar JSON fields are needed, how to set up derivatives/, or how to run fMRIPrep/MRIQC on their dataset. Invoke proactively during /data, /data-preprocess, and /data-analyze phases whenever the dataset structure is relevant to the task at hand.
npx claudepluginhub stanislavjiricek/neuroflow --plugin neuroflowHow this skill is triggered — by the user, by Claude, or both
Slash command
/neuroflow:bidsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
BIDS is the community-standard way to organize, name, and describe neuroimaging datasets.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
BIDS is the community-standard way to organize, name, and describe neuroimaging datasets. It covers MRI/fMRI, EEG, MEG, iEEG, PET, DWI, NIRS, microscopy, motion capture, and MRS. BIDS compliance unlocks the full ecosystem: bids-validator, fMRIPrep, MRIQC, pybids, MNE-BIDS, and 100+ BIDS Apps. Over 1500 public datasets on OpenNeuro use it; 3000+ papers cite it.
/data phase: inventory, validate, or convert to BIDS/data-preprocess: loading BIDS-organized data into MNE or nibabel/data-analyze: querying the dataset with pybids or MNE-BIDSdataset/
├── dataset_description.json ← required
├── participants.tsv ← required
├── participants.json ← recommended
├── README ← recommended
├── CHANGES ← recommended
├── .bidsignore ← optional
├── sub-<label>/
│ ├── [ses-<label>/] ← optional; omit if single session
│ │ ├── anat/ ← T1w, T2w, FLAIR, ...
│ │ ├── func/ ← BOLD fMRI + events
│ │ ├── dwi/ ← diffusion + bval/bvec
│ │ ├── fmap/ ← field maps
│ │ ├── eeg/ ← EEG + channels + coordsystem
│ │ ├── meg/ ← MEG + channels + coordsystem
│ │ ├── ieeg/ ← iEEG + electrodes + coordsystem
│ │ ├── pet/ ← PET + blood data
│ │ ├── perf/ ← perfusion (ASL)
│ │ ├── nirs/ ← fNIRS
│ │ ├── motion/ ← motion capture
│ │ ├── mrs/ ← MR spectroscopy
│ │ └── beh/ ← behavioral-only data
│ └── scans.tsv ← optional; lists files + acq_time
├── sourcedata/ ← raw/pre-BIDS originals (unvalidated)
├── derivatives/ ← pipeline outputs (fMRIPrep, MNE, etc.)
└── code/ ← analysis scripts
Entities appear in this exact order — wrong order fails validation:
sub-<label> [ses-<label>] [task-<label>] [acq-<label>] [ce-<label>]
[rec-<label>] [dir-<label>] [run-<index>] [echo-<index>] [flip-<index>]
[part-<label>] [chunk-<index>] _<suffix>.<extension>
Examples:
sub-01_T1w.nii.gz
sub-01_ses-01_task-rest_bold.nii.gz
sub-01_ses-01_task-faces_run-1_bold.nii.gz
sub-01_task-rest_acq-multiband_bold.json
sub-01_dir-AP_epi.nii.gz
sub-01_ses-01_task-rest_eeg.edf
sub-01_ses-01_task-auditory_meg.fif
Rules: alphanumeric + hyphens + underscores only; no spaces; each entity once per filename; case-sensitive; suffix always last before extension.
{
"Name": "My Study",
"BIDSVersion": "1.11.1",
"DatasetType": "raw",
"License": "CC-BY-4.0",
"Authors": [{"name": "Jane Doe", "email": "jane@example.com"}],
"Acknowledgements": "Funded by ...",
"HowToAcknowledge": "Please cite: ...",
"Funding": [{"Funder": "NIH", "Grant": "R01DA123456"}],
"EthicsApprovals": [{"Name": "IRB", "Reference": "IRB00012345"}],
"ReferencesAndLinks": ["https://doi.org/10.1038/..."]
}
For derivatives, add:
{
"DatasetType": "derivative",
"GeneratedBy": [{"Name": "fMRIPrep", "Version": "22.1.1",
"CodeURL": "https://github.com/nipreps/fmriprep"}],
"SourceDatasets": [{"URL": "ds004157", "Version": "1.0.0"}]
}
participant_id age sex group handedness
sub-01 25 M control R
sub-02 28 F patient L
{
"age": {"Description": "Age in years", "Units": "years"},
"sex": {"Description": "Biological sex", "Levels": {"M": "male", "F": "female"}},
"group": {"Description": "Group", "Levels": {"control": "Healthy control", "patient": "Patient"}}
}
| Modality | Required in JSON sidecar |
|---|---|
| func BOLD | TaskName, RepetitionTime |
| EEG | SamplingFrequency, PowerLineFrequency |
| MEG | SamplingFrequency |
| iEEG | SamplingFrequency, PowerLineFrequency |
| DWI | (needs .bval and .bvec files, not just JSON) |
| PET | Manufacturer, BodyPart, TracerName, InjectedRadioactivity |
For full field lists → references/metadata.md
# CLI (Node.js)
npm install -g bids-validator
bids-validator /path/to/dataset
# Web tool
# https://bids-standard.github.io/bids-validator/
# Python
pip install bids-validator
python -m bids_validator /path/to/dataset
Suppress known non-issues with .bidsignore:
*_physio.tsv.gz # custom physio format
sourcedata/ # always excluded
tmp_*/ # temp folders
For validator error codes and fixes → references/tools.md
from bids import BIDSLayout
layout = BIDSLayout('/path/to/dataset')
print(layout.get_subjects()) # ['01', '02', ...]
print(layout.get_tasks()) # ['rest', 'nback']
# Get all BOLD files
bold = layout.get(suffix='bold', extension='nii.gz', return_type='file')
# Get metadata
meta = layout.get_metadata('sub-01_task-rest_bold.nii.gz')
print(meta['RepetitionTime'])
For MNE-BIDS (EEG/MEG) → references/tools.md
For pybids full API → references/tools.md
For complete example datasets → references/examples.md
Preprocessed outputs live in derivatives/<pipeline>/:
space-MNI152NLin2009cAsym entity for normalized imagesres-<label> for resampled resolutionderivatives/ needs its own dataset_description.json with DatasetType: derivativeFull derivatives structure → references/structure.md
mne_bids.write_raw_bids() (EEG/MEG) or dcm2niix + renaming (MRI)data-inventory.md to .neuroflow/data/ noting BIDS compliance statusBIDSLayout + layout.get() or mne_bids.read_raw_bids()events.tsvderivatives/<pipeline>/ with correct dataset_description.jsonparticipants.tsv)derivatives/analysis/ or project results/| File | Contents |
|---|---|
references/structure.md | Full folder hierarchy per modality, all required/optional files, entity table |
references/metadata.md | JSON sidecar fields for MRI/EEG/MEG/iEEG/PET, events.tsv, scans.tsv |
references/tools.md | bids-validator, pybids, MNE-BIDS, fMRIPrep, MRIQC — install + usage |
references/examples.md | Complete example dataset trees + Python code snippets |
Read the relevant reference file when you need:
structure.mdmetadata.mdtools.mdexamples.md| Symptom | Likely cause | Fix |
|---|---|---|
| Validator: "Not a valid BIDS filename" | Entity order wrong or unknown suffix | Check entity order (sub, ses, task, acq, run…); verify suffix against spec |
| Validator: "IntendedFor missing file" | JSON references non-existent image | Check path; must be relative from dataset root |
| Validator: "Missing required file" | dataset_description.json or participants.tsv absent | Create the file |
| Validator: "JSON_KEY_RECOMMENDED" | Sidecar missing recommended field | Add field or use .bidsignore for now |
| pybids: empty layout | Wrong root path or missing dataset_description.json | Check path; ensure root-level JSON exists |
| MNE-BIDS: wrong channel types | channels.tsv type column incorrect | Fix: EEG, EOG, ECG, EMG, STIM, MISC, etc. |
For more validator error codes → references/tools.md