Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rust-idioms

БесплатноБез исполняемых скриптовНе проверен

Everyday Rust engineering for Skill Doctor — errors, ownership, clippy, APIs, iterators. Use when writing or reviewing Rust that is not specifically about…

KalarisLabsот KalarisLabs★ 16 звёзд на GitHub

Об этом скилле

Rust idioms

Errors

  • Libraries: thiserror enums. No unwrap / expect on recoverable paths.
  • Binary: anyhow at main only. Map to exit codes in one place.
  • Do not panic in L1 because a skill file is malformed. Malformed input is a finding or a skipped file with coverage reduced.

Ownership

  • Hot path: borrow (&[u8], &str, &Path). Own only when storing in a Finding.
  • Do not clone() to satisfy the borrow checker if a lifetime or Arc would do. Clippy clone_on_copy / needless clones must stay clean.
  • PathBuf walks: collect sorted Vec<PathBuf> once, then iterate. Do not read_dir twice.

APIs

  • Public core API is small: scan_bundle(&[u8] | &Path) -> Result<Report>.
  • Rule IDs and SD class IDs are &'static str or newtypes, not free-form String invented at runtime.
  • Prefer enum Severity { Low, Medium, High, Critical } over strings.

Clippy / fmt

  • cargo fmt --all is not optional.
  • clippy --all-targets -- -D warnings is the style guide. Do not fight clippy with #[allow] unless the allow cites an invariant.
  • unsafe is not an idiom. Load unsafe-sandbox instead.

Concurrency

  • L1 fan-out: rayon. No tokio in core.
  • MCP / optional L4: tokio.
  • Shared state: std::sync / arc_swap / OnceLock. Do not add a new runtime.

Установить rust-idioms в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл rust-idioms?

Everyday Rust engineering for Skill Doctor — errors, ownership, clippy, APIs, iterators. Use when writing or reviewing Rust that is not specifically about perf, unsafe, or YARA.

Как установить скилл rust-idioms?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rust-idioms запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rust-idioms с