Cam-CAN Skill (Dataset-Orchestration Layer)
Overview
camcan-skill is the NeuroClaw orchestration skill for the Cam-CAN (Cambridge Centre for Ageing and Neuroscience) 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 BIDS validation, phenotype extraction, and QC.
Core workflow (never bypassed):
- Identify input Cam-CAN 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 (
camcan_output/).
Research use only.
Quick Reference
| Task |
What needs to be done |
Delegate to |
Expected output |
| BIDS validation |
Validate Cam-CAN BIDS structure |
scripts/validate_camcan.py |
Validation report |
| sMRI processing |
Brain extraction, tissue segmentation, cortical reconstruction |
smri-skill |
smri_output/ derivatives |
| rs-fMRI processing |
Preprocessing, denoising, connectivity |
fmri-skill |
fmri_output/ derivatives |
| task-fMRI processing |
Movie-watching task GLM, activation analysis |
fmri-skill |
fmri_output/ task results |
| MEG processing |
Source localization, time-frequency analysis |
meg-skill |
meg_output/ TFR and source |
| Phenotype extraction |
Cognitive, sensory, health measures |
scripts/extract_camcan_phenotype.py |
Merged phenotype CSV |
| QC summary |
Per-subject quality control |
scripts/camcan_qc_summary.py |
QC summary + exclusion list |
Dataset Characteristics
- Cohort: ~700 participants spanning the adult lifespan (18-88 years)
- Design: Cross-sectional population-based sample
- Site: MRC Cognition and Brain Sciences Unit, Cambridge, UK
- Scanner: Siemens 3T TIM TRIO
- MEG system: CTF 275-channel system
- Access: OpenNeuro ds003097 (CC0 license)
Supported Modalities
| Modality |
Description |
Tasks/Conditions |
| T1w |
High-resolution structural MRI |
Single acquisition |
| T2*w |
Functional MRI (multi-echo EPI) |
Resting-state (eyes open), Movie-watching |
| MEG |
Magnetoencephalography |
Resting-state (eyes open), Auditory (passive listening), Visual (passive viewing) |
| dMRI |
Diffusion-weighted imaging |
DTI tractography |
Cam-CAN Task Paradigms
fMRI Tasks
| Task |
Description |
Duration |
| REST |
Resting-state (eyes open) |
~8 min |
| MOVIE |
Movie-watching (feature film excerpts) |
~15 min |
MEG Tasks
| Task |
Description |
Duration |
| REST |
Resting-state (eyes open, eyes closed) |
~8 min |
| AUDITORY |
Passive listening to tones and speech |
~5 min |
| VISUAL |
Passive viewing of visual stimuli |
~5 min |
BIDS Preparation
Script: scripts/validate_camcan.py
Validates Cam-CAN BIDS structure and generates a compliance report.
python skills/camcan-skill/scripts/validate_camcan.py \
--input /path/to/CamCAN/bids \
--output /path/to/camcan_output/qc/bids_validation.csv
Features:
- BIDS directory structure validation
- Modality completeness check (T1w, T2*w, MEG, dMRI)
- Sidecar JSON presence and content validation
- Participant ID consistency across modalities
- Missing data identification and reporting
Core Workflow (Never Bypassed)
- Identify user target: full Cam-CAN processing, imaging subset, 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_camcan.py.
- Delegate to
smri-skill for structural MRI processing.
- Delegate to
fmri-skill for functional MRI processing (resting-state and movie-watching).
- Delegate to
meg-skill for MEG processing (source localization, time-frequency analysis).
- If phenotype extraction is requested, run
scripts/extract_camcan_phenotype.py.
- If QC summary is requested, run
scripts/camcan_qc_summary.py.
- Save outputs into
camcan_output/.
Modality Processing Delegation
| Modality |
Delegated skill |
Typical tasks |
Main outputs |
| sMRI (T1w) |
smri-skill |
brain extraction, tissue segmentation, cortical reconstruction |
smri_output/ derivatives |
| fMRI (T2*w) |
fmri-skill |
preprocessing, denoising, connectivity, task GLM |
fmri_output/ derivatives |
| MEG |
meg-skill |
source localization, time-frequency, connectivity |
meg_output/ TFR and source |
| dMRI |
dwi-skill |
diffusion preprocessing, tensor metrics |
dwi_output/ metrics |
Standard Output Layout
camcan_output/
├── bids/ # BIDS-staged data (or validation report)
├── smri/ # Structural MRI derivatives
├── fmri/ # Functional MRI derivatives (rest + movie)
├── meg/ # MEG derivatives (TFR, source, connectivity)
├── dwi/ # Diffusion MRI derivatives
├── phenotype/ # Merged phenotype tables
├── 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 Cam-CAN data validation or staging.
- If the task starts from Cam-CAN data already present on disk and only asks for BIDS validation:
- Skip the download stage
- Default to the narrow path
local Cam-CAN 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
- Cam-CAN is a population-based sample spanning the full adult lifespan (18-88 years).
- MEG data uses CTF 275-channel system; MEG processing requires system-specific handling.
- Movie-watching fMRI is a unique task paradigm; standard GLM may not apply.
- Age range is a key variable; consider age-stratified analyses.
- Data is available on OpenNeuro ds003097 in BIDS format.
camcan-skill is orchestration-only; detailed preprocessing logic remains in modality skills.
When to Call This Skill
- User asks for end-to-end Cam-CAN workflow.
- User asks to process Cam-CAN MRI and/or MEG data.
- User needs BIDS validation for Cam-CAN data.
- User asks to extract Cam-CAN phenotype data (cognitive, sensory, health).
- User asks for age-related brain imaging analysis using Cam-CAN.
Complementary / Related Skills
smri-skill → structural MRI preprocessing
fmri-skill → functional MRI preprocessing and analysis
meg-skill → MEG processing (source localization, time-frequency)
mne-eeg-tool → MNE-Python EEG/MEG processing
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
Created At: 2026-05-06 13:31 HKT
Last Updated At: 2026-05-06 13:31 HKT
Author: chengwang96
1---2name: camcan-skill3description: Use this skill whenever the user wants an end-to-end workflow for the Cam-CAN (Cambridge Centre for Ageing and Neuroscience) dataset, including BIDS validation, multimodal processing of sMRI, rs-fMRI, task-fMRI, and MEG, phenotype extraction, and QC integration. Triggers include: 'Cam-CAN', 'CamCAN', 'process Cam-CAN data', 'Cam-CAN MEG', 'Cam-CAN fMRI', or any request to run the Cam-CAN multimodal pipeline.4license: MIT License (NeuroClaw custom skill - freely modifiable within t5---6# Cam-CAN Skill (Dataset-Orchestration Layer)
7
8## Overview
9
10`camcan-skill` is the NeuroClaw orchestration skill for the **Cam-CAN (Cambridge Centre for Ageing and Neuroscience)** dataset.
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 Cam-CAN 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 (`camcan_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 Cam-CAN BIDS structure | `scripts/validate_camcan.py` | Validation report |
34| sMRI processing | Brain extraction, tissue segmentation, cortical reconstruction | `smri-skill` | `smri_output/` derivatives |
35| rs-fMRI processing | Preprocessing, denoising, connectivity | `fmri-skill` | `fmri_output/` derivatives |
36| task-fMRI processing | Movie-watching task GLM, activation analysis | `fmri-skill` | `fmri_output/` task results |
37| MEG processing | Source localization, time-frequency analysis | `meg-skill` | `meg_output/` TFR and source |
38| Phenotype extraction | Cognitive, sensory, health measures | `scripts/extract_camcan_phenotype.py` | Merged phenotype CSV |
39| QC summary | Per-subject quality control | `scripts/camcan_qc_summary.py` | QC summary + exclusion list |
40
41---
42
43## Dataset Characteristics
44
45- **Cohort**: ~700 participants spanning the adult lifespan (18-88 years)
46- **Design**: Cross-sectional population-based sample
47- **Site**: MRC Cognition and Brain Sciences Unit, Cambridge, UK
48- **Scanner**: Siemens 3T TIM TRIO
49- **MEG system**: CTF 275-channel system
50- **Access**: OpenNeuro ds003097 (CC0 license)
51
52---
53
54## Supported Modalities
55
56| Modality | Description | Tasks/Conditions |
57|---|---|---|
58| T1w | High-resolution structural MRI | Single acquisition |
59| T2*w | Functional MRI (multi-echo EPI) | Resting-state (eyes open), Movie-watching |
60| MEG | Magnetoencephalography | Resting-state (eyes open), Auditory (passive listening), Visual (passive viewing) |
61| dMRI | Diffusion-weighted imaging | DTI tractography |
62
63---
64
65## Cam-CAN Task Paradigms
66
67### fMRI Tasks
68| Task | Description | Duration |
69|---|---|---|
70| REST | Resting-state (eyes open) | ~8 min |
71| MOVIE | Movie-watching (feature film excerpts) | ~15 min |
72
73### MEG Tasks
74| Task | Description | Duration |
75|---|---|---|
76| REST | Resting-state (eyes open, eyes closed) | ~8 min |
77| AUDITORY | Passive listening to tones and speech | ~5 min |
78| VISUAL | Passive viewing of visual stimuli | ~5 min |
79
80---
81
82## BIDS Preparation
83
84### Script: `scripts/validate_camcan.py`
85
86Validates Cam-CAN BIDS structure and generates a compliance report.
87
88```bash
89python skills/camcan-skill/scripts/validate_camcan.py \
90 --input /path/to/CamCAN/bids \
91 --output /path/to/camcan_output/qc/bids_validation.csv
92```
93
94Features:
95- BIDS directory structure validation
96- Modality completeness check (T1w, T2*w, MEG, dMRI)
97- Sidecar JSON presence and content validation
98- Participant ID consistency across modalities
99- Missing data identification and reporting
100
101---
102
103## Core Workflow (Never Bypassed)
104
1051. Identify user target: full Cam-CAN processing, imaging subset, phenotype extraction, or BIDS validation only.
1062. Generate a numbered plan with tools, outputs, runtime, storage, and risks.
1073. Wait for explicit confirmation (`YES` / `execute` / `proceed`).
1084. On confirmation, run BIDS validation using `scripts/validate_camcan.py`.
1095. Delegate to `smri-skill` for structural MRI processing.
1106. Delegate to `fmri-skill` for functional MRI processing (resting-state and movie-watching).
1117. Delegate to `meg-skill` for MEG processing (source localization, time-frequency analysis).
1128. If phenotype extraction is requested, run `scripts/extract_camcan_phenotype.py`.
1139. If QC summary is requested, run `scripts/camcan_qc_summary.py`.
11410. Save outputs into `camcan_output/`.
115
116---
117
118## Modality Processing Delegation
119
120| Modality | Delegated skill | Typical tasks | Main outputs |
121|---|---|---|---|
122| sMRI (T1w) | `smri-skill` | brain extraction, tissue segmentation, cortical reconstruction | `smri_output/` derivatives |
123| fMRI (T2*w) | `fmri-skill` | preprocessing, denoising, connectivity, task GLM | `fmri_output/` derivatives |
124| MEG | `meg-skill` | source localization, time-frequency, connectivity | `meg_output/` TFR and source |
125| dMRI | `dwi-skill` | diffusion preprocessing, tensor metrics | `dwi_output/` metrics |
126
127---
128
129## Standard Output Layout
130
131```
132camcan_output/
133├── bids/ # BIDS-staged data (or validation report)
134├── smri/ # Structural MRI derivatives
135├── fmri/ # Functional MRI derivatives (rest + movie)
136├── meg/ # MEG derivatives (TFR, source, connectivity)
137├── dwi/ # Diffusion MRI derivatives
138├── phenotype/ # Merged phenotype tables
139├── qc/ # QC summaries and exclusion lists
140└── logs/ # Processing logs
141```
142
143---
144
145## Benchmark Adapter Guidance
146
147For benchmark-style prompts, do not force the full orchestration when the task only asks for local Cam-CAN data validation or staging.
148
149- If the task starts from Cam-CAN data already present on disk and only asks for BIDS validation:
150 - Skip the download stage
151 - Default to the narrow path `local Cam-CAN discovery -> BIDS validation -> report`
152- In benchmark mode, do not require explicit confirmation before presenting the validation solution.
153
154---
155
156## Safety and Execution Policy
157- No execution before explicit plan confirmation.
158- All execution must be routed via `claw-shell`.
159- Missing dependencies must be resolved by `dependency-planner` before running.
160
161---
162
163## Important Notes and Limitations
164- Cam-CAN is a population-based sample spanning the full adult lifespan (18-88 years).
165- MEG data uses CTF 275-channel system; MEG processing requires system-specific handling.
166- Movie-watching fMRI is a unique task paradigm; standard GLM may not apply.
167- Age range is a key variable; consider age-stratified analyses.
168- Data is available on OpenNeuro ds003097 in BIDS format.
169- `camcan-skill` is orchestration-only; detailed preprocessing logic remains in modality skills.
170
171---
172
173## When to Call This Skill
174- User asks for end-to-end Cam-CAN workflow.
175- User asks to process Cam-CAN MRI and/or MEG data.
176- User needs BIDS validation for Cam-CAN data.
177- User asks to extract Cam-CAN phenotype data (cognitive, sensory, health).
178- User asks for age-related brain imaging analysis using Cam-CAN.
179
180---
181
182## Complementary / Related Skills
183- `smri-skill` → structural MRI preprocessing
184- `fmri-skill` → functional MRI preprocessing and analysis
185- `meg-skill` → MEG processing (source localization, time-frequency)
186- `mne-eeg-tool` → MNE-Python EEG/MEG processing
187- `bids-organizer` → BIDS validation and organization
188- `brain-visualization` → visualization of derivatives
189- `dependency-planner` → dependency resolution
190- `conda-env-manager` → environment management
191- `claw-shell` → command execution
192
193---
194
195## Reference
196- Cam-CAN: https://camcan.mrc-cbu.cam.ac.uk/
197- OpenNeuro ds003097: https://openneuro.org/datasets/ds003097
198- Shafto et al. (2014): The Cam-CAN study protocol. BMC Neurology.
199- Taylor et al. (2017): The Cam-CAN data repository. NeuroImage.
200
201Created At: 2026-05-06 13:31 HKT
202Last Updated At: 2026-05-06 13:31 HKT
203Author: chengwang96