Skip to content
Data
Skill

/bids

Organizes, queries, validates, and converts Brain Imaging Data Structure (BIDS) datasets. Supports organizing neuroscience and biomedical data (MRI, EEG, MEG, iEEG, PET, microscopy, NIRS, motion capture, EMG, MR spectroscopy, behavioral), querying BIDS layouts, validating

From plugin
scientific-agent-skills
56k177 skills

Claude Code

$ npx -y skills add K-Dense-AI/scientific-agent-skills --skill bids --agent claude-code

SKILL.md

bids.SKILL.md
name: bids
description: >
  Organizes, queries, validates, and converts Brain Imaging Data Structure (BIDS) datasets. Supports
  organizing neuroscience and biomedical data (MRI, EEG, MEG, iEEG, PET, microscopy,
  NIRS, motion capture, EMG, MR spectroscopy, behavioral), querying BIDS layouts,
  validating compliance, converting DICOM to BIDS, writing metadata sidecars, or
  creating BIDS derivatives.
license: https://creativecommons.org/licenses/by/4.0/
compatibility: Requires Python 3.10+ for PyBIDS and the validator wrapper; dcm2niix for DICOM conversion. Network access for installation and schema updates; no API credentials required.
metadata:
  version: "1.3"
  last-reviewed: "2026-09-30"
  skill-author: Yaroslav Halchenko

Brain Imaging Data Structure (BIDS)

Overview

The Brain Imaging Data Structure (BIDS) is a community standard for organizing and describing neuroscience and biomedical research datasets. It defines a consistent file naming convention, directory hierarchy, and metadata schema so that datasets are immediately understandable by humans and software tools alike. BIDS is governed by the BIDS Specification (reviewed against v1.11.2, released 2026-09-29) and is maintained by the community via the BIDS-Standard GitHub organization.

While BIDS originated for MRI, it has grown well beyond neuroimaging. The specification now covers 11 modalities spanning imaging, electrophysiology, and behavioral data:

  • **Imaging**: MRI (structural, functional, diffusion, fieldmaps, perfusion/ASL), PET, microscopy
  • **Electrophysiology**: EEG, MEG, iEEG (intracranial EEG), EMG
  • **Other**: NIRS (near-infrared spectroscopy), motion capture, behavioral data (without imaging), MR spectroscopy

Active BEPs are extending BIDS further โ€” notably BEP032 (microelectrode electrophysiology) proposes support for extracellular recordings including Neuropixels probes, bringing BIDS to a prevalent methodology in animal neuroscience research (see also the neuropixels-analysis skill).

Repository submission requirements vary by modality and archive; check the target archive before preparing a deposit.

The Python ecosystem for BIDS centers on **PyBIDS** (`pybids`) for querying and indexing BIDS datasets, and the **bids-validator** (Deno-based, available as PyPI package `bids-validator-deno` or via Deno directly) for compliance checking. Conversion from DICOM is typically done with **HeuDiConv**, **dcm2bids**, or **BIDScoin**.

When to Use This Skill

Apply this skill when:

  • Organizing raw neuroscience data (imaging, electrophysiology, behavioral) into BIDS-compliant directory structures
  • Querying an existing BIDS dataset to find specific files by subject, session, task, run, or modality
  • Validating a dataset against the BIDS specification before sharing or submission
  • Converting DICOM data from scanners into BIDS format
  • Writing or editing JSON sidecar metadata files
  • Creating BIDS-compliant derivatives (preprocessed data, analysis outputs)
  • Setting up a `dataset_description.json` for a new dataset
  • Working with BIDS entities (subject, session, task, acquisition, run, etc.)
  • Configuring `.bidsignore` to exclude files from validation
  • Preparing data for upload to OpenNeuro, DANDI, or other BIDS-aware repositories

Installation

# Core BIDS querying library
uv pip install pybids

# BIDS validator (Deno-based, installed via PyPI wrapper)
uv pip install bids-validator-deno
# Alternative: install directly via Deno
# deno install -ERWN -g -n bids-validator jsr:@bids/validator

# DICOM-to-BIDS converters (install as needed)
uv pip install heudiconv       # HeuDiConv - heuristic-based DICOM conversion
uv pip install dcm2bids        # dcm2bids - config-file-based conversion
# BIDScoin: uv pip install bidscoin

# Useful companions
uv pip install nibabel          # NIfTI/other neuroimaging file I/O
uv pip install pydicom          # DICOM file reading (used by converters)

Core Workflows

Twelve workflow areas, each with worked code, are documented in [references/core_workflows.md](references/core_workflows.md):

1. **BIDS directory structure** โ€” the required layout and where each modality belongs. 2. **`dataset_description.json`** โ€” the required fields and how to generate it. 3. **Querying with PyBIDS** โ€” `BIDSLayout`, entity filters, sidecar metadata with automatic inheritance, and building paths from entities. 4. **Validation** โ€” `bids-validator` via the PyPI wrapper (recommended), via Deno directly, the legacy Node validator, and using `.bidsignore` to exclude files. 5. **Entities and file naming** โ€” the entity order and naming grammar. 6. **DICOM to BIDS conversion** โ€” HeuDiConv (including the turnkey ReproIn path and the reconnaissance โ†’ heuristic โ†’ convert sequence) and dcm2bids (config-file based). 7. **Metadata sidecars** โ€” required and recommended JSON fields per modality. 8. **Events files** โ€” task fMRI event timing and column conventions. 9. **Participants file** โ€” `participants.tsv` and its data dictionary. 10. **Derivatives** โ€” the derivatives layout and its `dataset_description.json`. 11. **Advanced PyBIDS** โ€” index caching, including derivatives, confound regressors, and DataFrame output. 12. **BIDS-Apps** โ€” the standard invocation pattern, and fMRIPrep, MRIQC, and QSIPrep.

Validate with the BIDS validator as well as indexing with PyBIDS. Successful indexing is not a full compliance check; record the validator and BIDS schema versions, and inspect warnings and metadata inheritance before analysis.

Reference Materials

This skill includes detailed reference documentation:

  • **bids_schema.json**: Machine-readable BIDS schema (from https://bids-specification.readthedocs.io/en/stable/schema.json). This is the authoritative source for entity definitions, ordering rules, filename templates, allowed suffixes per datatype, and metadata field requirements. BEP-specific schemas are at https://github.com/bids-standard/bids-schema/tree/main/BEPs.
  • **
Read more
@k-dense-ai
Ships withscientific-agent-skills

๐Ÿ”” Claude Scientific Skills is now Scientific Agent Skills. Same skills, broader compatibility โ€” now works with any AI agent that supports the open Agent Skills standard, not just Claude.

Stars on GitHub

Momentum

stars in total
55.6k
Star history of K-Dense-AI/scientific-agent-skills on GitHub, a chart by star-history.com

Other skills on scientific-agent-skills.

aeon

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting,โ€ฆ

More skills from other plugins.

paddleocr-doc-parsing

paddleocr-doc-parsing

Use this skill to extract structured Markdown/JSON from PDFs and document imagesโ€”tables with cell-level precision, formulas asโ€ฆ

@paddlepaddle@paddlepaddleInstall Skill
context-loader
Auto-invoked

context-loader

Search memories from earlier Pi sessions in this repository. Use it when earlier work may already explain the code, error,โ€ฆ

mem04d69k
@mem0ai@mem0aiInstall Skill
analyzing-ai-citations

analyzing-ai-citations

Answer AI citation and answer engine optimization (AEO) questions in PostHog: whether AI answer engines (ChatGPT, Claude, and anโ€ฆ

posthog10d41k
@posthog@posthogInstall Skill
qmd

qmd

Search local markdown knowledge bases, notes, docs, and wikis with QMD. Use when users ask to find notes, retrieve documents,โ€ฆ

qmd3w31k
@tobi@tobiInstall Skill

Questions about bids.

Which coding agents can use bids?
bids installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.