neuroscience-imaging

neuroscience-imaging is a skill for Claude Code from Lord1Egypt/scientific-agent-toolkit. It costs 78 tokens per session (2,310 once invoked), scanned A, original, MIT.

A guide to analyzing brain scans such as MRI and fMRI using Python tools including nilearn and nibabel. It works with BIDS datasets and outputs from fMRIPrep, a tool that prepares neuroimaging data for analysis.

In plain words
What is it for?
Use it to load NIfTI images, extract region time series, calculate functional connectivity, run task-fMRI statistical models, perform independent component analysis, and create brain visualizations.
Why use it?
It helps turn brain images into measurements of structure, task-related activity, and communication between brain regions. It also provides methods for viewing and presenting brain maps.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to load NIfTI images, extract region time series, calculate functional connectivity, run task-fMRI statistical models, perform independent component analysis, and create brain visualizations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lord1egypt/scientific-agent-toolkit/neuroscience-imaging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Lord1Egypt/scientific-agent-toolkit --skill neuroscience-imaging
Clone the repo
git clone --depth 1 https://github.com/Lord1Egypt/scientific-agent-toolkit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for neuroscience-imaging

README.md
[![agentmods](https://agentmods.dev/badge/skills/lord1egypt/scientific-agent-toolkit/neuroscience-imaging/github.svg)](https://agentmods.dev/skills/lord1egypt/scientific-agent-toolkit/neuroscience-imaging)
Your own site
<a href="https://agentmods.dev/skills/lord1egypt/scientific-agent-toolkit/neuroscience-imaging"><img src="https://agentmods.dev/badge/skills/lord1egypt/scientific-agent-toolkit/neuroscience-imaging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for neuroscience-imaging

Your own site · 80×15
<a href="https://agentmods.dev/skills/lord1egypt/scientific-agent-toolkit/neuroscience-imaging"><img src="https://agentmods.dev/badge/skills/lord1egypt/scientific-agent-toolkit/neuroscience-imaging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,310 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.02310
Opus 5 $0.00039 $0.01155
Sonnet 5 $0.00016 $0.00462
Haiku 4.5 $0.00008 $0.00231

Measured 7d ago against content hash e02da76c1633, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

neuroscience-imaging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

scientific-skills/neuroscience-imaging/SKILL.md · 323 lines

How it starts

The opening of the file, as written. The whole thing — 323 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Neuroscience Imaging

Overview

Neuroimaging analysis encompasses structural MRI (morphometry, volumetrics), task fMRI (GLM-based activation), and resting-state fMRI (functional connectivity, ICA) workflows. This skill uses nilearn and nibabel for analysis and visualization, compatible with fMRIPrep-preprocessed data and BIDS-formatted datasets.

When to Use This Skill

  • Loading and visualizing NIfTI (.nii/.nii.gz) brain images
  • Extracting time series from ROIs using brain atlases (Schaefer, AAL, Harvard-Oxford)
  • Computing functional connectivity matrices and networks
  • Running GLM-based task fMRI analysis
  • Independent Component Analysis (ICA) for resting-state networks
  • Brain parcellation and morphometric analysis
  • Whole-brain searchlight and mass-univariate analysis
  • Visualizing brain maps, glass brains, and surface plots

Quick Start

Loading NIfTI Data

import nibabel as nib
import numpy as np

# Load NIfTI image
img = nib.load("sub-01_task-rest_bold.nii.gz")
data = img.get_fdata()
affine = img.affine
header = img.header

print(f"Image shape: {data.shape}")  # (x, y, z, time)
print(f"Voxel size: {header.get_zooms()}")
print(f"TR: {header.get_zooms()[3]:.2f} s")
print(f"# timepoints: {data.shape[3]}")

Brain Visualization

from nilearn import plotting, image
import matplotlib.pyplot as plt

# Glass brain plot (activation map)
stat_img = "sub-01_contrast-faces_stat.nii.gz"
plotting.plot_glass_brain(
    stat_img,
    threshold=3.5,
    colorbar=True,
    plot_abs=False,
    display_mode="lyrz",
    title="Face vs. Object Contrast",
    output_file="glass_brain.png",
)

# Anatomical underlay
plotting.plot_stat_map(
    stat_img,
    bg_img="sub-01_T1w_MNI.nii.gz",
    threshold=3.5,
    display_mode="z",
    cut_coords=8,
    colorbar=True,
    title="Face activation (z-score)",
    output_file="stat_map_slices.png",
)
print("Brain plots saved.")

Functional Connectivity (ROI-to-ROI)

from nilearn import datasets, input_data
from nilearn.connectome import ConnectivityMeasure
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

# Load atlas
atlas = datasets.fetch_atlas_schaefer_2018(n_rois=200, yeo_networks=7)
atlas_img = atlas.maps
labels = atlas.labels

# Extract time series from ROIs
masker = input_data.NiftiLabelsMasker(
    labels_img=atlas_img,
    standardize=True,
    detrend=True,
    high_pass=0.01,
    low_pass=0.1,
    t_r=2.0,  # TR in seconds
    resampling_target="labels",
)

# Load preprocessed fMRI (fMRIPrep output)
fmri_img = "sub-01_task-rest_space-MNI152NLin2009cAsym_res-2_desc-preproc_bold.nii.gz"
time_series = masker.fit_transform(fmri_img)
print(f"Time series shape: {time_series.shape}")  # (timepoints, n_ROIs)

# Compute correlation matrix
correlation_measure = ConnectivityMeasure(kind="correlation")
corr_matrix = correlation_measure.fit_transform([time_series])[0]
np.fill_diagonal(corr_matrix, 0)  # Zero diagonal

# Plot connectivity matrix
fig, ax = plt.subplots(figsize=(12, 10))
sns.heatmap(
    corr_matrix,
    cmap="RdBu_r",
    center=0,
    vmin=-0.8,
    vmax=0.8,
    xticklabels=False,
    yticklabels=False,
    ax=ax,
)
ax.set_title("Functional Connectivity Matrix (Schaefer 200 ROIs)", fontsize=13)
plt.tight_layout()
plt.savefig("connectivity_matrix.png", dpi=150)

Read the full file on GitHub · 323 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 323 lines · 78 tokens per session scan A e02da76c1633

Subscribe to this mod's changes

neuroscience-imaging is a skill published in the GitHub repository Lord1Egypt/scientific-agent-toolkit (3 stars, last pushed 3mo ago), licensed MIT. It adds 78 tokens to every session and 2,310 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

cellxgene-census-query

Query CZ CELLxGENE Census (61M+ cells). Filter by cell type/tissue/disease, retrieve expression data, and integrate with scanpy/PyTorch for population-scale single-cell analysis. Use this skill when: (1) Querying single-cell expression data by cell type, tissue, or disease, (2) Exploring available single-cell datasets…

PharMolix/OpenBioMed · 105 tokens

alterlab-deep-research

Runs a 13-agent deep research pipeline for rigorous academic work on any topic across 7 modes (full research, quick brief, paper review, lit-review, fact-check, Socratic guided research dialogue, and systematic review with optional meta-analysis), covering research-question formulation, Socratic mentoring, methodology…

AlterLab-IEU/AlterLab-Academic-Skills · 239 tokens

alterlab-imaging-data-commons

Query and download public cancer imaging data from the NCI Imaging Data Commons (IDC) using the idc-index Python package, filtering by metadata, visualizing in-browser, and checking licenses, with no authentication required. Use when obtaining large-scale radiology (CT, MR, PET) or digital pathology DICOM datasets for…

AlterLab-IEU/AlterLab-Academic-Skills · 90 tokens

alterlab-pyhealth

Develops, tests, and deploys clinical machine learning models with the PyHealth healthcare AI toolkit. Use when working with electronic health records (EHR), clinical prediction tasks (mortality, readmission, drug recommendation), medical coding systems (ICD, NDC, ATC), physiological signals (EEG, ECG), healthcare…

AlterLab-IEU/AlterLab-Academic-Skills · 117 tokens

alterlab-cobrapy

Build and analyze genome-scale constraint-based metabolic models with COBRApy — flux balance analysis (FBA), flux variability analysis (FVA), gene and reaction knockouts, flux sampling, and SBML model I/O. Use when simulating metabolic networks, predicting growth or knockout phenotypes, or running systems-biology and…

AlterLab-IEU/AlterLab-Academic-Skills · 91 tokens

alterlab-deeptools

Process and visualize deep-sequencing coverage with the deepTools CLI — convert BAM to bigWig (bamCoverage), build log2 ratio tracks (bamCompare), run QC (multiBamSummary correlation, PCA, plotFingerprint), apply the ATAC-seq Tn5 shift (alignmentSieve --ATACshift), and make TSS/peak heatmaps and profiles…

AlterLab-IEU/AlterLab-Academic-Skills · 173 tokens