Agent skill

Pycortex Guide

by NeuroAIHub in NeuroAIHub/BrainPilot

Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain…

AGPL-3.0Auto-check passedGame Development

Install Pycortex Guide

skills CLI
$ npx skills add NeuroAIHub/BrainPilot --skill pycortex-guide -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install NeuroAIHub/BrainPilot pycortex-guide --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/NeuroAIHub/BrainPilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packages/skills/skills/06_fMRI_Neuroimaging/pycortex-guide .claude/skills/pycortex-guide && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pycortex-guide
GitHub stars
1k
Token cost
~1.6k tokens
SKILL.md length
511 words
Files
8 (incl. references)
Skills in repo
59
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain…

  • Works in 10 steps: Volume data shape must match the… → Subject and transform names must exist… → cortex.quickshow is an alias for… → …
  • The user mentions pycortex
  • SKILL.md covers Purpose, When to Use This Skill, Reference Files and Installation, plus 5 more sections
  • Calls pip

What it does

Pycortex Guide is an agent skill from NeuroAIHub/BrainPilot. Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain viewers, volume-to-surface mapping, FreeSurfer/fMRIPrep integration, ROI management, and surface analysis. Use this skill whenever the user mentions pycortex, import cortex, cortical surfaces, brain flatmaps, WebGL brain viewers, cortical surface mapping, or wants to visualize neuroimaging data on the cortex, even if they…

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `references/database-subjects.md`, `references/dataset-types.md` and `references/freesurfer-fmriprep.md`).

It sits in Game Development, covering 3D graphics and WebGL. The repository describes itself as: BrainPilot: Automating Brain Discovery with Agentic Research. The licence is AGPL-3.0.

When your agent uses it

  • The user mentions pycortex
  • Cortical surfaces
  • WebGL brain viewers
  • Cortical surface mapping

Example prompts

  • “/pycortex-guide”

Requirements

  • Python 3

Workflow steps

10 steps, taken from the first numbered list in SKILL.md.

  1. Volume data shape must match the transform dimensions in the database. Use cortex.db.get_xfm(subject, xfmname) to check expected shape.
  2. Subject and transform names must exist in cortex.db before creating Volume objects. Import from FreeSurfer first.
  3. cortex.quickshow is an alias for cortex.quickflat.make_figure — they are the same function.
  4. Vertex data length must match total vertex count (left + right hemisphere). Single-hemisphere data is auto-padded with zeros.
  5. vmin/vmax default to 1st/99th percentile of data. Always set explicitly for consistent colorbars across subjects.
  6. WebGL viewer (webshow) starts a Tornado server — it blocks in scripts. Use in IPython/Jupyter or set autoclose=True.
  7. The pycortex filestore path is set in cortex.options.config. Check with cortex.database.default_filestore.
  8. For headless rendering (no display), install with pip install 'pycortex[headless]' and use cortex.export.save_3d_views(..., headless=True).
  9. cortex.db is a singleton — all operations share the same database instance.
  10. When saving datasets with pack=True, subject geometry and transforms are embedded in the HDF5 file for portability.

What it can do on your machine

Read from SKILL.md and the folder at commit 93f6855. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pycortex Guide loads about 1.6k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 141 tokens; SKILL.md has 511 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~141
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from NeuroAIHub/BrainPilot at commit 93f6855, republished under its AGPL-3.0 licence (© NeuroAIHub). 511 words, ~1,581 tokens.

Download SKILL.mdSave it as .claude/skills/pycortex-guide/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
pycortex-guide
description
Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain viewers, volume-to-surface mapping, FreeSurfer/fMRIPrep integration, ROI management, and surface analysis. Use this skill whenever the user mentions pycortex, `import cortex`, cortical surfaces, brain flatmaps, WebGL brain viewers, cortical surface mapping, or wants to visualize neuroimaging data on the cortex, even if they don't explicitly name pycortex.
version
1.0.0
authors
Claude (AI-assisted)
review_status
ai-generated

Pycortex Guide

Purpose

Encodes domain knowledge for using pycortex — a Python library for visualizing fMRI and volumetric neuroimaging data on cortical surfaces. Covers data creation, 2D flatmap rendering, interactive 3D WebGL viewers, volume-to-surface mapping, subject database management, FreeSurfer/fMRIPrep integration, and surface geometry analysis.

When to Use This Skill

Activate when the user:

  • Wants to visualize fMRI data on cortical surfaces
  • Mentions pycortex, import cortex, flatmaps, or cortical surface visualization
  • Needs to create Volume, Vertex, or Dataset objects for brain data
  • Wants to generate 2D flatmaps or 3D interactive brain viewers
  • Needs to import FreeSurfer or fMRIPrep subjects into pycortex
  • Works with volume-to-surface mapping or cortical ROIs
  • Needs to align functional data to anatomical surfaces
  • Wants to compute surface properties (curvature, thickness, geodesic distance)

Reference Files

TopicFileWhen to Read
Data typesreferences/dataset-types.mdUser creates Volume, Vertex, RGB, 2D, or Dataset objects
Visualizationreferences/visualization.mdUser wants flatmaps, WebGL viewers, exports, or screenshots
Database & subjectsreferences/database-subjects.mdUser manages subjects, surfaces, transforms, or masks
Mapping & transformsreferences/mapping-transforms.mdUser maps volume↔surface, aligns data, or works with transforms
FreeSurfer & fMRIPrepreferences/freesurfer-fmriprep.mdUser imports subjects from FreeSurfer or fMRIPrep
Surface analysisreferences/surface-analysis.mdUser computes curvature, geodesic distance, ROIs, or distortion
MNI & utilitiesreferences/mni-utils.mdUser transforms to/from MNI space or uses volume utilities

Installation

bash
pip install -U setuptools wheel numpy cython
pip install -U pycortex
# With headless rendering support:
pip install -U 'pycortex[headless]'

Requirements: Python 3.10+, Linux/macOS only. Key dependencies: numpy, scipy, matplotlib, nibabel, h5py, tornado, shapely, lxml.

Overview Pipeline

1. Import subject (FreeSurfer/fMRIPrep)  →  stored in cortex.db
2. Create data objects (Volume/Vertex)    →  wrap arrays with metadata
3. Visualize (quickflat / webgl / export) →  2D flatmaps or 3D viewers
4. Analyze surfaces (curvature, ROIs)     →  surface geometry tools

Quick Start

python
import cortex

# Create a random volume for demo subject "S1" with transform "fullhead"
vol = cortex.Volume.random("S1", "fullhead")

# 2D flatmap
fig = cortex.quickshow(vol, with_curvature=True, with_rois=True)
fig.savefig("flatmap.png")

# Interactive 3D viewer
cortex.webshow(vol)

# Create volume from your own data (3D numpy array)
import numpy as np
data = np.random.randn(31, 100, 100)  # must match transform shape
vol = cortex.Volume(data, "S1", "fullhead", cmap="RdBu_r", vmin=-2, vmax=2)
cortex.quickshow(vol)

# Save/load datasets
ds = cortex.Dataset(my_map=vol)
ds.save("results.hdf")
ds_loaded = cortex.load("results.hdf")

Key Data Types

ClassDescriptionKey Args
VolumeVolumetric data (3D/4D)data, subject, xfmname, cmap, vmin, vmax
VertexSurface vertex data (1D/2D)data, subject, cmap, vmin, vmax
VolumeRGBRGB per voxelred, green, blue, subject, xfmname, alpha
VertexRGBRGB per vertexred, green, blue, subject, alpha
Volume2DTwo volumes, 2D colormapdim1, dim2, subject, xfmname, vmin, vmax, vmin2, vmax2
Vertex2DTwo vertex maps, 2D colormapdim1, dim2, subject, vmin, vmax, vmin2, vmax2
DatasetContainer for multiple views**named_dataviews
Show full SKILL.md (206 more words)Show less

Key Visualization Functions

FunctionDescription
cortex.quickshow(data, ...)2D flatmap → matplotlib Figure
cortex.quickflat.make_png(fname, data, ...)Save flatmap as PNG
cortex.quickflat.make_svg(fname, data, ...)Save flatmap as SVG
cortex.quickflat.make_gif(fname, volumes, ...)Animated GIF from volumes
cortex.webshow(data, ...)Interactive 3D WebGL viewer
cortex.webgl.make_static(path, data, ...)Static HTML 3D viewer
cortex.export.save_3d_views(vol, ...)Multi-angle PNG exports
cortex.export.plot_panels(vol, panels, ...)Multi-panel figure

Common Pitfalls

  1. Volume data shape must match the transform dimensions in the database. Use cortex.db.get_xfm(subject, xfmname) to check expected shape.
  2. Subject and transform names must exist in cortex.db before creating Volume objects. Import from FreeSurfer first.
  3. cortex.quickshow is an alias for cortex.quickflat.make_figure — they are the same function.
  4. Vertex data length must match total vertex count (left + right hemisphere). Single-hemisphere data is auto-padded with zeros.
  5. vmin/vmax default to 1st/99th percentile of data. Always set explicitly for consistent colorbars across subjects.
  6. WebGL viewer (webshow) starts a Tornado server — it blocks in scripts. Use in IPython/Jupyter or set autoclose=True.
  7. The pycortex filestore path is set in cortex.options.config. Check with cortex.database.default_filestore.
  8. For headless rendering (no display), install with pip install 'pycortex[headless]' and use cortex.export.save_3d_views(..., headless=True).
  9. cortex.db is a singleton — all operations share the same database instance.
  10. When saving datasets with pack=True, subject geometry and transforms are embedded in the HDF5 file for portability.

© NeuroAIHub, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in packages/skills/skills/06_fMRI_Neuroimaging/pycortex-guide of NeuroAIHub/BrainPilot.

  • SKILL.md
  • references/database-subjects.md
  • references/dataset-types.md
  • references/freesurfer-fmriprep.md
  • references/mapping-transforms.md
  • references/mni-utils.md
  • references/surface-analysis.md
  • references/visualization.md

Open the folder on GitHubat commit 93f6855

Compare with similar skills

Pycortex Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pycortex Guide compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pycortex Guide this skillNeuroAIHub/BrainPilot1k—~1.6kAutomated safety check: PassAGPL-3.0
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k1 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.4k—~2.2kAutomated safety check: PassMIT
Game Asset Generatorhtdt/godogen7.1k—~2.8kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 1 repo~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.4k GitHub stars~2.2k tokensUpdated 9 days ago
    Game DevelopmentAuto-check passed
  • Generates game art from text prompts: PNG images, GLB 3D models, rigged characters, animations and sprites, with background removal.

    7.1k GitHub stars~2.8k tokensUpdated 5 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Threejs World Generation

    calesthio/OpenMontage

    Build deterministic, editable, free-viewpoint Three.js worlds from text or structured briefs.

    65k GitHub stars~2k tokensUpdated 3 days ago
    Game DevelopmentAuto-check passed

More from NeuroAIHub/BrainPilot

All 59 skills in this repo
  • Deeplabcut

    NeuroAIHub/BrainPilot

    Toolbox for markerless animal pose estimation with DeepLabCut.

    1k GitHub stars~1.7k tokensUpdated 5 days ago
    Auto-check passed
  • Fmriprep

    NeuroAIHub/BrainPilot

    Preprocess task-based or resting-state fMRI data with fMRIPrep — a robust, BIDS-App preprocessing pipeline built on FSL, ANTs, FreeSurfer, AFNI, and Nilearn.

    1k GitHub stars~4.1k tokensUpdated 5 days ago
    Auto-check passed
  • Mne Python Guide

    NeuroAIHub/BrainPilot

    Domain-validated pipeline guidance for EEG/MEG data analysis using MNE-Python: data loading, preprocessing (filtering, ICA, re-referencing), epoching, ERP/ERF computation, time-frequency…

    1k GitHub stars~2.3k tokensUpdated 5 days ago
    Auto-check passed
  • Netneurotools Guide

    NeuroAIHub/BrainPilot

    Domain-validated guidance for network neuroscience analysis using netneurotools: datasets, brain network metrics, connectivity consensus, modularity, spatial statistics, null models, and cortical…

    1k GitHub stars~2.6k tokensUpdated 5 days ago
    Auto-check passed
  • Nature Figure

    NeuroAIHub/BrainPilot

    Submission-grade Nature/high-impact journal figure workflow for Python or R.

    1k GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Markdown Report Writing

    NeuroAIHub/BrainPilot

    Guide AI agents to write beautifully formatted, well-illustrated Markdown reports with proper structure, diagrams, and compatibility across GitHub and Obsidian.

    1k GitHub stars~2.6k tokensUpdated 5 days ago
    Auto-check: warnings

Questions about Pycortex Guide

What does Pycortex Guide do?

Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain…. Pycortex Guide is an agent skill from NeuroAIHub/BrainPilot. Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain viewers, volume-to-surface mapping, FreeSurfer/fMRIPrep integration, ROI management, and surface analysis.

When should I use Pycortex Guide?

Pycortex Guide fits situations like: the user mentions pycortex; cortical surfaces; webGL brain viewers; cortical surface mapping.

How do I install Pycortex Guide in Claude Code?

Run `npx skills add NeuroAIHub/BrainPilot --skill pycortex-guide -a claude-code`. Or copy the skill folder (packages/skills/skills/06_fMRI_Neuroimaging/pycortex-guide in NeuroAIHub/BrainPilot) into .claude/skills/pycortex-guide in your project. Claude Code loads it when a task matches its description.

How do I install Pycortex Guide in Codex?

Run `npx skills add NeuroAIHub/BrainPilot --skill pycortex-guide -a codex`. Or copy the skill folder (packages/skills/skills/06_fMRI_Neuroimaging/pycortex-guide in NeuroAIHub/BrainPilot) into .agents/skills/pycortex-guide in your project. Codex loads it when a task matches its description.

Can I use Pycortex Guide in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add NeuroAIHub/BrainPilot --skill pycortex-guide -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pycortex-guide, .gemini/skills/pycortex-guide, .github/skills/pycortex-guide and .opencode/skills/pycortex-guide in your project.

What does Pycortex Guide need to run?

Going by SKILL.md and its folder, Pycortex Guide needs the command-line tools its instructions call (pip). Our summary lists: Python 3.

Does Pycortex Guide access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Pycortex Guide safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pycortex Guide use?

Pycortex Guide is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pycortex Guide use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 10k tokens, read only when the agent opens those files.

What are the alternatives to Pycortex Guide?

Skills that share tags, products or a category with Pycortex Guide: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.4k stars) and Game Asset Generator (htdt/godogen, 7.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pycortex Guide?

NeuroAIHub (a GitHub organization) maintains it in NeuroAIHub/BrainPilot, which has 1,040 GitHub stars. The repository holds 59 skills in this directory. The repository was last updated on October 2, 2026.

Source: NeuroAIHub/BrainPilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.