Official agent skill

Nv Generate Mr Brain

by NVIDIA in NVIDIA/skills

Used for generating synthetic T1, T2, FLAIR, SWI, or MRA brain MRI volumes with NV-Generate-CTMR MR-Brain v1.

OfficialApache-2.0Auto-check: notes

Install Nv Generate Mr Brain

skills CLI
$ npx skills add NVIDIA/skills --skill nv-generate-mr-brain -a claude-code

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

GitHub CLI
$ gh skill install NVIDIA/skills nv-generate-mr-brain --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/NVIDIA/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/nv-generate-mr-brain .claude/skills/nv-generate-mr-brain && 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
nv-generate-mr-brain
GitHub stars
3.5k
Token cost
~2.6k tokens
SKILL.md length
998 words
Files
15 (incl. scripts, references)
Skills in repo
380
Repo updated
First seen
Licence
Apache-2.0

At a glance

Used for generating synthetic T1, T2, FLAIR, SWI, or MRA brain MRI volumes with NV-Generate-CTMR MR-Brain v1.

  • SKILL.md covers Purpose, Instructions, Examples and Available Scripts, plus 6 more sections
  • Runs Python scripts from its folder; calls python, git and pip; reaches github.com and huggingface.co

What it does

Nv Generate Mr Brain is an agent skill from NVIDIA/skills, published by the product's own GitHub organization. Used for generating synthetic T1, T2, FLAIR, SWI, or MRA brain MRI volumes with NV-Generate-CTMR MR-Brain v1. Not for production training data.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 20 other files, including scripts and reference files (for example `BENCHMARK.md`, `evals/evals.json` and `fixtures/README.md`).

The repository describes itself as: Agent Skills for NVIDIA products — install into Claude Code, Codex, and other coding agents to run Physical AI, robotics, simulation, CUDA, and RAG workflows end to end. The licence is Apache-2.0.

Example prompts

  • “/nv-generate-mr-brain”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash, Read, Write, WebFetch, Env

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • WebFetch
    • Env

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • git
    • pip

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com
    • huggingface.co

    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

Nv Generate Mr Brain loads about 2.6k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 41 tokens; SKILL.md has 998 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, WebFetch, Env

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); the scripts in this folder are not scanned.

SKILL.md

The full file from NVIDIA/skills at commit 67a13c0, republished under its Apache-2.0 licence (© NVIDIA). 998 words, ~2,577 tokens.

Download SKILL.mdSave it as .claude/skills/nv-generate-mr-brain/SKILL.md (or your agent's skills folder). This skill also uses 14 other files; get the full folder from GitHub.
name
nv-generate-mr-brain
description
Used for generating synthetic T1, T2, FLAIR, SWI, or MRA brain MRI volumes with NV-Generate-CTMR MR-Brain v1. Not for production training data.
allowed-tools
Bash, Read, Write, WebFetch, Env
license
Apache-2.0
permissions
env, file_read, file_write, network, shell
metadata.author
NVIDIA MedTech Team
metadata.tags
MedTech, MRI, brain

NV-Generate-MR-Brain

Purpose

  • Used for generating synthetic T1, T2, FLAIR, SWI, or MRA brain MRI volumes with NV-Generate-CTMR rflow-mr-brain v1. Not for production training data.
  • Use the wrapper exactly as documented; do not replace the upstream entrypoint with a handwritten implementation.
  • Do not write custom inference code for normal runs. The wrapper owns config staging, output paths, and validation.
  • Manifest I/O: inputs are model_config_override; outputs are synthetic_mr_brain_volumes and result_json.

Instructions

  • Read skill_manifest.yaml before changing arguments, side effects, or validation gates.
  • Run scripts/run_mr_brain.py through the documented command below; keep outputs under a caller-provided run directory.
  • If a host agent exposes run_script, use run_script("scripts/run_mr_brain.py", args=[...]); otherwise run the Bash/Python command shown below.
  • For a command-shape review, do not install packages, clone repositories, download weights, or start GPU inference. Emit only the exact wrapper command with the supplied config path plus explicit --output-dir, --modality, and --random-seed values.
  • For an executable run, emit a single bash code block and keep the python -m pip install -r "$NV_GENERATE_ROOT/requirements.txt" step in that same command — the runtime may be a fresh environment without nibabel/MONAI, so dropping the install fails with ModuleNotFoundError.
  • If --modality mri_mra is selected, state that upstream reports sparse MRA training coverage and that output quality is not guaranteed.
  • Do not add rm, mkdir, or any cleanup of --output-dir; the wrapper creates it. Use a fresh --output-dir instead of deleting one.
  • Check the emitted JSON and paired verifier guidance before treating the run as evidence.

Examples

Command-shape review only (no setup or execution):

bash
python skills/nv-generate-mr-brain/scripts/run_mr_brain.py \
  PATH_TO_MR_BRAIN_CONFIG.json \
  --output-dir runs/nv_generate_mr_brain_demo \
  --modality mri_t1 \
  --random-seed 1234

For an executable run, use the setup-aware command under Usage.

Available Scripts

ScriptPurposeArguments
scripts/run_mr_brain.pyPrimary entrypoint declared by skill_manifest.yaml.MODEL_CONFIG.json --output-dir OUT_DIR --modality mri_t1 [--random-seed N] [--yes]

Prerequisites

  • Runtime requirements: GPU/CUDA when declared by the manifest; Python packages listed in runtime.side_effects.pip_packages.
  • Side effects: writes generated outputs under the caller's --output-dir, may cache model assets under ~/.cache/huggingface/, and may contact https://huggingface.co or https://github.com during setup.
  • Run commands from the repository root unless an existing section below says otherwise.

Limitations

  • This is a thin wrapper. Inference, sampling, and decoding are delegated entirely to NVIDIA-Medtech/NV-Generate-CTMR's scripts.diff_model_infer. Do not modify code under $NV_GENERATE_ROOT or the repo-local fallback at .workbench_data/upstreams/NV-Generate-CTMR.
  • rflow-mr-brain generates image-only synthetic brain MRI volumes. It does not emit paired segmentation masks.
  • Output volumes are synthetic. They are not safe as training data for production medtech models without independent quality review.
  • Not for clinical deployment, clinical interpretation, autonomous diagnosis, regulatory submission.

Troubleshooting

ErrorCauseFix
Missing dependency or import errorRuntime package drift from skill_manifest.yaml.Install the packages declared in the manifest or use the documented setup command.
Empty or schema-invalid outputWrong input path, unsupported modality, or upstream failure.Re-run with a known fixture and inspect the wrapper JSON plus stderr.
Validation gate failureOutput violated a declared engineering invariant.Keep the failed evidence pack and use the gate message to repair inputs or wrapper code.

Wraps the upstream NVIDIA-Medtech/NV-Generate-CTMR MR brain image-only generation workflow. The wrapper does not reimplement diffusion sampling or autoencoder decoding. It stages config overrides, runs the documented python -m scripts.diff_model_infer command for rflow-mr-brain, then summarizes the generated NIfTI volume.

Exact Runnable Surface

For user run commands, use this repo-root wrapper path exactly:

bash
export NV_GENERATE_ROOT="${NV_GENERATE_ROOT:-$HOME/.cache/nvidia-skills/upstreams/NV-Generate-CTMR-da438fe}" && \
python -m pip install -r "$NV_GENERATE_ROOT/requirements.txt" && \
python skills/nv-generate-mr-brain/scripts/run_mr_brain.py PATH_TO_MR_BRAIN_CONFIG.json --output-dir OUT_DIR --modality mri_t1 --random-seed 1234

Do not invent generate.sh, infer.py, Medical AI Skills run, or python -m nv_generate_mr_brain commands. PATH_TO_MR_BRAIN_CONFIG.json must be the user's supplied request path.

Show full SKILL.md (452 more words)Show less

Preconditions

If NV_GENERATE_ROOT already names a local checkout, the wrapper uses it and records its current commit in the result. Otherwise, create the recommended pinned default checkout once:

bash
if [ -z "${NV_GENERATE_ROOT:-}" ]; then
  export NV_GENERATE_COMMIT=da438fec6484cdb6f421f8c7051d954ebefff730
  export NV_GENERATE_ROOT="$HOME/.cache/nvidia-skills/upstreams/NV-Generate-CTMR-da438fe"
  if [ ! -d "$NV_GENERATE_ROOT/.git" ]; then
    git clone https://github.com/NVIDIA-Medtech/NV-Generate-CTMR.git "$NV_GENERATE_ROOT"
    git -C "$NV_GENERATE_ROOT" checkout --detach "$NV_GENERATE_COMMIT"
  fi
fi
pip install -r "$NV_GENERATE_ROOT/requirements.txt"

The wrapper executes upstream code only when NV_GENERATE_ROOT is at the exact manifest commit and its tracked files are clean. Keep model weights untracked under models/, and use the wrapper override JSON instead of editing upstream configs. Child processes receive only an allowlist of runtime, CUDA, locale, and certificate variables; API keys, tokens, passwords, and unrelated parent environment values are not forwarded.

Download the reused autoencoder and MR-Brain v1 checkpoint from their exact manifest revisions:

bash
python -m huggingface_hub.commands.huggingface_cli download \
  nvidia/NV-Generate-CT models/autoencoder_v1.pt \
  --revision 75ac080fb1083c403793563477724c038e7d430c \
  --local-dir "$NV_GENERATE_ROOT"
python -m huggingface_hub.commands.huggingface_cli download \
  nvidia/NV-Generate-MR-Brain models/diff_unet_3d_rflow-mr-brain_v1.pt \
  --revision ef9759bf221265b2704569cdeeac20bbf03b62ee \
  --local-dir "$NV_GENERATE_ROOT"

The wrapper verifies both downloaded files against their published Git LFS SHA-256 object IDs before launching inference.

Runtime needs an NVIDIA GPU with at least 16 GB VRAM. There is no CPU fallback in the upstream path.

The wrapper also searches .workbench_data/upstreams/NV-Generate-CTMR if NV_GENERATE_ROOT is unset or does not have the required upstream layout.

For agent-generated user run commands, use the command in Usage. Do not prepend clone or model-download setup steps when the repo-local upstream cache already exists. In a fresh Python environment, still include pip install -r "$NV_GENERATE_ROOT/requirements.txt" before the wrapper unless the active environment has already proven those imports are available; cached weights do not imply cached Python packages. If setup requires cd "$NV_GENERATE_ROOT", return to the Medical AI Skills repo before invoking skills/nv-generate-mr-brain/scripts/run_mr_brain.py.

Usage

bash
export NV_GENERATE_ROOT="${NV_GENERATE_ROOT:-$HOME/.cache/nvidia-skills/upstreams/NV-Generate-CTMR-da438fe}" && \
python -m pip install -r "$NV_GENERATE_ROOT/requirements.txt" && \
python skills/nv-generate-mr-brain/scripts/run_mr_brain.py \
  PATH_TO_MR_BRAIN_CONFIG.json \
  --output-dir runs/nv_generate_mr_brain_demo \
  --modality mri_t1 \
  --random-seed 1234

Replace PATH_TO_MR_BRAIN_CONFIG.json with the user's actual request/config path. Do not copy the fixture path from this document unless the user explicitly asked to run that fixture. If the user says "the request is at runs/.../default_mri_t1.json", that exact path is the first positional argument to scripts/run_mr_brain.py.

Supported MR-brain modality names are mri, mri_t1, mri_t2, mri_flair, mri_mra, mri_swi, mri_t1_skull_stripped, mri_t2_skull_stripped, mri_flair_skull_stripped, mri_mra_skull_stripped, and mri_swi_skull_stripped. These map to the upstream configs/modality_mapping.json IDs documented in the README. For FOV and setup details, see references/fov-and-downloads.md.

The pinned v1 config ships axial T1w defaults of dim=[256,256,128], spacing=[0.94,0.94,1.36], 30 inference steps, and cfg_guidance_scale=2. Keep the staged config value unless a model-specific validation justifies an override; older examples may describe the v0 256^3/1 mm geometry or guidance scale 10. MRA is supported by v1, but the upstream training-data report contains few MRA scans, so output quality is not guaranteed.

The fixture argument is a small JSON override for configs/config_maisi_diff_model_rflow-mr-brain.json. Pass default to use the upstream defaults plus the CLI modality and random seed. Common override keys are dim, spacing, num_inference_steps, cfg_guidance_scale, and modality.

Each run records the staged config, model inventory, upstream command, output geometry, spacing, affine, intensity range, and non-constant / finite-data checks. Output volumes are synthetic and are not safe as production training data without independent review.

Not for clinical interpretation, production deployment, autonomous diagnosis, or regulatory submission.

© NVIDIA, Apache-2.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 14 other files (scripts, references) in skills/nv-generate-mr-brain of NVIDIA/skills.

  • SKILL.md
  • BENCHMARK.md
  • evals/evals.json
  • fixtures/README.md
  • fixtures/default_mri_t1.json
  • fixtures/mri_flair_skull_stripped.json
  • fixtures/mri_mra.json
  • fixtures/mri_t2.json
  • references/fov-and-downloads.md
  • scripts/run_mr_brain.py
  • skill-card.md
  • skill.oms.sig
  • skill_manifest.yaml
  • tests/test_run_mr_brain.py
  • validators/output_schema.json

Open the folder on GitHubat commit 67a13c0

Compare with similar skills

Nv Generate Mr Brain 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.

Nv Generate Mr Brain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nv Generate Mr Brain this skillNVIDIA/skills3.5k—~2.6kAutomated safety check: NotesApache-2.0
Generatealirezarezvani/claude-skills28k1 repos~1.1kAutomated safety check: PassMIT
Fal Generatenexu-io/open-design100k—~306Automated safety check: PassApache-2.0
Video Generationbytedance/deer-flow83k4 repos~1.4kAutomated safety check: PassMIT
Generating Synthetic Surrogatesmaziyarpanahi/openmed5.5k—~1.8kAutomated safety check: PassApache-2.0
Synthetic Eval Data Generatorai-evals-course/evals-skills1.5k—~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Generate

    alirezarezvani/claude-skills

    Generate Playwright tests. An agent skill from alirezarezvani/claude-skills.

    28k GitHub starsUsed in 1 repo~1.1k tokens
    Testing & QAAuto-check passed
  • Fal Generate

    nexu-io/open-design

    Generate images and videos using fal.ai AI models. An agent skill from nexu-io/open-design.

    100k GitHub stars~306 tokensUpdated today
    Media & CreativeAuto-check passed
  • Video Generation

    bytedance/deer-flow

    Generates short videos from a structured JSON prompt, optionally guided by a reference image used as the first or last frame.

    83k GitHub starsUsed in 4 repos~1.4k tokens
    Media & CreativeAuto-check passed
  • Generating Synthetic Surrogates

    maziyarpanahi/openmed

    Replace detected PHI with realistic, type-matched fake values in OpenMed so clinical notes stay readable and parseable instead of full of [REDACTED] markers.

    5.5k GitHub stars~1.8k tokensUpdated today
    Legal & ComplianceAuto-check passed
  • Synthetic Eval Data Generator

    ai-evals-course/evals-skills

    Builds diverse synthetic test inputs for LLM pipeline evaluation by defining failure-focused dimensions, drafting tuples with you and turning them into realistic queries.

    1.5k GitHub stars~1.4k tokensUpdated 14 days ago
    AI & LLM EngineeringAuto-check passed
  • Image Generation

    onyx-dot-app/onyx

    Generate or edit raster images (photos, illustrations, textures, sprites, mockups, logos, infographics) using the workspace's configured image-generation provider via onyx-cli image.

    32k GitHub starsUsed in 1 repo~1.7k tokens
    Media & CreativeAuto-check passed

More from NVIDIA/skills

All 380 skills in this repo
  • Official

    A skill your agent uses when the user wants to deploy, run, debug, tear down, or call the REST API of the RTVI-CV 2D detection / tracking microservice.

    3.5k GitHub starsUsed in 1 repo~4.5k tokens
    Auto-check passed
  • Official

    Generates, validates, compares and explains HOLOLINK_def.svh macro files for the HSB IP, using bundled Python scripts and asking before it writes anything.

    3.5k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Official

    Runs and validates an end-to-end Mission Control demo in a locally installed Isaac Sim, with a Nova Carter robot driven through a Python server.

    3.5k GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Orchestrates defect image generation for PCBA, metal surface and glass inspection with NVIDIA Cosmos AnomalyGen on OSMO, from cold-start Day 0 to real-photo Day 1 labeling.

    3.5k GitHub stars~5k tokensUpdated yesterday
    Auto-check: notes
  • Orchestrates video data augmentation and auto-labeling workflows on OSMO, from flow selection and preflight checks to submission, monitoring and output download.

    3.5k GitHub stars~4.7k tokensUpdated yesterday
    Auto-check: notes
  • Official

    Runs NVIDIA TAO Data Services KPI analysis on object detection results, comparing predictions to ground truth and writing per-class precision, recall and AP to a CSV.

    3.5k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check: notes

Questions about Nv Generate Mr Brain

What does Nv Generate Mr Brain do?

Used for generating synthetic T1, T2, FLAIR, SWI, or MRA brain MRI volumes with NV-Generate-CTMR MR-Brain v1. Nv Generate Mr Brain is an agent skill from NVIDIA/skills, published by the product's own GitHub organization. Used for generating synthetic T1, T2, FLAIR, SWI, or MRA brain MRI volumes with NV-Generate-CTMR MR-Brain v1.

How do I install Nv Generate Mr Brain in Claude Code?

Run `npx skills add NVIDIA/skills --skill nv-generate-mr-brain -a claude-code`. Or copy the skill folder (skills/nv-generate-mr-brain in NVIDIA/skills) into .claude/skills/nv-generate-mr-brain in your project. Claude Code loads it when a task matches its description.

How do I install Nv Generate Mr Brain in Codex?

Run `npx skills add NVIDIA/skills --skill nv-generate-mr-brain -a codex`. Or copy the skill folder (skills/nv-generate-mr-brain in NVIDIA/skills) into .agents/skills/nv-generate-mr-brain in your project. Codex loads it when a task matches its description.

Can I use Nv Generate Mr Brain 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 NVIDIA/skills --skill nv-generate-mr-brain -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nv-generate-mr-brain, .gemini/skills/nv-generate-mr-brain, .github/skills/nv-generate-mr-brain and .opencode/skills/nv-generate-mr-brain in your project.

What does Nv Generate Mr Brain need to run?

Going by SKILL.md and its folder, Nv Generate Mr Brain needs Python for the scripts in its folder and the command-line tools its instructions call (python, git and pip). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash, Read, Write, WebFetch, Env.

Does Nv Generate Mr Brain access the network?

SKILL.md names 2 domains. In commands or code: github.com and huggingface.co; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Nv Generate Mr Brain safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Nv Generate Mr Brain use?

Nv Generate Mr Brain is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Nv Generate Mr Brain use?

About 2.6k tokens (SKILL.md is roughly 10k 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 506 tokens, read only when the agent opens those files.

What are the alternatives to Nv Generate Mr Brain?

Skills that share tags, products or a category with Nv Generate Mr Brain: Generate (alirezarezvani/claude-skills, 28k stars), Fal Generate (nexu-io/open-design, 100k stars), Video Generation (bytedance/deer-flow, 83k stars) and Generating Synthetic Surrogates (maziyarpanahi/openmed, 5.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nv Generate Mr Brain?

NVIDIA (a GitHub organization, an official publisher) maintains it in NVIDIA/skills, which has 3,539 GitHub stars. The repository holds 380 skills in this directory. The repository was last updated on October 7, 2026.

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