neuroaihub/brainpilot/fmriprep
Claude Code and agent skill by neuroaihub/brainpilot
- community
- ext:[{"type":"template","description":"Custom templates for code generation"}]
Checking that the SKILL.md file is still in the repository.
Preprocess task-based or resting-state fMRI data with fMRIPrep — a robust, BIDS-App preprocessing pipeline built on FSL, ANTs, FreeSurfer, AFNI, and Nilearn. Use this skill whenever the user asks to preprocess fMRI/BOLD data, run fMRIPrep on a BIDS dataset, set up Docker/Singularity/Apptainer containers for fMRIPrep, choose output spaces (MNI152NLin2009cAsym, fsaverage, fsLR/CIFTI), configure susceptibility distortion correction (SDC), extract or interpret the confounds table, resample to surface/grayordinates, cite fMRIPrep and its dependencies, or debug fMRIPrep crashes and hangs.
Install
npx vskill@latest install neuroaihub/brainpilot/fmriprepSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as neuroaihub/brainpilot/fmriprep.
fMRIPrep: Robust fMRI Preprocessing Pipeline
Purpose
This skill encodes complete operational knowledge of fMRIPrep — the NiPreps BIDS-App for preprocessing task and resting-state fMRI. It covers installation (Docker/Apptainer/pip), the full CLI, workflow internals, output layout, the confounds table, output spaces / TemplateFlow, susceptibility distortion correction, BIDS filters, troubleshooting, and how to cite. It is derived from the fMRIPrep 25.2.x (LTS) source tree (https://github.com/nipreps/fmriprep).
When to Use This Skill
Activate when the user:
- Wants to run fMRIPrep on a BIDS dataset (Docker, Singularity/Apptainer, pip)
- Asks how to install fMRIPrep or set up dependencies (FreeSurfer license, TemplateFlow)
- Needs help choosing
--output-spaces,--cifti-output, or surface targets (fsaverage, fsLR) - Needs help with SDC / fieldmap issues (
--use-syn-sdc,--force syn-sdc,IntendedFor,B0FieldIdentifier) - Asks about the confounds file (
~_desc-confounds_timeseries.tsv), aCompCor/tCompCor, motion parameters - Debugs a crashing/hanging fMRIPrep run, FreeSurfer
IsRunningerrors, or race conditions - Wants to reuse pre-computed derivatives (
--derivatives), an existing FreeSurfer subject dir, or a partial run - Needs a BIDS filter file (
--bids-filter-file) or wants to select tasks/sessions/echoes - Needs a citation/boilerplate for a paper or grant proposal
- Wants to interpret the HTML visual report
Reference Files (Progressive Disclosure)
| Topic | File | When to Read | |
|---|---|---|---|
| Installation (Docker, Apptainer, pip, wrapper, FreeSurfer license) | references/installation.md | User asks how to install/set up fMRIPrep, or hits license/permission errors | |
| Complete CLI reference (every flag, defaults, choices) | references/cli-reference.md | User asks "what does flag X do?" or needs the full option table | |
| Practical invocation examples (single subject, batch, HPC SLURM, Docker) | references/usage-examples.md | User asks "how do I actually run it on my data?" | |
| Workflow internals (anat + BOLD stages, HMC, BBR, SDC, surface, CIFTI) | references/workflows.md | User asks what fMRIPrep does under the hood, or wants a step-by-step methods section | |
| Output layout and derivatives naming | references/outputs.md | User asks what files fMRIPrep produces, or how to find a specific derivative | |
| Confounds table (aCompCor, tCompCor, motion, FD, DVARS, spike regressors) | references/confounds.md | User asks which columns of the confounds TSV to use for denoising | |
| Output spaces / TemplateFlow (MNI152NLin2009cAsym, fsLR, fsaverage, custom) | references/spaces.md | User asks how to specify --output-spaces, use custom templates, or pre-fetch templates | |
| Susceptibility distortion correction (fieldmaps, PEPOLAR, phase-diff, SyN) | references/sdc-fieldmaps.md | User has fieldmaps, wants fieldmap-less SDC, or SDC-related errors | |
| BIDS filter file syntax + PyBIDS queries | references/bids-filter.md | User needs to select specific sessions/tasks or non-BIDS entities | |
| FAQ, troubleshooting, hangs, HPC, TemplateFlow offline | references/troubleshooting-faq.md | User's run is crashing/hanging or they're on an HPC without Internet | |
| Citation boilerplate, DOIs, BibTeX, dependency papers | references/citation.md | User writes a paper or grant that uses fMRIPrep | |
| Pinned dependency versions (25.2.x LTS) | references/versions-dependencies.md | User asks which version of FreeSurfer/ANTs/FSL/AFNI ships with fMRIPrep |
What fMRIPrep Is
fMRIPrep is a BIDS-App: a container that consumes a BIDS-organized dataset and emits a BIDS-Derivatives dataset plus a per-subject HTML report. It performs minimal preprocessing — motion correction, field unwarping, normalization, bias-field correction, brain extraction, coregistration, and optional surface resampling — and deliberately does not smooth or denoise. Downstream denoising is enabled by the confounds table.
- Homepage: https://fmriprep.org
- Repo: https://github.com/nipreps/fmriprep
- Container image:
nipreps/fmriprep:<version>on Docker Hub - Latest release (of this snapshot): 25.2.5 (2026-03-10) — 25.2.x is the LTS track, supported through October 2029
- License: Apache-2.0 (since 21.0.x)
- RRID: SCR_016216
Command-Line Structure (BIDS-App)
bids_dir— root of the BIDS dataset (containssub-*/folders anddataset_description.json)output_dir— where derivatives + reports go (must NOT be insidebids_dir)analysis_level— onlyparticipantis supported
Same structure applies to the container form:
Pipeline Overview
Read references/workflows.md for the full method description and node names.
Quick Start
The fastest path for a new user with Docker:
Equivalent bare Docker invocation (what the wrapper produces):
Equivalent Apptainer/Singularity invocation:
Key Concepts (cheat-sheet)
| Concept | Meaning | |
|---|---|---|
| BIDS-App | Container/exec with fixed 3-positional CLI (bids_dir output_dir participant). fMRIPrep only supports participant. | |
| BIDS Derivatives | Output format — sub-folders per subject, sidecar JSON per NIfTI, standardized entity keys (space-, desc-, hemi-, from-, to-). | |
| NiPreps | The umbrella (www.nipreps.org). fMRIPrep depends on sister packages: smriprep (anat), sdcflows (SDC), niworkflows (utilities), nireports (reports), templateflow (templates). | |
| TemplateFlow | Registry of standard neuroimaging templates fetched on demand. Home dir: $TEMPLATEFLOW_HOME (default ~/.cache/templateflow). | |
Working directory (-w) | Nipype's scratch space. Enables resume-on-crash. Not inside bids_dir. | |
| `--output-spaces` | Which coordinate systems to resample BOLD/T1w to. Space KEY[:cohort-X][:res-Y][:den-Z]. Default: MNI152NLin2009cAsym:res-native. Read references/spaces.md. | |
| `--level` | minimal (transforms only), resampling (adds mid-way NIfTIs), full (default — every derivative). | |
| `--ignore` | Skip preprocessing aspects. Choices: fieldmaps, slicetiming, sbref, t2w, flair, fmap-jacobian. | |
| `--force` | Override auto-choices. Choices: bbr, no-bbr, syn-sdc, fmap-jacobian. | |
| `--derivatives` | Reuse precomputed derivatives from another package (BIDS-Derivatives-compliant); replaces the older --anat-derivatives. | |
| `--use-syn-sdc` | Fieldmap-less SDC using anatomical prior; if no fmap and unable → error (default) or warn. | |
| `--cifti-output` | Enable grayordinate output. Choices: 91k (2 mm, 91282 grayordinates), 170k (1.6 mm, 170494). Implies MNI152NLin6Asym. | |
| `--fs-no-reconall` | Skip FreeSurfer surface reconstruction. Disables surface/CIFTI outputs. | |
| `--fs-license-file` | Path to your FreeSurfer license (required even if recon-all is not run — some FS binaries need it). | |
| Confounds | Nuisance regressors written to ~_desc-confounds_timeseries.tsv. Read references/confounds.md before including in a design matrix. | |
| HMC | Head-Motion Correction (FSL mcflirt). Reference-image based. | |
| STC | Slice-Timing Correction (AFNI 3dTShift). Runs only if SliceTiming present in metadata and ≥5 usable volumes. | |
| BBR | Boundary-Based Registration (FreeSurfer bbregister when recon-all is on, else FSL flirt --schedule=bbr.sch). | |
| CompCor | Component-based noise correction. Anatomical (aCompCor) uses eroded WM/CSF/combined masks; temporal (tCompCor) uses top-variance voxels. | |
| Boilerplate | Auto-generated methods paragraph in the report — copy verbatim into papers (public-domain, CC0). |
Sensible Defaults
fMRIPrep is designed so a bare invocation "just works". If you have no strong preferences, this is the recommended starting point:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/skills/skills/06_fMRI_Neuroimaging/fmriprep/SKILL.md
Popularity
- Repository stars
- 884
- Repository forks
- 61
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
templateCustom templates for code generation
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/neuroaihub/brainpilot/fmriprep)