rust-coder — скилл для Claude Code: Rust и установка
Скилл rust-coder для Claude Code помогает писать и менять код на Rust с учётом устройства репозитория. Включается для новых функций, рефакторинга и миграций, в том числе при крупных изменениях .rs и Cargo.toml.
Apache-2.0 ★ 869 обновлён 2026-11-16
npx skills add sno-ai/sno-station-skills --skill rust-coder -a claude-codeЧто делает rust-coder
rust-coder изучает инструкции проекта, файлы Cargo, целевой код, его вызывающие модули и тесты, затем вносит согласованные изменения и запускает проверки. Сначала он читает references/standards.md и сверяет работу с локальными правилами, контрактами API, владением, ошибками и ограничениями платформы.
Скилл предлагает менять код небольшими связанными порциями, повторно использовать существующие типы и зависимости и не добавлять unsafe без необходимости задачи. После правок он проверяет diff и запускает команды проекта; если локальных правил проверки нет, использует cargo fmt --all --check, cargo check, cargo test и Clippy. Для работы нужны доступ к чтению и редактированию файлов и выполнение команд в shell. После трёх неудачных раундов исправлений он прекращает расширять изменения и сообщает о блокере.
Какие задачи решает
- добавить функцию в Rust-крейте
- перестроить типы и обработку ошибок при рефакторинге
- перенести Rust-код с учётом контракта API
- проверить изменения командами Cargo и Clippy
Примеры запросов агенту
- Добавь в этот крейт обработку нового состояния и проверь её тестами.
- Переработай этот модуль Rust, сохранив публичный контракт.
- Перенеси эту функцию на новые типы и запусти проверки проекта.
Как установить rust-coder
1Через Skills CLI (Vercel)
npx skills add sno-ai/sno-station-skills --skill rust-coder -a claude-code2Вручную: положить файлы
~/.claude/skills/rust-coder/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/rust-coder/
1Через Skills CLI (Vercel)
npx skills add sno-ai/sno-station-skills --skill rust-coder -a codex2Вручную: положить файлы
.agents/skills/rust-coder/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add sno-ai/sno-station-skills --skill rust-coder -a cursor2Вручную: положить файлы
.cursor/skills/rust-coder/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install sno-ai/sno-station-skills plugins/sno-station-standalone/skills/rust-coder2Вручную: положить файлы
.github/skills/rust-coder/SKILL.md1Через Skills CLI (Vercel)
npx skills add sno-ai/sno-station-skills --skill rust-coder -a gemini-cli2Командой платформы
gemini skills install https://github.com/sno-ai/sno-station-skills --path plugins/sno-station-standalone/skills/rust-coderВручную: положить файлы
.devin/skills/rust-coder/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add sno-ai/sno-station-skills --skill rust-coder -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о rust-coder
Как установить rust-coder в Claude Code?
Запусти npx skills add sno-ai/sno-station-skills --skill rust-coder -a claude-code. Файл скилла появится по пути ~/.claude/skills/rust-coder/SKILL.md.
Что делает rust-coder?
Он изучает структуру Rust-проекта, вносит изменения в код и проверяет их командами, принятыми в репозитории. Скилл охватывает функции, библиотеки, CLI, сервисы, асинхронный код, FFI и миграции.
Какие инструменты нужны rust-coder?
Нужны средства чтения и редактирования файлов, а также shell для выполнения команд проекта. Для проверки используются Cargo и Clippy, если они входят в локальный набор команд.
Исходный текст
SKILL.md · Apache-2.0
---
name: rust-coder
description: "Implement, refactor, and migrate production Rust with repository-grounded ownership, type-driven invariants, explicit errors, safe concurrency, minimal unsafe code, and verified Cargo workflows. Use for Rust features, crates, CLIs, services, libraries, async code, FFI, performance work, migrations, or substantial .rs and Cargo.toml changes, including requests such as 'rust-coder', 'write Rust', or 'implement this Rust feature with Codex'."
requires:
programs: []
harness:
- {slot: 4.shell, need: required}
- {slot: 4.file-read-write, need: required}
---
# Rust Coder
Implement directly in the current Codex session. Do not launch another Codex process.
Read [references/standards.md](references/standards.md) completely before editing. Repository instructions and the declared toolchain override generic preferences.
## Inspect
Read the smallest complete set of evidence:
- Nearest `AGENTS.md`, `CLAUDE.md`, and repository instructions.
- Root and target `Cargo.toml`, `Cargo.lock`, `rust-toolchain*`, Cargo configuration, lint and format configuration, features, targets, and continuous-integration commands.
- Every target file in full, its parent exports, immediate callers, traits, types, errors, feature gates, platform boundaries, focused tests, and one or two tested sibling modules.
- The exact format, check, test, Clippy, feature, and target commands used by the crate.
Determine the edit mode, crate kind, toolchain and minimum Rust version, public contract, ownership, resource lifecycle, error model, concurrency and cancellation, safety boundary, and invariants. Default to a hard cut; preserve compatibility only when an explicitly confirmed published contract requires it.
Ask only when an unresolved fact could change public behavior, durable state, safety, or migration semantics. Otherwise make repository-grounded assumptions and continue.
## Design and implement
Resolve the change in this order:
1. Domain invariants and invalid states.
2. Ownership, borrowing boundaries, and resource lifetimes.
3. Types, state transitions, public API, and errors.
4. Concurrency, cancellation, and platform boundaries when relevant.
5. Implementation mechanics and measured optimization.
Work directly with the available read and edit tools. Make the smallest coherent change and preserve unrelated work. Reuse existing crates, types, traits, errors, runtime, and helpers. Do not add dependencies, features, configuration, compatibility paths, `unsafe`, smart pointers, clones, lint suppressions, or abstractions merely to satisfy the compiler.
Treat borrow-checker and trait errors as design feedback. Keep checking and revising until the observable success criteria pass.
## Verify
1. Review the diff; every changed line must trace to the request.
2. Run the repository's exact commands. Without stronger local commands, use focused equivalents of `cargo fmt --all --check`, `cargo check`, `cargo test`, and `cargo clippy --all-targets --all-features -- -D warnings`.
3. Exercise every changed public feature combination and target that local tooling can validate.
4. Search changed production Rust for unexplained `clone`, `Arc`, `Rc`, `Box`, interior mutability, `unwrap`, `expect`, panics, placeholders, `unsafe`, and lint suppressions.
5. Add documentation, compile-fail, property, concurrency, Miri, package, or consumer checks only when the changed contract makes them relevant.
If a check fails, fix the exact observed failure and rerun it. Stop after three failed correction rounds and report the blocker instead of widening scope, cloning around ownership, adding unsafe code, or weakening validation.
## Report
Lead with the outcome. Name changed files, consequential assumptions, ownership/type/error decisions, compatibility decisions, and every command actually run with its result.
© sno-ai · Apache-2.0 · sno-ai/sno-station-skills