.agents/skills/new-modular-project/SKILL.md
Creates a new Mojo or MAX project. Use when wanting to start a new Mojo or MAX project, initializing the Pixi or UV environment to use Mojo or MAX, or when the user wants to begin a new Mojo or MAX project from scratch.
npx skillsauth add Hundo1018/wgpu-mojo new-modular-projectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When the user wants to create a new project, first infer as many options as possible from the user's request (e.g., "new Mojo project" means type=Mojo, "called foo" means name=foo). Then use a structured multiple-choice prompt (not plain text) to gather only the remaining unspecified options in a single interaction. Do NOT ask about options the user has already provided or implied. The options to determine are:
uv init + uv add,
recommended) or quick uv environment (uv venv + uv pip install, lighter
weight)Then follow the appropriate section below (Pixi or uv) to initialize the
project and choose max or mojo as appropriate. For stable versions in the
below examples, mojo will start with a 0. prefix (0.26.1.0.0.0) where max
packages will not (26.1.0.0.0).
NOTE: Do not look for or use magic for Mojo or MAX projects, it is no longer
supported. Pixi has fully replaced its capabilities.
Mojo requires a C linker for compilation. Install one if not already present:
| OS | Command |
|---------------|----------------------------------------------------------|
| Ubuntu/Debian | sudo apt install gcc |
| Fedora/RHEL | sudo dnf install gcc |
| macOS | xcode-select --install |
| Windows | Install WSL2 first (see below), then install gcc in WSL |
Windows users: Mojo does not run natively on Windows.
Install WSL2
(wsl --install in PowerShell), then follow the Linux instructions
inside your WSL environment.
Pixi manages Python, Mojo, and other dependencies in a reproducible manner inside a controlled environment.
First, determine if pixi is installed. If it is not available for use at the
command line, install it using the latest instructions found on
https://pixi.prefix.dev/latest/#installation
You may need to place the pixi tool in the local shell environment after
installation if it had not already been installed.
# New project
pixi init [PROJECT] \
-c https://conda.modular.com/max-nightly/ -c conda-forge \
&& cd [PROJECT]
pixi add [max / mojo]
pixi shell
# Existing project - add to pixi.toml channels first:
# [workspace]
# channels = ["https://conda.modular.com/max-nightly/", "conda-forge"]
pixi add [max / mojo]
# New project
pixi init [PROJECT] \
-c https://conda.modular.com/max/ -c conda-forge \
&& cd [PROJECT]
pixi add "[max / mojo]==0.26.1.0.0.0"
pixi shell
# Existing project
pixi add "[max / mojo]==0.26.1.0.0.0"
If your project uses Python libraries with Mojo:
pixi add python
pixi add requests # conda-forge packages
pixi add --pypi some-pkg # PyPI-only packages
uv is a fast and very popular package manager, familiar to developers coming from a Python background. It also works well with Mojo projects.
uv init [PROJECT] && cd [PROJECT]
uv add [max / mojo] \
--index https://whl.modular.com/nightly/simple/ \
--prerelease allow
uv init [PROJECT] && cd [PROJECT]
uv add [max / mojo] \
--extra-index-url https://modular.gateway.scarf.sh/simple/
mkdir [PROJECT] && cd [PROJECT]
uv venv
uv pip install [max / mojo] \
--index https://whl.modular.com/nightly/simple/ \
--prerelease allow
mkdir [PROJECT] && cd [PROJECT]
uv venv
uv pip install [max / mojo] \
--extra-index-url https://modular.gateway.scarf.sh/simple/
When using uv, you can use max or mojo directly by working within the
project environment:
source .venv/bin/activate
Standard Python package manager.
python3 -m venv .venv && source .venv/bin/activate
pip install --pre [max / mojo] \
--index https://whl.modular.com/nightly/simple/
python3 -m venv .venv && source .venv/bin/activate
pip install [max / mojo] \
--extra-index-url https://modular.gateway.scarf.sh/simple/
For conda/mamba users.
conda install -c conda-forge \
-c https://conda.modular.com/max-nightly/ [max / mojo]
conda install -c conda-forge \
-c https://conda.modular.com/max/ "[max / mojo]==0.26.1.0.0.0"
If using MAX with custom Mojo kernels, versions must match:
# Check alignment
uv pip show mojo | grep Version # e.g., 0.26.2
pixi run mojo --version # Must match major.minor (e.g., 0.26.2)
Mismatched versions cause kernel compilation failures. Always use the same channel (stable or nightly) for both.
development
Help to write Mojo code using current syntax and conventions. Always use this skill when writing any Mojo code, including when other Mojo-specific skills (e.g., mojo-gpu-fundamentals) also apply. Use when writing Mojo code, translating projects to Mojo, or otherwise generating Mojo. Use this skill to overcome misconceptions with how Mojo is written.
tools
Aids in writing Mojo code that interoperates with Python using current syntax and conventions. Use this skill in addition to mojo-syntax when writing Mojo code that interacts with Python, calls Python libraries from Mojo, or exposes Mojo types/functions to Python. Also use when the user wants to build Python extension modules in Mojo, wrap Mojo structs for Python consumption, or convert between Python and Mojo types.
development
The basics of how to program GPUs using Mojo. Use this skill in addition to mojo-syntax when writing Mojo code that targets GPUs or other accelerators. Use targeting code to NVIDIA, AMD, Apple silicon GPUs, or others. Use this skill to overcome misconceptions about how Mojo GPU code is written.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.