nilearn-tool

nilearn-tool is a skill for Claude Code, Codex from CUHK-AIM-Group/NeuroClaw. It costs 86 tokens per session (2,725 once invoked), scanned A, original, MIT.

A tool workflow for Nilearn, a Python library used to analyze functional MRI data. It turns preprocessed brain scans into regional activity and connectivity measurements and can run statistical models.

In plain words
What is it for?
Use it to extract brain-region time series, handle fMRIPrep confounds, create connectivity maps and matrices, or run first- and second-level GLM analyses.
Why use it?
It provides standard operations for functional MRI analysis so other workflows do not need to implement them from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is conda run -n neuroclaw-nilearn python skills/nilearn-tool/nilearn_pipeline.py roi-ts \.

Good fit Use it to extract brain-region time series, handle fMRIPrep confounds, create connectivity maps and matrices, or run first- and second-level GLM analyses.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/CUHK-AIM-Group/NeuroClaw
agentmods
npx agentmods add skills/cuhk-aim-group/neuroclaw/nilearn-tool

Made for: Claude Code, Codex.

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 nilearn-tool

README.md
[![agentmods](https://agentmods.dev/badge/skills/cuhk-aim-group/neuroclaw/nilearn-tool/github.svg)](https://agentmods.dev/skills/cuhk-aim-group/neuroclaw/nilearn-tool)
Your own site
<a href="https://agentmods.dev/skills/cuhk-aim-group/neuroclaw/nilearn-tool"><img src="https://agentmods.dev/badge/skills/cuhk-aim-group/neuroclaw/nilearn-tool/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 nilearn-tool

Your own site · 80×15
<a href="https://agentmods.dev/skills/cuhk-aim-group/neuroclaw/nilearn-tool"><img src="https://agentmods.dev/badge/skills/cuhk-aim-group/neuroclaw/nilearn-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,725 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00086 $0.02725
Opus 5 $0.00043 $0.01362
Sonnet 5 $0.00017 $0.00545
Haiku 4.5 $0.00009 $0.00272

Measured 9d ago against content hash 74b02eed6972, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

nilearn-tool scanned grade A with 1 finding 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 9d ago.

The scan reads SKILL.md. This mod also ships 12 executable files (scripts/connectome_reference.py, scripts/denoise_timeseries_reference.py, scripts/hierarchical_parcellation_reference.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- No direct `subprocess.run()` for long operations in this skill.
skills/nilearn-tool/SKILL.md · 266 lines

How it starts

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

Nilearn Tool (Base/Tool Layer)

Overview

nilearn-tool is the NeuroClaw base/tool skill that implements concrete Nilearn workflows for turning preprocessed BOLD into features (ROI time series, connectivity matrices, seed maps) and optional statistical modeling (GLM).

It is never called directly by the user. It is delegated to by fmri-skill (or other interface/modality skills) and executed via claw-shell.

Research use only.

Agent Reference Rule

When the agent needs Nilearn-based implementation code, it should first consult the curated snippets in skills/nilearn-tool/scripts/ instead of copying directly from long tutorial scripts with hard-coded paths.

Reference snippets available:

  • scripts/preprocess_bold_reference.py -> dummy removal, smoothing, band-pass filtering, MNI resampling
  • scripts/connectome_reference.py -> atlas ROI extraction and ROI-to-ROI connectivity export
  • scripts/zalff_summary_reference.py -> MNI resampling, zALFF summary, atlas-level regional export
  • scripts/task_glm_reference.py -> first-level task GLM with design matrix and contrast maps
  • scripts/second_level_glm_reference.py -> group-level GLM from subject contrast maps
  • scripts/rest_ica_reference.py -> resting-state CanICA component extraction
  • scripts/rest_dictlearning_reference.py -> resting-state DictLearning component extraction
  • scripts/svm_classifier_reference.py -> ROI/tabular disease classification with SVM
  • scripts/spacenet_classifier_reference.py -> voxel-wise disease classification with SpaceNet
  • scripts/kmeans_parcellation_reference.py -> mask-based K-means brain parcellation
  • scripts/hierarchical_parcellation_reference.py -> mask-based hierarchical brain parcellation
  • scripts/denoise_timeseries_reference.py -> confound regression and detrending with clean_img

Scope (What this tool does / does not do)

✅ This tool does

  • Load BOLD NIfTI and (optional) brain mask.
  • Load fMRIPrep confounds TSV and apply common denoising regressors.
  • Extract ROI time series from an atlas/parcellation.
  • Compute ROI-to-ROI functional connectivity matrices.
  • Compute seed-to-voxel connectivity maps.
  • (Optional) Run first-/second-level GLM when events/maps are provided.

Read the full file on GitHub · 266 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. 9d ago First seen · 266 lines · 86 tokens per session scan A 74b02eed6972

Subscribe to this mod's changes

nilearn-tool is a skill published in the GitHub repository CUHK-AIM-Group/NeuroClaw (85 stars, last pushed 6d ago), licensed MIT. It adds 86 tokens to every session and 2,725 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). 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

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for…

K-Dense-AI/scientific-agent-skills · 66 tokens

pyhealth

Build clinical/healthcare deep-learning pipelines with PyHealth — loading EHR/signal/imaging datasets (MIMIC-III/IV, eICU, OMOP, SleepEDF, ChestXray14, EHRShot), defining tasks (mortality, readmission, length-of-stay, drug recommendation, sleep staging, ICD coding, EEG events), instantiating models (Transformer…

K-Dense-AI/scientific-agent-skills · 216 tokens

torchdrug

Build and troubleshoot TorchDrug 0.2.1 workflows for molecular graphs, property prediction, self-supervised pretraining, molecule generation, retrosynthesis, protein representation learning, and knowledge graph reasoning. Use when code imports torchdrug or needs its datasets, models, tasks, or Engine.

K-Dense-AI/scientific-agent-skills · 61 tokens

deepspot-m

Generate transcriptome-wide virtual spatial transcriptomics from H&E histology with DeepSpot-M. Use when you need spatial gene expression in log1p-CPM for 224x224 tiles at about 20x, want to query protein-coding genes by symbol instead of a fixed panel, or want to run prediction across a whole slide after tiling with…

K-Dense-AI/scientific-agent-skills · 80 tokens

nemo-mbridge-perf-expert-parallel-overlap

Validate and use MoE expert-parallel communication overlap in Megatron-Bridge, including overlapmoeexpertparallelcomm, delaywgradcompute, and flex dispatcher backends such as DeepEP and HybridEP.

NVIDIA/skills · 56 tokens

pick-a-pii-model

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

maziyarpanahi/openmed · 64 tokens