| name | mschallenge-skill |
| description | Use this skill whenever the user wants an end-to-end workflow for the Longitudinal MS Lesion Segmentation Challenge dataset, including data validation, multimodal processing of T1w, T2w, FLAIR, and PD, lesion segmentation, and QC integration. Triggers include: 'MS Lesion Challenge', 'MS Lesion', 'ISBI MS', 'longitudinal MS', 'multiple sclerosis lesion', or any request to run the MS lesion segmentation pipeline. |
| license | MIT License (NeuroClaw custom skill - freely modifiable within the project) |
| layer | subagent |
| skill_type | dataset |
| dependencies | ["smri-skill","nibabel-skill","claw-shell"] |
| complementary_skills | ["brain-visualization"] |
MS Challenge Skill (Dataset-Orchestration Layer)
Overview
mschallenge-skill is the NeuroClaw orchestration skill for the Longitudinal MS Lesion Segmentation Challenge dataset.
It strictly follows the NeuroClaw hierarchical design principles:
- This skill only describes WHAT needs to be done and which tool skill to delegate to.
- It contains no implementation code or concrete commands.
- All concrete execution is delegated to existing base/tool skills via
claw-shell.
- Companion scripts in
scripts/ provide reference implementations for data validation, lesion analysis, and QC.
Core workflow (never bypassed):
- Identify input MS Challenge data and target modalities.
- Generate a numbered execution plan clearly stating WHAT needs to be done and which tool skill will handle each step.
- Present the full plan, estimated runtime, resource requirements, and risks to the user and wait for explicit confirmation ("YES" / "execute" / "proceed").
- On confirmation, delegate every step to the appropriate skill via
claw-shell.
- After execution, save all outputs in a clean directory structure (
mschallenge_output/).
Research use only.
Quick Reference
| Task | What needs to be done | Delegate to | Expected output |
|---|
| Data validation | Validate MS Challenge directory structure | scripts/validate_mschallenge.py | Validation report |
| sMRI processing | Brain extraction, tissue segmentation | smri-skill | smri_output/ derivatives |
| Lesion analysis | Lesion volume, count, location analysis | scripts/analyze_lesions.py | Lesion statistics CSV |
| Longitudinal analysis | Lesion change tracking across timepoints | scripts/longitudinal_lesion.py | Longitudinal change report |
| QC summary | Per-subject quality control | scripts/mschallenge_qc_summary.py | QC summary + exclusion list |
Dataset Characteristics
- Origin: ISBI 2015 Longitudinal MS Lesion Segmentation Challenge
- Training: 5 subjects, each with 2 timepoints (longitudinal)
- Testing: 14 subjects (hidden ground truth), 4-6 timepoints each
- Modalities: T1w, T2w, FLAIR, PD (co-registered)
- Ground truth: Manual lesion segmentation masks (training only)
- Resolution: ~0.5 Ć 0.5 Ć 0.5 mm (isotropic)
- Preprocessing: Skull-stripped, co-registered to common space
- Reference: Carass et al. (2017), NeuroImage
Supported Modalities
| Modality | Description | Use in MS |
|---|
| T1w | T1-weighted structural | Brain atrophy, gray matter lesions |
| T2w | T2-weighted | White matter lesion detection |
| FLAIR | Fluid-Attenuated Inversion Recovery | Periventricular lesion detection |
| PD | Proton Density | Complementary lesion contrast |
Directory Structure (Native)
training/
āāā subject01/
ā āāā time01/
ā ā āāā subject01_time01_T1.nii.gz
ā ā āāā subject01_time01_T2.nii.gz
ā ā āāā subject01_time01_FLAIR.nii.gz
ā ā āāā subject01_time01_PD.nii.gz
ā ā āāā subject01_time01_lesion.nii.gz (ground truth)
ā āāā time02/
ā āāā ...
BIDS Preparation
Script: scripts/validate_mschallenge.py
Validates MS Challenge directory structure and generates a compliance report.
python skills/mschallenge-skill/scripts/validate_mschallenge.py \
--input /path/to/MSChallenge/training \
--output /path/to/mschallenge_output/qc/validation.csv
Features:
- Directory structure validation
- Modality completeness check (T1w, T2w, FLAIR, PD)
- Ground truth mask presence verification
- Longitudinal timepoint consistency
- Missing data identification
Core Workflow (Never Bypassed)
- Identify user target: full MS Challenge processing, lesion analysis, or validation only.
- Generate a numbered plan with tools, outputs, runtime, storage, and risks.
- Wait for explicit confirmation (
YES / execute / proceed).
- On confirmation, run data validation using
scripts/validate_mschallenge.py.
- Delegate to
smri-skill for structural MRI processing.
- If lesion analysis is requested, run
scripts/analyze_lesions.py.
- If longitudinal analysis is requested, run
scripts/longitudinal_lesion.py.
- If QC summary is requested, run
scripts/mschallenge_qc_summary.py.
- Save outputs into
mschallenge_output/.
Modality Processing Delegation
| Modality | Delegated skill | Typical tasks | Main outputs |
|---|
| sMRI (T1w/T2w/FLAIR/PD) | smri-skill | brain extraction, tissue segmentation | smri_output/ derivatives |
| Lesion masks | nibabel-skill | lesion volume, count, location | Lesion statistics |
Standard Output Layout
mschallenge_output/
āāā raw/ # Original MS Challenge files
āāā validation/ # Validation reports
āāā smri/ # Structural MRI derivatives
āāā lesions/ # Lesion analysis results
ā āāā lesion_stats.csv
ā āāā longitudinal_change.csv
āāā qc/ # QC summaries and exclusion lists
āāā logs/ # Processing logs
Benchmark Adapter Guidance
For benchmark-style prompts, do not force the full orchestration when the task only asks for local MS Challenge data validation.
- If the task starts from MS Challenge data already present on disk and only asks for validation:
- Skip the download stage
- Default to the narrow path
local MS Challenge discovery -> validation -> report
- In benchmark mode, do not require explicit confirmation before presenting the validation solution.
Safety and Execution Policy
- No execution before explicit plan confirmation.
- All execution must be routed via
claw-shell.
- Missing dependencies must be resolved by
dependency-planner before running.
Important Notes and Limitations
- MS Challenge is a longitudinal dataset; consider timepoint effects in analysis.
- Ground truth masks are only available for training subjects.
- All images are preprocessed (skull-stripped, co-registered).
- Lesion segmentation is the primary task; standard brain morphometry may be affected by lesions.
- The challenge is designed for benchmarking; results should be compared with published baselines.
mschallenge-skill is orchestration-only; detailed preprocessing logic remains in modality skills.
When to Call This Skill
- User asks for end-to-end MS Lesion Challenge workflow.
- User asks to validate MS Challenge data structure.
- User asks for lesion volume and count analysis.
- User asks for longitudinal lesion change tracking.
- User asks for MS lesion segmentation benchmarking.
Complementary / Related Skills
smri-skill ā structural MRI preprocessing
nibabel-skill ā NIfTI I/O and mask manipulation
brain-visualization ā lesion overlay visualization
dependency-planner ā dependency resolution
conda-env-manager ā environment management
claw-shell ā command execution
Reference
Created At: 2026-05-06 13:31 HKT
Last Updated At: 2026-05-06 13:31 HKT
Author: chengwang96