REST-meta-MDD Skill (Dataset-Orchestration Layer)
Overview
rest-mneta-mdd-skill is the NeuroClaw orchestration skill for the REST-meta-MDD (Resting-State Meta-Major Depressive Disorder) dataset, a large-scale multi-site consortium project pooling resting-state fMRI data from 17 research sites across China.
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 BIDS validation, phenotype extraction, and QC.
Core workflow (never bypassed):
- Identify input REST-meta-MDD 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 (
rest_mdd_output/).
Research use only.
Quick Reference
| Task |
What needs to be done |
Delegate to |
Expected output |
| BIDS validation |
Validate REST-meta-MDD BIDS structure |
scripts/validate_rest_mdd.py |
Validation report |
| rs-fMRI processing |
Preprocessing, denoising, connectivity |
fmri-skill |
fmri_output/ connectivity |
| Phenotype extraction |
Diagnosis, clinical measures, site info |
scripts/extract_rest_mdd_phenotype.py |
Merged phenotype CSV |
| Site harmonization |
Multi-site effect correction |
scripts/harmonize_sites.py |
Harmonized data |
| QC summary |
Per-subject quality control |
scripts/rest_mdd_qc_summary.py |
QC summary + exclusion list |
Dataset Characteristics
- Cohort: ~3,600+ participants
- MDD patients: ~1,837 Major Depressive Disorder patients
- Healthy controls: ~1,779 age/sex-matched controls
- Sites: 17 research sites across China
- Scanner: Multi-site (various 3T scanners)
- Modalities: rs-fMRI (primary), T1w sMRI (some sites)
- Clinical: Diagnosis (SCID), HAMD, HAMA, medication status
- Access: Chinese Data Sharing Platform, REST-meta-MDD consortium
- Format: NIfTI (community BIDS conversion available)
- Reference: Yan et al. (2019), Science Bulletin
Supported Modalities
| Modality |
Description |
Details |
| rs-fMRI |
Resting-state functional MRI |
Eyes closed, 5-10 min |
| T1w |
Structural MRI (some sites) |
1mm isotropic |
REST-meta-MDD Clinical Measures
| Measure |
Description |
Domain |
| Diagnosis |
MDD vs. Healthy Control (SCID-based) |
Clinical status |
| HAMD |
Hamilton Depression Rating Scale |
Depression severity |
| HAMA |
Hamilton Anxiety Rating Scale |
Anxiety severity |
| Medication |
Medication status (medicated vs. drug-naive) |
Treatment |
| Site |
Data collection site (1-17) |
Multi-site |
| Age |
Age at scan |
Demographics |
| Sex |
Biological sex |
Demographics |
| Education |
Years of education |
Demographics |
BIDS Preparation
Script: scripts/validate_rest_mdd.py
Validates REST-meta-MDD BIDS structure and generates a compliance report.
python skills/rest-mneta-mdd-skill/scripts/validate_rest_mdd.py \
--input /path/to/REST-meta-MDD/bids \
--output /path/to/rest_mdd_output/qc/bids_validation.csv
Features:
- BIDS directory structure validation
- Site identification and completeness check
- Diagnostic group labeling (MDD vs. control)
- Modality completeness (rs-fMRI required, T1w optional)
Core Workflow (Never Bypassed)
- Identify user target: full REST-meta-MDD processing, rs-fMRI only, phenotype extraction, or BIDS validation only.
- Generate a numbered plan with tools, outputs, runtime, storage, and risks.
- Wait for explicit confirmation (
YES / execute / proceed).
- On confirmation, run BIDS validation using
scripts/validate_rest_mdd.py.
- Delegate to
fmri-skill for rs-fMRI processing.
- If T1w data available, delegate to
smri-skill.
- If phenotype extraction is requested, run
scripts/extract_rest_mdd_phenotype.py.
- If site harmonization is requested, run
scripts/harmonize_sites.py.
- If QC summary is requested, run
scripts/rest_mdd_qc_summary.py.
- Save outputs into
rest_mdd_output/.
Modality Processing Delegation
| Modality |
Delegated skill |
Typical tasks |
Main outputs |
| rs-fMRI |
fmri-skill |
preprocessing, denoising, connectivity |
fmri_output/ connectivity |
| sMRI (T1w) |
smri-skill |
brain extraction, tissue segmentation |
smri_output/ derivatives |
Standard Output Layout
rest_mdd_output/
├── bids/ # BIDS-staged data (or validation report)
├── fmri/ # Functional MRI derivatives (rs-fMRI connectivity)
├── smri/ # Structural MRI derivatives (if available)
├── phenotype/ # Merged phenotype tables (diagnosis, clinical, site)
├── harmonized/ # Site-harmonized data (ComBat or similar)
├── qc/ # QC summaries and exclusion lists
└── logs/ # Processing logs
Multi-Site Harmonization
REST-meta-MDD is a multi-site dataset (17 sites). Site effects are a major confound:
- ComBat: Commonly used batch effect correction for neuroimaging data
- Site-wise z-scoring: Normalize metrics within site before pooling
- Mixed-effects models: Include site as random effect in statistical analyses
- The
scripts/harmonize_sites.py script provides reference implementations
Benchmark Adapter Guidance
For benchmark-style prompts, do not force the full orchestration when the task only asks for local REST-meta-MDD data validation.
- If the task starts from REST-meta-MDD data already present on disk and only asks for BIDS validation:
- Skip the download stage
- Default to the narrow path
local REST-meta-MDD discovery -> BIDS 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
- Multi-site data (17 sites) requires careful site effect handling.
- Scanner heterogeneity across sites introduces variability.
- rs-fMRI is the primary modality; structural data is limited.
- MDD diagnosis is SCID-based across all sites.
- Large sample size (~3,600) provides good statistical power for case-control analyses.
- Medication status is an important confound; subgroup analyses (medicated vs. drug-naive) are recommended.
rest-mneta-mdd-skill is orchestration-only; detailed preprocessing logic remains in modality skills.
When to Call This Skill
- User asks for end-to-end REST-meta-MDD workflow.
- User asks to process REST-meta-MDD resting-state fMRI data.
- User needs BIDS validation for REST-meta-MDD data.
- User asks to extract REST-meta-MDD phenotype data (diagnosis, HAMD, site).
- User asks for depression neuroimaging analysis or multi-site harmonization.
Complementary / Related Skills
fmri-skill → functional MRI preprocessing and analysis
smri-skill → structural MRI preprocessing (if available)
bids-organizer → BIDS validation and organization
brain-visualization → visualization of derivatives
dependency-planner → dependency resolution
conda-env-manager → environment management
claw-shell → command execution
Reference
- REST-meta-MDD: Chinese Data Sharing Platform
- Yan et al. (2019): Reduced default mode network functional connectivity in patients with recurrent major depressive disorder. Science Bulletin.
- REST-meta-MDD consortium
Created At: 2026-05-06 13:55 HKT
Last Updated At: 2026-05-06 13:55 HKT
Author: chengwang96
1---2name: rest-mneta-mdd-skill3description: Use this skill whenever the user wants an end-to-end workflow for the REST-meta-MDD (Resting-State Meta-Major Depressive Disorder) dataset, including BIDS validation, processing of rs-fMRI, phenotype extraction, and QC integration. Triggers include: 'REST-meta-MDD', 'MDD', 'Major Depressive Disorder', 'depression resting-state', 'process REST-meta-MDD', or any request to run the REST-meta-MDD pipeline.4license: MIT License (NeuroClaw custom skill - freely modifiable within t5---6# REST-meta-MDD Skill (Dataset-Orchestration Layer)
7
8## Overview
9
10`rest-mneta-mdd-skill` is the NeuroClaw orchestration skill for the **REST-meta-MDD (Resting-State Meta-Major Depressive Disorder)** dataset, a large-scale multi-site consortium project pooling resting-state fMRI data from 17 research sites across China.
11
12It strictly follows the NeuroClaw hierarchical design principles:
13- This skill **only describes WHAT needs to be done** and **which tool skill to delegate to**.
14- It contains **no implementation code or concrete commands**.
15- All concrete execution is delegated to existing base/tool skills via `claw-shell`.
16- Companion scripts in `scripts/` provide reference implementations for BIDS validation, phenotype extraction, and QC.
17
18**Core workflow (never bypassed):**
191. Identify input REST-meta-MDD data and target modalities.
202. Generate a **numbered execution plan** clearly stating WHAT needs to be done and which tool skill will handle each step.
213. Present the full plan, estimated runtime, resource requirements, and risks to the user and wait for explicit confirmation ("YES" / "execute" / "proceed").
224. On confirmation, delegate every step to the appropriate skill via `claw-shell`.
235. After execution, save all outputs in a clean directory structure (`rest_mdd_output/`).
24
25**Research use only.**
26
27---
28
29## Quick Reference
30
31| Task | What needs to be done | Delegate to | Expected output |
32|---|---|---|---|
33| BIDS validation | Validate REST-meta-MDD BIDS structure | `scripts/validate_rest_mdd.py` | Validation report |
34| rs-fMRI processing | Preprocessing, denoising, connectivity | `fmri-skill` | `fmri_output/` connectivity |
35| Phenotype extraction | Diagnosis, clinical measures, site info | `scripts/extract_rest_mdd_phenotype.py` | Merged phenotype CSV |
36| Site harmonization | Multi-site effect correction | `scripts/harmonize_sites.py` | Harmonized data |
37| QC summary | Per-subject quality control | `scripts/rest_mdd_qc_summary.py` | QC summary + exclusion list |
38
39---
40
41## Dataset Characteristics
42
43- **Cohort**: ~3,600+ participants
44 - **MDD patients**: ~1,837 Major Depressive Disorder patients
45 - **Healthy controls**: ~1,779 age/sex-matched controls
46- **Sites**: 17 research sites across China
47- **Scanner**: Multi-site (various 3T scanners)
48- **Modalities**: rs-fMRI (primary), T1w sMRI (some sites)
49- **Clinical**: Diagnosis (SCID), HAMD, HAMA, medication status
50- **Access**: Chinese Data Sharing Platform, REST-meta-MDD consortium
51- **Format**: NIfTI (community BIDS conversion available)
52- **Reference**: Yan et al. (2019), Science Bulletin
53
54---
55
56## Supported Modalities
57
58| Modality | Description | Details |
59|---|---|---|
60| rs-fMRI | Resting-state functional MRI | Eyes closed, 5-10 min |
61| T1w | Structural MRI (some sites) | 1mm isotropic |
62
63---
64
65## REST-meta-MDD Clinical Measures
66
67| Measure | Description | Domain |
68|---|---|---|
69| Diagnosis | MDD vs. Healthy Control (SCID-based) | Clinical status |
70| HAMD | Hamilton Depression Rating Scale | Depression severity |
71| HAMA | Hamilton Anxiety Rating Scale | Anxiety severity |
72| Medication | Medication status (medicated vs. drug-naive) | Treatment |
73| Site | Data collection site (1-17) | Multi-site |
74| Age | Age at scan | Demographics |
75| Sex | Biological sex | Demographics |
76| Education | Years of education | Demographics |
77
78---
79
80## BIDS Preparation
81
82### Script: `scripts/validate_rest_mdd.py`
83
84Validates REST-meta-MDD BIDS structure and generates a compliance report.
85
86```bash
87python skills/rest-mneta-mdd-skill/scripts/validate_rest_mdd.py \
88 --input /path/to/REST-meta-MDD/bids \
89 --output /path/to/rest_mdd_output/qc/bids_validation.csv
90```
91
92Features:
93- BIDS directory structure validation
94- Site identification and completeness check
95- Diagnostic group labeling (MDD vs. control)
96- Modality completeness (rs-fMRI required, T1w optional)
97
98---
99
100## Core Workflow (Never Bypassed)
101
1021. Identify user target: full REST-meta-MDD processing, rs-fMRI only, phenotype extraction, or BIDS validation only.
1032. Generate a numbered plan with tools, outputs, runtime, storage, and risks.
1043. Wait for explicit confirmation (`YES` / `execute` / `proceed`).
1054. On confirmation, run BIDS validation using `scripts/validate_rest_mdd.py`.
1065. Delegate to `fmri-skill` for rs-fMRI processing.
1076. If T1w data available, delegate to `smri-skill`.
1087. If phenotype extraction is requested, run `scripts/extract_rest_mdd_phenotype.py`.
1098. If site harmonization is requested, run `scripts/harmonize_sites.py`.
1109. If QC summary is requested, run `scripts/rest_mdd_qc_summary.py`.
11110. Save outputs into `rest_mdd_output/`.
112
113---
114
115## Modality Processing Delegation
116
117| Modality | Delegated skill | Typical tasks | Main outputs |
118|---|---|---|---|
119| rs-fMRI | `fmri-skill` | preprocessing, denoising, connectivity | `fmri_output/` connectivity |
120| sMRI (T1w) | `smri-skill` | brain extraction, tissue segmentation | `smri_output/` derivatives |
121
122---
123
124## Standard Output Layout
125
126```
127rest_mdd_output/
128├── bids/ # BIDS-staged data (or validation report)
129├── fmri/ # Functional MRI derivatives (rs-fMRI connectivity)
130├── smri/ # Structural MRI derivatives (if available)
131├── phenotype/ # Merged phenotype tables (diagnosis, clinical, site)
132├── harmonized/ # Site-harmonized data (ComBat or similar)
133├── qc/ # QC summaries and exclusion lists
134└── logs/ # Processing logs
135```
136
137---
138
139## Multi-Site Harmonization
140
141REST-meta-MDD is a multi-site dataset (17 sites). Site effects are a major confound:
142
143- **ComBat**: Commonly used batch effect correction for neuroimaging data
144- **Site-wise z-scoring**: Normalize metrics within site before pooling
145- **Mixed-effects models**: Include site as random effect in statistical analyses
146- The `scripts/harmonize_sites.py` script provides reference implementations
147
148---
149
150## Benchmark Adapter Guidance
151
152For benchmark-style prompts, do not force the full orchestration when the task only asks for local REST-meta-MDD data validation.
153
154- If the task starts from REST-meta-MDD data already present on disk and only asks for BIDS validation:
155 - Skip the download stage
156 - Default to the narrow path `local REST-meta-MDD discovery -> BIDS validation -> report`
157- In benchmark mode, do not require explicit confirmation before presenting the validation solution.
158
159---
160
161## Safety and Execution Policy
162- No execution before explicit plan confirmation.
163- All execution must be routed via `claw-shell`.
164- Missing dependencies must be resolved by `dependency-planner` before running.
165
166---
167
168## Important Notes and Limitations
169- Multi-site data (17 sites) requires careful site effect handling.
170- Scanner heterogeneity across sites introduces variability.
171- rs-fMRI is the primary modality; structural data is limited.
172- MDD diagnosis is SCID-based across all sites.
173- Large sample size (~3,600) provides good statistical power for case-control analyses.
174- Medication status is an important confound; subgroup analyses (medicated vs. drug-naive) are recommended.
175- `rest-mneta-mdd-skill` is orchestration-only; detailed preprocessing logic remains in modality skills.
176
177---
178
179## When to Call This Skill
180- User asks for end-to-end REST-meta-MDD workflow.
181- User asks to process REST-meta-MDD resting-state fMRI data.
182- User needs BIDS validation for REST-meta-MDD data.
183- User asks to extract REST-meta-MDD phenotype data (diagnosis, HAMD, site).
184- User asks for depression neuroimaging analysis or multi-site harmonization.
185
186---
187
188## Complementary / Related Skills
189- `fmri-skill` → functional MRI preprocessing and analysis
190- `smri-skill` → structural MRI preprocessing (if available)
191- `bids-organizer` → BIDS validation and organization
192- `brain-visualization` → visualization of derivatives
193- `dependency-planner` → dependency resolution
194- `conda-env-manager` → environment management
195- `claw-shell` → command execution
196
197---
198
199## Reference
200- REST-meta-MDD: Chinese Data Sharing Platform
201- Yan et al. (2019): Reduced default mode network functional connectivity in patients with recurrent major depressive disorder. Science Bulletin.
202- REST-meta-MDD consortium
203
204Created At: 2026-05-06 13:55 HKT
205Last Updated At: 2026-05-06 13:55 HKT
206Author: chengwang96