Skip to content
Back to skills

Surface Workflows

ASecurity

"Work with Nilearn surface meshes, surface images,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
datapythonapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill surface-workflows --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Surface Workflows?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Surface Workflows
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-surface-workflows/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-surface-workflows)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: surface-workflows
description: "Work with Nilearn surface meshes, surface images,
  volume-to-surface projection, fsaverage helpers, and surface maskers while
  routing plotting and raw image preparation to the right Nilearn skills."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 3-Clause
---

# Surface Workflows

Use this sub-skill when a task involves Nilearn cortical surface objects,
mesh/data contracts, `SurfaceImage` construction, volume-to-surface projection,
fsaverage meshes, or surface-specific maskers.

## Route Here

- Build or validate surface meshes with `InMemoryMesh`, `FileMesh`, `PolyMesh`,
  or `load_surf_mesh`.
- Build or validate surface data with `PolyData`, `load_surf_data`, or
  `SurfaceImage`.
- Project NIfTI volume data to surface vertices with `vol_to_surf` or
  `SurfaceImage.from_volume`.
- Load fsaverage meshes or fsaverage surface data with no-download awareness.
- Use `SurfaceMasker`, `SurfaceLabelsMasker`, or `SurfaceMapsMasker` enough to
  prepare arrays for analysis pipelines.

## Route Elsewhere

- For figure engine choices, `plot_surf`, `view_surf`, report display, Plotly,
  Matplotlib, or optional plotting dependencies, route to `../plotting-reporting/SKILL.md`.
- For raw NIfTI loading, resampling, confounds, signal cleaning, or volume image
  preparation before projection, route to `../data-io-signal/SKILL.md`.
- For deeper shared masker, labels, maps, atlas, and region-extraction behavior,
  route to `../maskers-regions/SKILL.md`; keep this sub-skill focused on
  surface-specific mesh/data contracts.

## Quick Checklist

1. Confirm whether the task is left-only, right-only, or both hemispheres.
2. Keep mesh parts and data parts keyed identically as `left` and/or `right`.
3. Match each data part's first dimension to the corresponding mesh vertex
   count before creating `SurfaceImage`.
4. Treat surface arrays as vertex-major: `(n_vertices,)` for a scalar map or
   `(n_vertices, n_samples_or_regions)` for time series, labels, or maps.
5. Avoid dataset downloads unless the user explicitly requests them; prefer the
   shipped `fsaverage5` helper for no-network examples.
6. Hand visualization choices off to plotting/reporting after producing a valid
   `SurfaceImage` or surface array.

## References

- `references/api-reference.md` summarizes public constructors, helpers, and
  object relationships.
- `references/data-formats.md` describes mesh, data, hemisphere, and file-format
  contracts.
- `references/workflows.md` gives recipes for minimal meshes, projection,
  fsaverage, surface maskers, and plotting handoff.
- `references/troubleshooting.md` maps common surface failures to likely fixes.

## Bundled Script

Run `python scripts/smoke_surface.py --help` for options or
`python scripts/smoke_surface.py` for a no-network sanity check that constructs
left/right in-memory meshes, builds a `SurfaceImage`, and verifies masker-style
array shapes.

Files in this skill

  • SKILL.md2.9 KB
  • references/api-reference.md5.6 KB
  • references/data-formats.md4.5 KB
  • references/troubleshooting.md5.5 KB
  • references/workflows.md5 KB
  • scripts/smoke_surface.py3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.