AOMIC Skill (Dataset-Orchestration Layer)
Overview
aomic-skill is the NeuroClaw orchestration skill for the AOMIC (Amsterdam Open MRI Collection) dataset.
It coordinates a fixed three-phase workflow:
- Guide AOMIC data access and download from OpenNeuro / the AOMIC repository.
- Prepare and validate BIDS-style data organization for downstream processing.
- Delegate modality pipelines to
smri-skill and fmri-skill.
It also provides phenotype extraction and QC integration paths:
- Extract and merge AOMIC phenotype tables (Big Five personality traits, fluid intelligence, demographics).
- Generate per-subject QC summaries with exclusion lists.
This skill follows NeuroClaw hierarchy:
- Defines WHAT to do, not low-level implementation details.
- Does not execute direct shell commands itself.
- Delegates all execution via
claw-shell to base/tool skills.
Research use only.
Download Stage (Mandatory First Step)
Source
AOMIC data is publicly available:
Supported AOMIC Sub-datasets
- AOMIC-ID1000: ~1,000 participants with T1w, rs-fMRI, task-fMRI (emotion, gambling, motor, language tasks), Big Five personality, Raven's progressive matrices
- AOMIC-PIOP1: T1w, rs-fMRI, task-fMRI (emotion, working memory), personality and cognitive data
- AOMIC-PIOP2: T1w, rs-fMRI, task-fMRI (emotion, working memory), personality and cognitive data
Delegation Rules for Download
- Environment/setup checks:
dependency-planner + conda-env-manager
- Download tool installation and execution:
claw-shell
- Optional raw-data organization to BIDS-style staging:
bids-organizer
Download Inputs to Confirm in Plan
- Target sub-dataset (ID1000, PIOP1, PIOP2, or all)
- Subject list scope (full cohort or custom subset)
- Destination directory with sufficient disk space
Narrow Path: AOMIC Raw Data -> BIDS Staging
Use this path when the task only asks to reorganize raw AOMIC files into a BIDS-style dataset and does not require preprocessing, ROI extraction, phenotype merging, or downstream analysis.
When this narrow path should dominate
- The task objective is limited to AOMIC data staging, BIDS renaming, sidecar handling, and dataset-level metadata.
- Inputs are already local AOMIC files or AOMIC-style subject folders.
- The required deliverable is a direct staging script or command sequence, not a plan for preprocessing or downstream analysis.
Narrow-path contract
- Do not widen the solution to preprocessing, ROI extraction, phenotype merging, or downstream analysis unless the task explicitly requires them.
- Treat this as a direct file-organization problem: scan AOMIC subject layout, normalize subject labels, map modalities to BIDS names, copy or symlink files plus matching sidecars, and write dataset-level metadata plus staging logs.
- If the task is benchmark-style, prefer a single direct end-to-end staging script over a confirmation-first orchestration plan.
Expected narrow-path behavior
- Detect AOMIC subject IDs (e.g.,
sub-0001) and validate BIDS compliance.
- Detect session/task information from directory structure and filenames.
- Route modalities:
- T1w ->
anat/*_T1w
- rs-fMRI ->
func/*_task-rest_bold
- task-fMRI ->
func/*_task-<taskname>_bold (emotion, gambling, motor, language, workingmemory)
- Preserve or rename matching JSON sidecars and physiological recordings when available.
- Emit dataset-level outputs such as
dataset_description.json, participants.tsv, README, and a manifest or skipped-file report.
Core Workflow (Never Bypassed)
- Identify user target: full AOMIC processing, specific sub-dataset, phenotype extraction, or BIDS staging only.
- Generate a numbered plan with tools, outputs, runtime, storage, and risks.
- Wait for explicit confirmation (
YES / execute / proceed).
- On confirmation, run download stage first (if needed).
- After download success, run BIDS preparation using
scripts/reorganize_aomic.py.
- Delegate sequentially or in parallel to:
smri-skill for structural MRI (T1w)
fmri-skill for functional MRI (rs-fMRI, task-fMRI)
- If phenotype extraction is requested, run
scripts/extract_aomic_phenotype.py.
- If QC summary is requested, run
scripts/aomic_qc_summary.py.
- Save outputs into an AOMIC-centered structure under
aomic_output/.
Input Layout (Example)
Subject sub-0001 (T1w + rs-fMRI + task-fMRI):
aomic_raw/
sub-0001/
anat/
sub-0001_T1w.nii.gz
sub-0001_T1w.json
func/
sub-0001_task-rest_bold.nii.gz
sub-0001_task-rest_bold.json
sub-0001_task-emotion_bold.nii.gz
sub-0001_task-emotion_bold.json
sub-0001_task-gambling_bold.nii.gz
sub-0001_task-gambling_bold.json
sub-0001_task-motor_bold.nii.gz
sub-0001_task-motor_bold.json
sub-0001_task-language_bold.nii.gz
sub-0001_task-language_bold.json
phenotype/
big_five.csv
ravens.csv
demographics.csv
BIDS Preparation
Script: scripts/reorganize_aomic.py
Validates and reorganizes AOMIC data into BIDS-compliant layout.
python skills/aomic-skill/scripts/reorganize_aomic.py \
--input /path/to/aomic_raw \
--output /path/to/aomic_bids \
--participants-file /path/to/aomic_raw/phenotype/demographics.csv
Features:
- Subject ID validation (BIDS-compliant
sub-XXXX format)
- Session/task detection from directory structure and filenames
- Modality routing: T1w, rs-fMRI, task-fMRI (emotion, gambling, motor, language, workingmemory)
- Sidecar JSON preservation and validation
- Physiological recording file handling
dataset_description.json and participants.tsv generation
- Dry-run mode:
--dry-run to preview without copying
Modality Processing Delegation
After BIDS staging completes, aomic-skill delegates by modality:
| Modality |
Delegated skill |
Typical tasks |
Main outputs |
| sMRI (T1w) |
smri-skill |
brain extraction, tissue segmentation, cortical reconstruction, ROI morphometry |
smri_output/ derivatives and stats |
| fMRI (rs-fMRI/task-fMRI) |
fmri-skill |
preprocessing, denoising, ROI time series, connectivity, task GLM |
fmri_output/ derivatives, timeseries, connectivity |
Delegation Strategy
- If user asks for full multimodal AOMIC analysis: run sMRI -> fMRI in ordered phases.
- If user asks for one modality only: call only the corresponding modality skill.
- Task-fMRI analysis should use task-specific event files (emotion, gambling, motor, language, workingmemory).
Phenotype Extraction
Script: scripts/extract_aomic_phenotype.py
Extracts and merges AOMIC phenotype tables for downstream analysis.
python skills/aomic-skill/scripts/extract_aomic_phenotype.py \
--phenotype-dir /path/to/aomic_raw/phenotype \
--output /path/to/aomic_output/phenotype/merged_phenotype.csv \
--columns subject_id,age,sex,openness,conscientiousness,extraversion,agreeableness,neuroticism,ravens_score \
--imaging-ids /path/to/aomic_output/bids/participants.tsv
Features:
- Reads AOMIC phenotype CSV/TSV files (Big Five, Raven's, demographics)
- Column selection and renaming
- Missing value handling (filter or impute)
- Cross-reference with imaging subject list to keep only subjects with both imaging and phenotype data
- Outputs merged CSV ready for statistical analysis or model training
QC Integration
Script: scripts/aomic_qc_summary.py
Generates per-subject QC summaries and exclusion lists.
python skills/aomic-skill/scripts/aomic_qc_summary.py \
--fmriprep-dir /path/to/aomic_output/fmriprep \
--freesurfer-dir /path/to/aomic_output/smri/freesurfer \
--output /path/to/aomic_output/qc/qc_summary.csv \
--exclude-output /path/to/aomic_output/qc/exclude_list.csv \
--fd-threshold 0.3
Features:
- Reads fMRIPrep confounds (framewise displacement, DVARS)
- Reads FreeSurfer recon-all QC metrics
- Structural quality assessment
- Applies exclusion criteria: motion threshold (FD), structural quality
- Outputs per-subject QC summary CSV and exclusion list CSV
Recommended Output Layout
All assets should be organized under ./aomic_output/:
aomic_output/raw/ (downloaded original AOMIC files)
aomic_output/bids/ (staged BIDS data)
aomic_output/smri/ (links or copies from smri_output/)
aomic_output/fmri/ (links or copies from fmri_output/)
aomic_output/phenotype/ (merged phenotype tables)
aomic_output/qc/ (QC summaries and exclusion lists)
aomic_output/logs/ (download + orchestration logs)
Benchmark Adapter Guidance
For benchmark-style prompts, do not force the full download -> staging -> multimodal processing orchestration when the task is only asking for local AOMIC data staging or organization.
- If the task starts from raw AOMIC data already present on disk and only asks for BIDS-style staging / organization:
- skip the mandatory download stage
- do not automatically delegate to
smri-skill or fmri-skill
- default to the narrow path
local raw AOMIC discovery -> BIDS-style staging -> minimal metadata -> validation/report
- In benchmark mode, do not require explicit confirmation before presenting the direct staging solution.
- Preserve the AOMIC-centered output contract under
aomic_output/bids/ when the task is specifically a staging benchmark.
- Only use the full multimodal orchestration and confirmation-heavy workflow when the prompt explicitly asks for download, end-to-end multimodal AOMIC processing, or post-staging structural / functional analysis.
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.
- If download fails for partial subjects, continue batch with clear failure report and retry list.
Important Notes and Limitations
- AOMIC data is already in BIDS format for many components; the reorganize script primarily validates and handles edge cases.
- AOMIC has multiple sub-datasets (ID1000, PIOP1, PIOP2) with slightly different task paradigms and phenotype measures.
- Task-fMRI event files (.tsv) must be preserved alongside BOLD data for proper task analysis.
- Some AOMIC components include physiological recordings (cardiac, respiration) that can be used for advanced denoising.
aomic-skill is orchestration-only; detailed preprocessing logic remains in smri-skill and fmri-skill.
When to Call This Skill
- User asks for end-to-end AOMIC workflow.
- User asks to process AOMIC MRI data (sMRI, rs-fMRI, task-fMRI).
- User needs BIDS staging for raw AOMIC files.
- User asks to extract and merge AOMIC phenotype tables (personality, cognition, demographics).
- User asks for AOMIC-specific QC summaries and exclusion lists.
- User needs a single entry point for AOMIC multimodal orchestration.
Complementary / Related Skills
smri-skill
fmri-skill
bids-organizer
fmriprep-tool
freesurfer-tool
nilearn-tool
brain-visualization
dependency-planner
conda-env-manager
claw-shell
Reference
Created At: 2026-05-06 11:24 HKT
Last Updated At: 2026-05-06 11:24 HKT
Author: chengwang96
1---2name: aomic-skill3description: Use this skill whenever the user wants an end-to-end workflow for the AOMIC (Amsterdam Open MRI Collection) dataset, including data access, BIDS organization, and multimodal processing of sMRI, rs-fMRI, and task-fMRI. Triggers include: 'AOMIC', 'AOMIC data', 'process AOMIC', 'AOMIC fMRI', 'AOMIC resting state', or any request to run the AOMIC multimodal pipeline. This is the NeuroClaw dataset-orchestration layer for AOMIC.4license: MIT License (NeuroClaw custom skill - freely modifiable within t5---6# AOMIC Skill (Dataset-Orchestration Layer)
7
8## Overview
9`aomic-skill` is the NeuroClaw orchestration skill for the **AOMIC (Amsterdam Open MRI Collection)** dataset.
10
11It coordinates a fixed three-phase workflow:
121. Guide AOMIC data access and download from OpenNeuro / the AOMIC repository.
132. Prepare and validate BIDS-style data organization for downstream processing.
143. Delegate modality pipelines to `smri-skill` and `fmri-skill`.
15
16It also provides **phenotype extraction** and **QC integration** paths:
17- Extract and merge AOMIC phenotype tables (Big Five personality traits, fluid intelligence, demographics).
18- Generate per-subject QC summaries with exclusion lists.
19
20This skill follows NeuroClaw hierarchy:
21- Defines **WHAT to do**, not low-level implementation details.
22- Does **not** execute direct shell commands itself.
23- Delegates all execution via `claw-shell` to base/tool skills.
24
25**Research use only.**
26
27---
28
29## Download Stage (Mandatory First Step)
30
31### Source
32AOMIC data is publicly available:
33- Website: https://nilab-uva.github.io/AOMIC.github.io/
34- OpenNeuro derivatives: https://openneuro.org/
35- Data access: direct download, no authentication required for most components
36
37### Supported AOMIC Sub-datasets
38- **AOMIC-ID1000**: ~1,000 participants with T1w, rs-fMRI, task-fMRI (emotion, gambling, motor, language tasks), Big Five personality, Raven's progressive matrices
39- **AOMIC-PIOP1**: T1w, rs-fMRI, task-fMRI (emotion, working memory), personality and cognitive data
40- **AOMIC-PIOP2**: T1w, rs-fMRI, task-fMRI (emotion, working memory), personality and cognitive data
41
42### Delegation Rules for Download
43- Environment/setup checks: `dependency-planner` + `conda-env-manager`
44- Download tool installation and execution: `claw-shell`
45- Optional raw-data organization to BIDS-style staging: `bids-organizer`
46
47### Download Inputs to Confirm in Plan
48- Target sub-dataset (ID1000, PIOP1, PIOP2, or all)
49- Subject list scope (full cohort or custom subset)
50- Destination directory with sufficient disk space
51
52---
53
54## Narrow Path: AOMIC Raw Data -> BIDS Staging
55
56Use this path when the task only asks to reorganize raw AOMIC files into a BIDS-style dataset and does not require preprocessing, ROI extraction, phenotype merging, or downstream analysis.
57
58### When this narrow path should dominate
59- The task objective is limited to AOMIC data staging, BIDS renaming, sidecar handling, and dataset-level metadata.
60- Inputs are already local AOMIC files or AOMIC-style subject folders.
61- The required deliverable is a direct staging script or command sequence, not a plan for preprocessing or downstream analysis.
62
63### Narrow-path contract
64- Do not widen the solution to preprocessing, ROI extraction, phenotype merging, or downstream analysis unless the task explicitly requires them.
65- Treat this as a direct file-organization problem: scan AOMIC subject layout, normalize subject labels, map modalities to BIDS names, copy or symlink files plus matching sidecars, and write dataset-level metadata plus staging logs.
66- If the task is benchmark-style, prefer a single direct end-to-end staging script over a confirmation-first orchestration plan.
67
68### Expected narrow-path behavior
691. Detect AOMIC subject IDs (e.g., `sub-0001`) and validate BIDS compliance.
702. Detect session/task information from directory structure and filenames.
713. Route modalities:
72 - T1w -> `anat/*_T1w`
73 - rs-fMRI -> `func/*_task-rest_bold`
74 - task-fMRI -> `func/*_task-<taskname>_bold` (emotion, gambling, motor, language, workingmemory)
754. Preserve or rename matching JSON sidecars and physiological recordings when available.
765. Emit dataset-level outputs such as `dataset_description.json`, `participants.tsv`, `README`, and a manifest or skipped-file report.
77
78---
79
80## Core Workflow (Never Bypassed)
811. Identify user target: full AOMIC processing, specific sub-dataset, phenotype extraction, or BIDS staging only.
822. Generate a numbered plan with tools, outputs, runtime, storage, and risks.
833. Wait for explicit confirmation (`YES` / `execute` / `proceed`).
844. On confirmation, run download stage first (if needed).
855. After download success, run BIDS preparation using `scripts/reorganize_aomic.py`.
866. Delegate sequentially or in parallel to:
87 - `smri-skill` for structural MRI (T1w)
88 - `fmri-skill` for functional MRI (rs-fMRI, task-fMRI)
897. If phenotype extraction is requested, run `scripts/extract_aomic_phenotype.py`.
908. If QC summary is requested, run `scripts/aomic_qc_summary.py`.
919. Save outputs into an AOMIC-centered structure under `aomic_output/`.
92
93---
94
95## Input Layout (Example)
96
97Subject `sub-0001` (T1w + rs-fMRI + task-fMRI):
98
99```
100aomic_raw/
101 sub-0001/
102 anat/
103 sub-0001_T1w.nii.gz
104 sub-0001_T1w.json
105 func/
106 sub-0001_task-rest_bold.nii.gz
107 sub-0001_task-rest_bold.json
108 sub-0001_task-emotion_bold.nii.gz
109 sub-0001_task-emotion_bold.json
110 sub-0001_task-gambling_bold.nii.gz
111 sub-0001_task-gambling_bold.json
112 sub-0001_task-motor_bold.nii.gz
113 sub-0001_task-motor_bold.json
114 sub-0001_task-language_bold.nii.gz
115 sub-0001_task-language_bold.json
116 phenotype/
117 big_five.csv
118 ravens.csv
119 demographics.csv
120```
121
122---
123
124## BIDS Preparation
125
126### Script: `scripts/reorganize_aomic.py`
127
128Validates and reorganizes AOMIC data into BIDS-compliant layout.
129
130```bash
131python skills/aomic-skill/scripts/reorganize_aomic.py \
132 --input /path/to/aomic_raw \
133 --output /path/to/aomic_bids \
134 --participants-file /path/to/aomic_raw/phenotype/demographics.csv
135```
136
137Features:
138- Subject ID validation (BIDS-compliant `sub-XXXX` format)
139- Session/task detection from directory structure and filenames
140- Modality routing: T1w, rs-fMRI, task-fMRI (emotion, gambling, motor, language, workingmemory)
141- Sidecar JSON preservation and validation
142- Physiological recording file handling
143- `dataset_description.json` and `participants.tsv` generation
144- Dry-run mode: `--dry-run` to preview without copying
145
146---
147
148## Modality Processing Delegation
149
150After BIDS staging completes, `aomic-skill` delegates by modality:
151
152| Modality | Delegated skill | Typical tasks | Main outputs |
153|---|---|---|---|
154| sMRI (T1w) | `smri-skill` | brain extraction, tissue segmentation, cortical reconstruction, ROI morphometry | `smri_output/` derivatives and stats |
155| fMRI (rs-fMRI/task-fMRI) | `fmri-skill` | preprocessing, denoising, ROI time series, connectivity, task GLM | `fmri_output/` derivatives, timeseries, connectivity |
156
157### Delegation Strategy
158- If user asks for full multimodal AOMIC analysis: run sMRI -> fMRI in ordered phases.
159- If user asks for one modality only: call only the corresponding modality skill.
160- Task-fMRI analysis should use task-specific event files (emotion, gambling, motor, language, workingmemory).
161
162---
163
164## Phenotype Extraction
165
166### Script: `scripts/extract_aomic_phenotype.py`
167
168Extracts and merges AOMIC phenotype tables for downstream analysis.
169
170```bash
171python skills/aomic-skill/scripts/extract_aomic_phenotype.py \
172 --phenotype-dir /path/to/aomic_raw/phenotype \
173 --output /path/to/aomic_output/phenotype/merged_phenotype.csv \
174 --columns subject_id,age,sex,openness,conscientiousness,extraversion,agreeableness,neuroticism,ravens_score \
175 --imaging-ids /path/to/aomic_output/bids/participants.tsv
176```
177
178Features:
179- Reads AOMIC phenotype CSV/TSV files (Big Five, Raven's, demographics)
180- Column selection and renaming
181- Missing value handling (filter or impute)
182- Cross-reference with imaging subject list to keep only subjects with both imaging and phenotype data
183- Outputs merged CSV ready for statistical analysis or model training
184
185---
186
187## QC Integration
188
189### Script: `scripts/aomic_qc_summary.py`
190
191Generates per-subject QC summaries and exclusion lists.
192
193```bash
194python skills/aomic-skill/scripts/aomic_qc_summary.py \
195 --fmriprep-dir /path/to/aomic_output/fmriprep \
196 --freesurfer-dir /path/to/aomic_output/smri/freesurfer \
197 --output /path/to/aomic_output/qc/qc_summary.csv \
198 --exclude-output /path/to/aomic_output/qc/exclude_list.csv \
199 --fd-threshold 0.3
200```
201
202Features:
203- Reads fMRIPrep confounds (framewise displacement, DVARS)
204- Reads FreeSurfer recon-all QC metrics
205- Structural quality assessment
206- Applies exclusion criteria: motion threshold (FD), structural quality
207- Outputs per-subject QC summary CSV and exclusion list CSV
208
209---
210
211## Recommended Output Layout
212All assets should be organized under `./aomic_output/`:
213- `aomic_output/raw/` (downloaded original AOMIC files)
214- `aomic_output/bids/` (staged BIDS data)
215- `aomic_output/smri/` (links or copies from `smri_output/`)
216- `aomic_output/fmri/` (links or copies from `fmri_output/`)
217- `aomic_output/phenotype/` (merged phenotype tables)
218- `aomic_output/qc/` (QC summaries and exclusion lists)
219- `aomic_output/logs/` (download + orchestration logs)
220
221---
222
223## Benchmark Adapter Guidance
224
225For benchmark-style prompts, do not force the full `download -> staging -> multimodal processing` orchestration when the task is only asking for local AOMIC data staging or organization.
226
227- If the task starts from raw AOMIC data already present on disk and only asks for BIDS-style staging / organization:
228 - skip the mandatory download stage
229 - do not automatically delegate to `smri-skill` or `fmri-skill`
230 - default to the narrow path `local raw AOMIC discovery -> BIDS-style staging -> minimal metadata -> validation/report`
231- In benchmark mode, do not require explicit confirmation before presenting the direct staging solution.
232- Preserve the AOMIC-centered output contract under `aomic_output/bids/` when the task is specifically a staging benchmark.
233- Only use the full multimodal orchestration and confirmation-heavy workflow when the prompt explicitly asks for download, end-to-end multimodal AOMIC processing, or post-staging structural / functional analysis.
234
235---
236
237## Safety and Execution Policy
238- No execution before explicit plan confirmation.
239- All execution must be routed via `claw-shell`.
240- Missing dependencies must be resolved by `dependency-planner` before running.
241- If download fails for partial subjects, continue batch with clear failure report and retry list.
242
243---
244
245## Important Notes and Limitations
246- AOMIC data is already in BIDS format for many components; the reorganize script primarily validates and handles edge cases.
247- AOMIC has multiple sub-datasets (ID1000, PIOP1, PIOP2) with slightly different task paradigms and phenotype measures.
248- Task-fMRI event files (.tsv) must be preserved alongside BOLD data for proper task analysis.
249- Some AOMIC components include physiological recordings (cardiac, respiration) that can be used for advanced denoising.
250- `aomic-skill` is orchestration-only; detailed preprocessing logic remains in `smri-skill` and `fmri-skill`.
251
252---
253
254## When to Call This Skill
255- User asks for end-to-end AOMIC workflow.
256- User asks to process AOMIC MRI data (sMRI, rs-fMRI, task-fMRI).
257- User needs BIDS staging for raw AOMIC files.
258- User asks to extract and merge AOMIC phenotype tables (personality, cognition, demographics).
259- User asks for AOMIC-specific QC summaries and exclusion lists.
260- User needs a single entry point for AOMIC multimodal orchestration.
261
262---
263
264## Complementary / Related Skills
265- `smri-skill`
266- `fmri-skill`
267- `bids-organizer`
268- `fmriprep-tool`
269- `freesurfer-tool`
270- `nilearn-tool`
271- `brain-visualization`
272- `dependency-planner`
273- `conda-env-manager`
274- `claw-shell`
275
276---
277
278## Reference
279- AOMIC: https://nilab-uva.github.io/AOMIC.github.io/
280- OpenNeuro: https://openneuro.org/
281- BIDS spec: https://bids.neuroimaging.io/
282
283Created At: 2026-05-06 11:24 HKT
284Last Updated At: 2026-05-06 11:24 HKT
285Author: chengwang96