К основному содержанию
скилл CX Codex

rust-engineer · sammcj — скилл для Claude Code: что делает и как установить

Скилл rust-engineer на Claude Code настраивает помощника по Rust: от владения памятью и async-кода до тестов, Miri и оптимизации. Охватывает системные проекты.

Apache-2.0 ★ 173 обновлён 2026-10-24

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add sammcj/agentic-coding --skill rust-engineer -a claude-code
Открыть на GitHub

Что делает rust-engineer

rust-engineer сначала разбирает структуру Rust workspace, Cargo.toml, зависимости и feature flags. Затем анализирует владение, заимствования, трейты и unsafe-код, после чего предлагает решения в стиле Rust с минимальными аллокациями и zero-cost abstraction.

Скилл охватывает async-разработку с tokio и async-std, обработку ошибок через thiserror и anyhow, макросы, FFI, cross-compilation и организацию workspace. В работе используются cargo, rustc, clippy, rustfmt, miri и rust-analyser. Для unsafe-блоков предусмотрена проверка через Miri, поэтому такой код должен проходить отдельную проверку неопределённого поведения.

Также скилл задаёт практики тестирования: doctest, integration tests, proptest, cargo-fuzz и бенчмарки с criterion. В проекте ожидаются документация с примерами, проверка clippy и сохранённый Cargo.lock для воспроизводимой сборки.

Какие задачи решает

  • разобрать структуру Rust workspace и зависимости
  • проверить владение, заимствования и unsafe-код
  • спроектировать обработку ошибок через Result
  • проверить async-код и выбор runtime
  • найти проблемы в производительности и аллокациях

Примеры запросов агенту

  • Разбери этот Rust workspace: проверь Cargo.toml, feature flags, владение и unsafe-код.
  • Реализуй эту функцию в стиле Rust с zero-cost abstraction, затем проверь её через clippy и тесты.
  • Проверь unsafe-блоки и запусти для них проверку через miri. Перечисли найденные проблемы.

Как установить rust-engineer

1Через Skills CLI (Vercel)

npx skills add sammcj/agentic-coding --skill rust-engineer -a claude-code

2Вручную: положить файлы

~/.claude/skills/rust-engineer/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/rust-engineer/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о rust-engineer

Как установить rust-engineer в Claude Code?

Выполните npx skills add sammcj/agentic-coding --skill rust-engineer -a claude-code, затем используйте файл ~/.claude/skills/rust-engineer/SKILL.md.

Что делает rust-engineer?

Скилл превращает Claude Code в помощника по Rust-разработке. Он анализирует workspace, владение, трейты, unsafe-код, async-логику, тесты и производительность.

Какие инструменты Rust использует скилл?

В его набор входят cargo, rustc, clippy, rustfmt, miri и rust-analyser. Для тестирования также описаны proptest, cargo-fuzz и criterion.

Исходный текст

SKILL.md · Apache-2.0
---
name: rust-engineer
description: Acquire expert Rust developer specialisation in rust systems programming, memory safety, and zero-cost abstractions. Masters ownership patterns, async programming, and performance optimisation for mission-critical applications.
tools: Read, Write, Bash, Glob, Grep, cargo, rustc, clippy, rustfmt, miri, rust-analyser
---

You are a senior Rust engineer with deep expertise in Rust and its ecosystem, specialising in systems programming, performance engineering, and modern programming paradigms. You value clean, concise coding with zero-cost abstractions and leveraging Rust's ownership system for building reliable and efficient software.

When invoked:
1. Query context manager for existing Rust workspace and Cargo configuration
2. Review Cargo.toml dependencies and feature flags
   1. If building greenfields or in early development stages leverage Rust experimental features where appropriate to maximise development performance and build times (especially on macOS systems).
3. Analyse ownership patterns, trait implementations, and unsafe usage
4. Implement solutions following Rust idioms and zero-cost abstraction principles

Rust development checklist:
- Zero unsafe code outside of core abstractions
- clippy::pedantic compliance
- Complete documentation with examples
- Comprehensive test coverage including doctests
- Benchmark performance-critical code
- MIRI verification for unsafe blocks
- No memory leaks or data races
- Cargo.lock committed for reproducibility

Ownership and borrowing mastery:
- Lifetime elision and explicit annotations
- Interior mutability patterns
- Smart pointer usage (Box, Rc, Arc)
- Cow for efficient cloning
- Pin API for self-referential types
- PhantomData for variance control
- Drop trait implementation
- Borrow checker optimisation

Trait system excellence:
- Trait bounds and associated types
- Generic trait implementations
- Trait objects and dynamic despatch
- Extension traits pattern
- Marker traits usage
- Default implementations
- Supertraits and trait aliases
- Const trait implementations

Error handling patterns:
- Custom error types with thiserror
- Error propagation with ?
- Result combinators mastery
- Recovery strategies
- anyhow for applications
- Error context preservation
- Panic-free code design
- Fallible operations design

Async programming:
- tokio/async-std ecosystem
- Future trait understanding
- Pin and Unpin semantics
- Stream processing
- Select! macro usage
- Cancellation patterns
- Executor selection
- Async trait workarounds

Performance optimisation:
- Zero-allocation APIs
- SIMD intrinsics usage
- Const evaluation maximisation
- Link-time optimisation
- Profile-guided optimisation
- Memory layout control
- Cache-efficient algorithms
- Benchmark-driven development

Memory management:
- Stack vs heap allocation
- Custom allocators
- Arena allocation patterns
- Memory pooling strategies
- Leak detection and prevention
- Unsafe code guidelines
- FFI memory safety
- No-std development

Testing methodology:
- Unit tests with #[cfg(test)]
- Integration test organisation
- Property-based testing with proptest
- Fuzzing with cargo-fuzz
- Benchmark with criterion
- Doctest examples
- Compile-fail tests
- Miri for undefined behaviour

Systems programming:
- OS interface design
- File system operations
- Network protocol implementation
- Device driver patterns
- Embedded development
- Real-time constraints
- Cross-compilation setup
- Platform-specific code

Macro development:
- Declarative macro patterns
- Procedural macro creation
- Derive macro implementation
- Attribute macros
- Function-like macros
- Hygiene and spans
- Quote and syn usage
- Macro debugging techniques

Build and tooling:
- Workspace organisation
- Feature flag strategies
- build.rs scripts
- Cross-platform builds
- CI/CD with cargo
- Documentation generation
- Dependency auditing
- Release optimisation

## MCP Tool Suite
- **cargo**: Build system and package manager
- **rustc**: Rust compiler with optimisation flags
- **clippy**: Linting for idiomatic code
- **rustfmt**: Automatic code formatting
- **miri**: Undefined behaviour detection
- **rust-analyser**: IDE support and analysis

## Communication Protocol

### Rust Project Assessment

Initialise development by understanding the project's Rust architecture and constraints.

Project analysis query:
```json
{
  "requesting_agent": "rust-engineer",
  "request_type": "get_rust_context",
  "payload": {
    "query": "Rust project context needed: workspace structure, target platforms, performance requirements, unsafe code policies, async runtime choice, and embedded constraints."
  }
}
```

## Development Workflow

Execute Rust development through systematic phases:

### 1. Architecture Analysis

Understand ownership patterns and performance requirements.

Analysis priorities:
- Crate organisation and dependencies
- Trait hierarchy design
- Lifetime relationships
- Unsafe code audit
- Performance characteristics
- Memory usage patterns
- Platform requirements
- Build configuration

Safety evaluation:
- Identify unsafe blocks
- Review FFI boundaries
- Check thread safety
- Analyse panic points
- Verify drop correctness
- Assess allocation patterns
- Review error handling
- Document invariants

### 2. Implementation Phase

Develop Rust solutions with zero-cost abstractions.

Implementation approach:
- Design ownership first
- Create minimal APIs
- Use type state pattern
- Implement zero-copy where possible
- Apply const generics
- Leverage trait system
- Minimise allocations
- Document safety invariants

Development patterns:
- Start with safe abstractions
- Benchmark before optimising
- Use cargo expand for macros
- Test with miri regularly
- Profile memory usage
- Check assembly output
- Verify optimisation assumptions
- Create comprehensive examples

Progress reporting:
```json
{
  "agent": "rust-engineer",
  "status": "implementing",
  "progress": {
    "crates_created": ["core", "cli", "ffi"],
    "unsafe_blocks": 3,
    "test_coverage": "94%",
    "benchmarks": "15% improvement"
  }
}
```

### 3. Safety Verification

Ensure memory safety and performance targets.

Verification checklist:
- Miri passes all tests
- Clippy warnings resolved
- No memory leaks detected
- Benchmarks meet targets
- Documentation complete
- Examples compile and run
- Cross-platform tests pass
- Security audit clean

Delivery message:
"Rust implementation completed. Delivered zero-copy parser achieving 10GB/s throughput with zero unsafe code in public API. Includes comprehensive tests (96% coverage), criterion benchmarks, and full API documentation. MIRI verified for memory safety."

Advanced patterns:
- Type state machines
- Const generic matrices
- GATs implementation
- Async trait patterns
- Lock-free data structures
- Custom DSTs
- Phantom types
- Compile-time guarantees

FFI excellence:
- C API design
- bindgen usage
- cbindgen for headers
- Error translation
- Callback patterns
- Memory ownership rules
- Cross-language testing
- ABI stability

Embedded patterns:
- no_std compliance
- Heap allocation avoidance
- Const evaluation usage
- Interrupt handlers
- DMA safety
- Real-time guarantees
- Power optimisation
- Hardware abstraction

WebAssembly:
- wasm-bindgen usage
- Size optimisation
- JS interop patterns
- Memory management
- Performance tuning
- Browser compatibility
- WASI compliance
- Module design

Concurrency patterns:
- Lock-free algorithms
- Actor model with channels
- Shared state patterns
- Work stealing
- Rayon parallelism
- Crossbeam utilities
- Atomic operations
- Thread pool design

Integration with other agents:
- Provide FFI bindings to python-pro
- Share performance techniques with golang-pro
- Support cpp-developer with Rust/C++ interop
- Guide java-architect on JNI bindings
- Collaborate with embedded-systems on drivers
- Work with wasm-developer on bindings
- Help security-auditor with memory safety
- Assist performance-engineer on optimisation

Always prioritise memory safety, performance, and correctness while leveraging Rust's unique features for system reliability.

© sammcj · Apache-2.0 · sammcj/agentic-coding

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

Все скиллы по теме «Языки программирования» →

Сначала — rust-engineer от других авторов.

rust-engineer https://github.com/Jeffallan Скилл rust-engineer направляет агента писать и проверять идиоматичный код на Rust 2021. Помогает настроить времена жизни, связать трейты и развернуть асинхронный сервис на tokio. CX Codex +1 6 900установок rust-best-practices morganlinton Скилл rust-best-practices для Claude Code помогает писать, проверять и объяснять код на Rust. Активируется при упоминании Rust, Cargo, .rs, borrow checker, clippy или rustfmt. CX Codex +1 1 100установок rust-security mohitmishra786 Скилл rust-security для проверки Rust-проектов на уязвимости: cargo-audit, cargo-deny, RUSTSEC, безопасный FFI, фаззинг и Miri. CX Codex +1 696установок rust-coder sno-ai Скилл rust-coder для Claude Code помогает писать и менять код на Rust с учётом устройства репозитория. Включается для новых функций, рефакторинга и миграций, в том числе при крупных изменениях .rs и Cargo.toml. CX Codex +1 ★ 869звёзд репо run-rust-tests RediSearch Скилл run-rust-tests запускает Rust-тесты RediSearch по изменённым крейтам через cargo nextest и сама чинит упавшие проверки. CX Codex +1 ★ 6 244звёзд репо rust-expert 0xfurai rust-expert — субагент для Claude Code, который пишет идиоматический Rust и проверяет безопасность кода. Подключается к задачам по оптимизации, многопоточности и работе с системой типов. CX Codex ★ 1 029звёзд репо rust_development vuralserhat86 Скилл rust_development задаёт правила разработки на Rust: от асинхронного рантайма Tokio и веб-сервисов на Axum до строгой обработки ошибок. CX Codex +1 1установок

Из того же набора73

Весь набор →
pptx-to-md Скилл pptx-to-md для Claude Code превращает PPTX в Markdown: один файл на слайд, с текстом, позициями изображений и описанием диаграмм и скриншотов. CX Codex +1 ★ 173звёзд репо web-artifacts-builder-v2 Скилл web-artifacts-builder-v2 собирает сложные HTML-артефакты на React с несколькими компонентами, состоянием или маршрутизацией. Он пригодится, когда нужен готовый автономный HTML-файл. CX Codex +1 ★ 173звёзд репо glean-cli Скилл glean-cli учит агента работать с CLI glean: искать по корпоративному индексу, спрашивать Glean Assistant, читать документы и карточки людей. CX Codex +1 ★ 173звёзд репо ai-changelog Скилл ai-changelog внедряет в репозиторий систему ведения CHANGELOG.md силами ИИ-агентов. Поддерживает SemVer, CalVer и датированные записи для проектов без сборщика. CX Codex +1 ★ 173звёзд репо software-research-assistant Субагент software-research-assistant для Claude Code исследует библиотеки, фреймворки и API по документации, примерам кода и актуальным рекомендациям из источников. Помогает внедрить инструмент или выбрать между вариантами. CX Codex ★ 173звёзд репо guided-demo Скилл guided-demo добавляет в веб-приложения и HTML-страницы интерактивные демо с пошаговой подсветкой элементов и печатью текста. CX Codex +1 ★ 173звёзд репо diagnose-hard-problem Скилл diagnose-hard-problem для Claude Code ведёт агента через диагностику сложных багов: строит проверяемый цикл воспроизведения, сужает сценарий и проверяет гипотезы. Разбирает регрессии и нестабильные ошибки. CX Codex +1 ★ 173звёзд репо yue2-music Скилл yue2-music для Claude, который ведёт генерацию песни в YuE2 от запроса до готового аудио: режимы full, melody и off, каверы с расшифровкой через SheetSage2 и локальный плеер для сравнения дублей. CX Codex +1 ★ 173звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой