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.5 $0.00031 $0.00924
Sonnet 5.5 $0.00016 $0.00462
Haiku 4.5 $0.00008 $0.00231

Measured 1mo ago against content hash e02da76c1633, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 4mo ago), licensed MIT. It adds 78 tokens to every session and 2,310 once invoked, about $0.0003 per session on Opus 5.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

alterlab-qiime2-amplicon

Runs 16S/ITS amplicon (microbiome) analysis with the QIIME 2 distribution (2026.7; the "amplicon" distribution was renamed "qiime2" in 2026.4) in the correct order: manifest import, cutadapt trim-paired primer removal BEFORE dada2 denoise-paired (trunc-len chosen from the demux quality .qzv), feature-classifier…

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

audit-ml-pipeline

Read-only audit of one persisted skore report: audit/NN .py (jupytext percent), 1:1 with experiments/ and journal/. Do not execute it. Run materialize.py once. Never call skore.evaluate or project.put. TRIGGER when a completed run needs an audit, the user asks to audit, show, or re-audit an experiment, a re-run…

probabl-ai/skills · 258 tokens

model-ml-pipeline

Deterministic entry point for modeling. On a first landing, write the locked baseline design note and ask for approval. Later landings offer only the choices the workspace justifies (an EDA proposal, Backlog, discussion). A missing modeling lock loads frame-ml-problem and stops. After a design is approved, coordinate…

probabl-ai/skills · 117 tokens

evaluate-ml-pipeline

Evaluate one learner with skore.evaluate. The splitter and any non-default score are already on the DataOp from build-ml-pipeline. This skill writes the call without splitter=, persists the report, and records the locator. When the locked split is the training table and test table that shipped with the data, fit on…

probabl-ai/skills · 222 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 · 266 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