new-modular-project — Claude Code skill: what it does, how to install
Initializes fresh Mojo or MAX projects using pixi or uv package managers. It clarifies missing project settings and configures stable or nightly release channels.
npx skills add modular/skills --skill new-modular-project -a claude-codeWhat new-modular-project does
The skill parses the user prompt to infer project settings automatically. When details like the project name or runtime manager are missing, it asks for the remaining options in a single multiple-choice step. It configures either pixi or uv. The retired magic CLI is ignored in favor of the current modular CLI.
Mojo requires a working C linker to compile code. On Linux, that means installing gcc, while macOS requires Xcode developer tools. Mojo does not run natively on Windows, so WSL2 is a strict prerequisite there.
The workflow manages stable and nightly channels. MAX defaults to nightly, whereas Mojo defaults to stable. Their release versions do not share identical numbers: stable uses max 26.5 alongside mojo 1.0.0. To prevent kernel build failures when pairing them, the skill installs max-all or max[all].
What it helps with
- scaffold a Mojo or MAX project using pixi
- configure a virtual environment with uv
- set up Modular nightly or stable channels
- align MAX and Mojo package versions via max-all
Example prompts for the agent
- Create a new Mojo project named test-app using pixi
- Initialize a MAX project with uv on the nightly channel
- Start a new Mojo project from scratch
How to install new-modular-project
1Skills CLI (Vercel)
npx skills add modular/skills --skill new-modular-project -a claude-code2Manually: put the files in place
~/.claude/skills/new-modular-project/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/new-modular-project/
1Skills CLI (Vercel)
npx skills add modular/skills --skill new-modular-project -a codex2Manually: put the files in place
.agents/skills/new-modular-project/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add modular/skills --skill new-modular-project -a cursor2Manually: put the files in place
.cursor/skills/new-modular-project/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install modular/skills new-modular-project2Manually: put the files in place
.github/skills/new-modular-project/SKILL.md1Skills CLI (Vercel)
npx skills add modular/skills --skill new-modular-project -a gemini-cli2Platform CLI
gemini skills install https://github.com/modular/skills --path new-modular-projectManually: put the files in place
.devin/skills/new-modular-project/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add modular/skills --skill new-modular-project -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about new-modular-project
How do I install new-modular-project in Claude Code?
Run npx skills add modular/skills --skill new-modular-project -a claude-code in your terminal.
What does new-modular-project do?
It initializes new Mojo or MAX projects using pixi or uv. The skill prompts only for unspecified options and handles stable or nightly package channels.
Can Mojo run natively on Windows?
Mojo does not run natively on Windows. You must set up WSL2 using wsl --install and install gcc inside the Linux environment.
Source text
SKILL.md · Apache-2.0
--- name: new-modular-project description: 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. --- When the user wants to create a new project, first infer as many options as possible from the user's request (for example, "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: - **Project name**: ask if the user hasn't specified one. - **Type of project**: Mojo or MAX (infer from context if the user said "Mojo project" or "MAX project"). - **Environment manager**: `pixi` (recommended) or `uv`. - **uv project type** (only when the environment manager is `uv`): full uv project (`uv init` + `uv add`, recommended) or quick uv environment (`uv venv` + `uv pip install`, lighter weight). - **Channel**: nightly or stable. Default to nightly for MAX projects and stable for Mojo projects, and ask only if the user hasn't implied one. Then follow the appropriate section below (`pixi` or `uv`) to initialize the project and choose `max` or `mojo` as appropriate. Don't pin a version: each channel already resolves to the right one. MAX and Mojo ship together but number their releases differently, so their version strings don't look alike. On the stable channel, `max` is `26.5` while `mojo` is `1.0.0`; on nightly they're `26.6.0.dev*` and `1.1.0.dev*`. That's expected, not a mismatch. > [!NOTE] > Mojo and MAX projects use `pixi`. The `magic` CLI is retired; its > replacement is the `modular` CLI. Don't use or suggest `magic`. --- ## System prerequisites 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 Windows users), then install `gcc` | **Windows users**: Mojo doesn't run natively on Windows. Install [WSL2](https://learn.microsoft.com/en-us/windows/wsl/install) (`wsl --install` in PowerShell), then follow the Linux instructions inside your WSL environment. --- ## Pixi (recommended) Pixi manages Python, Mojo, and other dependencies in a reproducible manner inside a controlled environment. First, determine whether `pixi` is installed. If it isn't available at the command line, install it using the latest instructions at <https://pixi.prefix.dev/latest/#installation>. After installing `pixi`, you may need to add it to the local shell environment. ### Nightly ```bash # 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] ``` ### Stable ```bash # New project pixi init [PROJECT] \ -c https://conda.modular.com/max/ -c conda-forge \ && cd [PROJECT] pixi add [max / mojo] pixi shell # Existing project pixi add [max / mojo] ``` ### Python-using projects If your project uses Python libraries with Mojo: ```bash pixi add python pixi add requests # conda-forge packages pixi add --pypi some-pkg # PyPI-only packages ``` --- ## uv `uv` is a fast and very popular package manager, familiar to developers coming from a Python background. It also works well with Mojo projects. ### Nightly (project) ```bash uv init [PROJECT] && cd [PROJECT] uv add [max / mojo] \ --index https://whl.modular.com/nightly/simple/ \ --prerelease allow ``` ### Stable (project) ```bash uv init [PROJECT] && cd [PROJECT] uv add "max[all]" ``` This resolves from PyPI. The `all` extra pulls in `mojo` and the rest of the MAX stack, so the MAX and Mojo versions always match. ### Nightly (quick environment) ```bash mkdir [PROJECT] && cd [PROJECT] uv venv uv pip install [max / mojo] \ --index https://whl.modular.com/nightly/simple/ \ --prerelease allow ``` ### Stable (quick environment) ```bash mkdir [PROJECT] && cd [PROJECT] uv venv uv pip install "max[all]" ``` When using `uv`, you can use `max` or `mojo` directly by working within the project environment: ```bash source .venv/bin/activate ``` --- ## pip Standard Python package manager. ### Nightly ```bash python3 -m venv .venv && source .venv/bin/activate pip install --pre [max / mojo] \ --extra-index-url https://whl.modular.com/nightly/simple/ ``` Use `--extra-index-url`, not `--index-url`. The latter replaces PyPI, and the nightly index doesn't carry third-party dependencies like `numpy`, so `pip` backtracks through every `max` version instead of reporting a clear error. ### Stable ```bash python3 -m venv .venv && source .venv/bin/activate pip install "max[all]" ``` As with `uv`, the `all` extra installs `mojo` as well, so the MAX and Mojo versions always match. --- ## Conda For `conda` and `mamba` users. ### Nightly ```bash conda install -c conda-forge \ -c https://conda.modular.com/max-nightly/ [max / mojo] ``` ### Stable ```bash conda install -c conda-forge \ -c https://conda.modular.com/max/ [max / mojo] ``` --- ## Version alignment with MAX If using MAX with custom Mojo kernels, both must come from the same channel. Don't compare their version numbers: MAX and Mojo number releases differently, so a matching pair looks mismatched (stable is `max` `26.5` with `mojo` `1.0.0`). ```bash # Check that both came from the same channel pixi list | grep -E "^(max|mojo)\b" ``` Or, instead install `max[all]` (with pip/uv) or `max-all` (with conda/pixi): ```bash uv add "max[all]" ``` ```bash pixi add max-all ``` Installing `max` with "all" optional dependencies instead of installing `max` and `mojo` separately will ensure that the `max` and `mojo` versions always match. Mixing versions between the two causes kernel compilation failures. --- ## References - [Mojo Installation Guide](https://mojolang.org/install) - [Mojo Stable Docs](https://mojolang.org/docs/) - [Mojo Nightly Docs](https://mojolang.org/nightly/docs/)
© modular · Apache-2.0 · modular/skills