billy-lyc/neuropilot/freeview
Claude Code and agent skill by billy-lyc/neuropilot
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install billy-lyc/neuropilot/freeviewSKILL.md
FreeSurfer Skill
Run FreeSurfer's recon-all cortical reconstruction pipeline on T1 MRI data, with optional QC checkpoints and editing support.
Version: v1, FreeSurfer 7.x
When to use this skill
Trigger this skill when the user asks to:
- Run FreeSurfer /
recon-all/ cortical reconstruction - Process T1 MRI for cortical thickness, surface area, or volume
measurements
- Generate cortical parcellations (Desikan-Killiany, Destrieux, DKT)
- Generate subcortical segmentation (aseg) from T1
- Recover from a failed FreeSurfer run
- Edit FreeSurfer intermediate files (brainmask.mgz, wm.mgz, etc.)
- QC FreeSurfer output
- Subfield/subregion segmentation: hippocampus, amygdala, brainstem,
thalamic nuclei, limbic structures, SynthSeg whole-brain, SAMSEG multi-contrast
- View images or surfaces in the web viewer (FreeView Online) —
inspect MGZ/NIfTI volumes and/or FreeSurfer surface meshes without running any processing
Do NOT trigger for: fMRI preprocessing (use fMRIPrep), diffusion processing, lesion segmentation, or non-FreeSurfer pipelines.
The three execution modes
FreeSurfer's recon-all can be run at three nested granularities:
| Level | Mode | When to use | |
|---|---|---|---|
| 1 | recon-all -all (one command) | Trusted input, batch, fire-and-forget | |
| 2 | -autorecon1, -autorecon2*, -autorecon3 (3 stages) | Standard research workflow with QC | |
| 3 | 31 single-step flags | Editing, debugging, custom processing |
These modes are nested, not exclusive. Real workflows mix levels: start at Level 1, drop to Level 2 when QC checkpoints are needed, drop to Level 3 when something fails or needs editing.
Default behavior
Default mode for a new subject: Level 2 with 4 QC checkpoints.
Run workflows/default.md unless the user specifies otherwise. This gives standard quality control without overwhelming the user.
Drop to Level 1 (`-all`) when:
- User says "just run it" / "no QC needed" / "batch mode"
- Processing many subjects (use
workflows/batch.md) - Re-running a previously-validated subject
Drop to Level 3 (single step) when:
- A specific step failed (use
workflows/resume.md) - User edited an intermediate file (use
editing/recon_edit.mdthen resume) - User wants to debug or learn one step
- Custom algorithm substitution
The 4 QC nodes (core to this skill)
| QC | After step | Reviewing | File | |
|---|---|---|---|---|
| QC1 | 5 (skull strip) | mri/brainmask.mgz | auto-fix at editing/brainmask_autofix.md, or manual edit at editing/recon_edit.md | |
| QC2 | 14 (WM seg) | mri/wm.mgz | auto-fix at editing/wm_autofix.md, or manual edit at editing/recon_edit.md | |
| QC3 | 21 (white surface) | surf/?h.white.preaparc | usually fix at QC2 | |
| QC4 | 29 (pial surface) | surf/?h.pial | edit at editing/recon_edit.md |
QC procedure (same at every node):
- Open the web viewer with the correct files for this node (see
qc/snapshot_commands.md) - Give the user the viewer startup command and file-loading instructions
- Relay the visual checklist for that node (from
qc/qc_checklist.md) - Wait for user verdict: OK / edit / re-run / reject
- Branch on verdict (resume command per node in
qc/qc_protocol.md)
The agent does NOT decide pass/fail. The user decides. The agent's job is to open the viewer with the right files, relay what to look for, and execute the user's choice.
Decision tree
Skill structure
Opening dialogue (agent's first response)
When the user's intent is not already clear, the agent presents a two-level menu using the AskUserQuestion tool (preferred — buttons are easier to tap on mobile). Fall back to a numbered text list if the tool is unavailable. Max 4 options per question.
Level 1 — Top-level intent
Branch A — Run FreeSurfer
Ask Q1 + Q2 in one call. Ask Q3 only if not already known.
If Q3 = "Yes", follow up with plain text listing the 8 tools from subfields/overview.md — do NOT put all 8 in buttons (max 4 per Q).
Workflow routing after Branch A:
| Q1 / Q2 / Q3 | Workflow | |
|---|---|---|
| Single + Standard + None | workflows/default.md | |
| Single + Standard + subfields | workflows/default.md → append subfields/* | |
| Single + Fast + None | recon-all -all end-to-end | |
| Single + Fast + subfields | -all then subfields/* | |
| Single + Custom | workflows/single_step.md | |
| Batch + any + any | workflows/batch.md |
Branch B — Open FreeView
If View:
→ Go to workflows/view_freeview.md
If Edit:
→ Go to editing/recon_edit.md (covers all three edit targets)
When to skip the opening dialogue
| User said | Action | |
|---|---|---|
| "Run FreeSurfer on sub-01" | Ask Level 1 + Branch A (Q1/Q2/Q3) | |
| "Just run -all on 50 subjects, no QC" | Skip all → Batch + Fast + None | |
| "My recon-all crashed" | Skip all → workflows/resume.md | |
| "Re-run just the white surface step" | Skip all → workflows/single_step.md | |
| "I edited brainmask.mgz, what next" | Skip all → editing/recon_edit.md then resume | |
| "View this folder / show me these surfaces" | Skip Level 1 → Branch B: View | |
| "Edit my brainmask" | Skip Level 1 → Branch B: Edit → brainmask |
Principle: don't ask what the user already told you.
The agent then states the plan briefly and starts executing:
Plan:- Process sub-01 with the standard workflow (4 QC checkpoints)- After QC4 passes, run hippocampus + amygdala subfield segmentation (T1)- Final report includes recon-all stats + hippocampus subfieldsStarting with environment setup and autorecon1...
This makes the agent's intentions transparent and lets the user correct course before time-expensive steps run.
Key behaviors
Always
- Verify
$FREESURFER_HOMEand$SUBJECTS_DIRare set before any
command
- Set
$SUBJECTand$QC_DIR(export to/mnt/user-data/outputs/<subject>_qc/)
at the start of any session
- Source
$FREESURFER_HOME/SetUpFreeSurfer.shto ensure tools are in
PATH
- Backup intermediate files before editing
(e.g., cp brainmask.mgz brainmask.mgz.preEdit)
- Log QC verdicts to
$QC_DIR/qc_log.txt - After each
recon-allinvocation, verify success by checking
scripts/recon-all-status.log
Never
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingqc-agent-skill/freeview/SKILL.md
Popularity
- Repository stars
- 54
- Repository forks
- 5
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/billy-lyc/neuropilot/freeview)