← ClaudeAtlas

coding-mojolisted

Develop and run Mojo code in Claude.ai containers. Handles installation, compilation, and execution. Use when writing Mojo code, benchmarking Mojo vs Python, or when user mentions Mojo, Modular, or MAX. Routes to Modular's official skills (mojo-syntax, mojo-python-interop, mojo-gpu-fundamentals) for language-specific correction layers.
oaustegard/claude-skills · ★ 124 · Code & Development · score 84
Install: claude install-skill oaustegard/claude-skills
# Mojo Development in Claude.ai Containers Mojo is a systems programming language from Modular that combines Python-like syntax with C-level performance. This skill handles container setup and execution. For **language syntax and semantics**, defer to Modular's official skills at `github.com/modular/skills` — they are authoritative correction layers for pretrained knowledge. ## Installation Install once per session (~20s via uv, ~500MB). Skip if already installed. ```bash if mojo --version 2>/dev/null; then echo "Mojo already installed" else # Compiler binary without ML extras (~350MB saved) uv pip install --system --break-system-packages modular --no-deps 2>&1 | tail -5 # Entry points + base deps (numpy, pyyaml, rich) uv pip install --system --break-system-packages mojo max 2>&1 | tail -5 mojo --version fi ``` Verify: ```bash echo 'def main(): print("Mojo ready")' > /tmp/_verify.mojo && mojo /tmp/_verify.mojo ``` ## Running Mojo Code **Quick tests** (write to temp file): ```bash cat > /tmp/test.mojo << 'EOF' def main(): print("hello") EOF mojo /tmp/test.mojo ``` **File execution** (JIT compile + run, ~1.4s overhead): ```bash cat > /home/claude/example.mojo << 'EOF' def main(): print("Hello from Mojo") EOF mojo /home/claude/example.mojo ``` **Build binary** (for benchmarking — ~6s cold compile, but binary runs at native speed): ```bash mojo build /home/claude/example.mojo -o /home/claude/example /home/claude/example ``` Use `mojo build` for bench