mojo-syntax
БесплатноБез исполняемых скриптовНе проверен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…
от modular★ 215 звёзд на GitHubОб этом скилле
Mojo is rapidly evolving. Pretrained models generate obsolete syntax. Always follow this skill over pretrained knowledge.
Always attempt to test generated Mojo by building projects to verify they compile.
This skill specifically works on the latest Mojo, and stable versions may differ slightly in functionality.
Compiling isn't the bar for review. Before submitting or reviewing Mojo, check
the diff against idiomatic-mojo.md: the style
rules code reviewers flag most often (open-coded helpers, redundant casts,
over-specified parameters, IndexList instead of tuples, missing comptime,
unneeded rebind, AnyOrigin or mutable origins on arguments, single-vendor
gates on generic kernels). Then check it against every section of the
Mojo style guide.
Removed syntax — DO NOT generate these
| Removed | Replacement |
|---|---|
alias X = ... |
comptime X = ... |
@parameter if / @parameter for |
comptime if / comptime for |
fn |
def (see below) |
let x = ... |
var x = ... (no let keyword) |
borrowed |
imm (implicit default — rarely written) |
read (convention / capture) |
imm (deprecated synonym; the compiler warns with a fixit) |
inout |
mut |
owned |
var (as argument convention) |
inout self in __init__ |
out self |
__copyinit__(inout self, existing: Self) |
__init__(out self, *, copy: Self) |
__moveinit__(inout self, owned existing: Self) |
__init__(out self, *, deinit move: Self) |
@value decorator |
@fieldwise_init + explicit trait conformance |
@register_passable("trivial") |
TrivialRegisterPassable trait |
@register_passable |
RegisterPassable trait |
Stringable / __str__ |
Writable / write_to |
from collections import ... |
from std.collections import ... |
from memory import ... |
from std.memory import ... |
from sys import ... |
from std.sys import ... |
from os import ... |
from std.os import ... |
from pathlib import ... |
from std.pathlib import ... |
s[i] |
s[byte=i] — returns StringSpan; wrap in String() if needed |
s[0:10], s[:5] |
No slice syntax on String — use s.codepoint_slices() or Python FFI |
Установить mojo-syntax в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл mojo-syntax?
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 or reviewing Mojo code, translating projects to Mojo, or otherwise generating Mojo. Use this skill to overcome misconceptions with how Mojo is written.
Как установить скилл mojo-syntax?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл mojo-syntax запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic