nilearn

Plan fMRI GLM, masking, connectome, and ML workflows in Python with Nilearn guidance.

1|Updated May 16, 2026
One-click install
npx skills add https://github.com/MarvinCui/NeuroForge --skill nilearn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nilearn
Source: https://github.com/MarvinCui/NeuroForge/tree/main/NeuroForge/skills/nilearn
Command: npx skills add https://github.com/MarvinCui/NeuroForge --skill nilearn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Nilearn skill helps you plan and reason about fMRI statistical modeling, masking, connectome extraction, and machine-learning workflows from neuroimaging inputs without blindly running heavy processing.

Core Features & Use Cases

  • GLM modeling guidance: Support for first- and second-level fMRI analyses, including design-matrix planning and contrast interpretation workflows (planning and safe command suggestion).
  • Masking and ROI/atlas operations: Guidance for extracting signals using maskers, handling image compatibility assumptions, and preparing expected inputs/outputs.
  • Connectomes and image operations: Routing for connectome computation and image-level operations used downstream for statistics and ML.

Quick Start

Ask your question and include your fMRI image type (e.g., 4D runs vs derivatives) and what result you need (e.g., a first-level contrast map or a connectivity matrix), and the skill will propose a safe, documentation-driven plan.

Frequently Asked Questions about nilearn

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I plan a first-level fMRI GLM analysis in Python?

To plan a first-level fMRI GLM, you need design-matrix planning and contrast interpretation workflows. This skill proposes safe, documentation-driven plans for fMRI statistical modeling, guiding you from 4D run images to first-level contrast maps.

What is the best way to extract signals from fMRI images for machine learning?

Extracting signals for machine learning requires using maskers to handle ROI and atlas operations. This skill guides you through preparing expected inputs, inspecting image compatibility assumptions, and producing ML-ready feature outputs from neuroimaging data.

How do I route fMRIPrep derivatives into a Nilearn connectome workflow?

Routing fMRIPrep derivatives into Nilearn involves computing connectomes and performing image-level operations. This skill helps you inspect image compatibility and draft safe analysis checks to construct connectivity matrices from your preprocessed neuroimaging inputs.

Can I use Nilearn maskers on 4D fMRI runs versus precomputed derivatives?

Yes, you can use Nilearn maskers on both 4D fMRI runs and derivatives. The skill helps you specify your fMRI image type and desired result, then proposes a safe plan while addressing image compatibility assumptions for masking and ROI operations.

What are the limitations of running heavy neuroimaging processing blindly from NIfTI inputs?

Running heavy neuroimaging processing blindly risks image incompatibility and invalid GLM assumptions. This skill avoids blind execution by providing validation-like cautions, documentation routing, and safe analysis checks for NIfTI-based workflows.