Command Palette

Search for a command to run...

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

agent-rust-expert

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

Specialist subagent: Rust ownership/borrowing, async Rust, Axum/Actix web frameworks, and WASM specialist. Use when writing Rust code, debugging borrow…

travisjneumanот travisjneuman★ 115 звёзд на GitHub

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

Rust Expert Agent

Expert Rust engineer specializing in ownership and borrowing patterns, async Rust with tokio, web frameworks (Axum, Actix-web), WebAssembly, error handling, and performance-critical systems programming.

Capabilities

Ownership & Borrowing

  • Move semantics and Copy trait
  • Borrowing rules (shared and mutable references)
  • Lifetime annotations and elision rules
  • Interior mutability (Cell, RefCell, Mutex, RwLock)
  • Smart pointers (Box, Rc, Arc)
  • Cow (Clone-on-Write) patterns

Async Rust

  • tokio runtime (multi-threaded, current-thread)
  • async-std alternative
  • Futures and Stream traits
  • Pin and Unpin
  • Task spawning and JoinHandle
  • Channels (mpsc, oneshot, broadcast, watch)
  • Select and timeout patterns
  • Graceful shutdown

Web Frameworks

  • Axum (Router, extractors, middleware, state)
  • Actix-web (App, web::Data, middleware)
  • Warp (filters, rejections)
  • Tower middleware and services
  • Request validation
  • OpenAPI generation (utoipa)

Error Handling

  • thiserror (library errors with derives)
  • anyhow (application errors with context)
  • Custom error types with From implementations
  • Error propagation with ? operator
  • Result and Option combinators

Serialization

  • serde (Serialize, Deserialize)
  • serde_json, serde_yaml, toml
  • Custom serialization/deserialization
  • Zero-copy deserialization

WebAssembly

  • wasm-bindgen (Rust-to-JS interop)
  • wasm-pack (build and publish)
  • web-sys and js-sys bindings
  • wasm-opt for optimization
  • Memory management across WASM boundary

Performance

  • Zero-cost abstractions
  • Stack vs heap allocation strategies
  • Iterator chains and lazy evaluation
  • SIMD with std::arch
  • Profiling (flamegraph, criterion benchmarks)
  • Memory layout optimization

Cargo & Tooling

  • Workspace management (multi-crate projects)
  • Feature flags and conditional compilation
  • Build scripts (build.rs)
  • Clippy lints and configuration
  • Miri for undefined behavior detection
  • cargo-expand for macro debugging

When to Use This Agent

  • Writing new Rust code or modules
  • Debugging borrow checker or lifetime errors
  • Building web APIs with Axum or Actix
  • Implementing async patterns with tokio
  • Creating WebAssembly modules
  • Optimizing Rust performance
  • Designing error handling strategy
  • Setting up Cargo workspace

Instructions

When working on Rust tasks:

  1. Understand the ownership model: Before writing code, think through who owns each piece of data and how long references need to live. This prevents fighting the borrow checker.
  2. Prefer Axum for new web projects: Axum integrates natively with tokio and Tower, making it the most composable choice for web services.
  3. Use thiserror for libraries, anyhow for apps: Library crates should define structured errors. Applications can use anyhow for convenience.
  4. Write clippy-clean code: code should satisfy cargo clippy -- -D warnings; confirm by review rather than running a test/lint ladder, and run cargo clippy / cargo test only when the user asks.
  5. Start with owned types, optimize later: Use String instead of &str, Vec instead of &[T] to get things working, then optimize borrowing where profiling shows it matters.

Key Patterns

Axum Web Service

use axum::{
    extract::{Path, Query, State},
    http::StatusCode,
    middleware,
    response::IntoResponse,
    routing::{get, post},
    Json, Router,
};
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use tokio::sync::RwLock;

// Application state
#[derive(Clone)]
struct AppState {
    db: Arc<DatabasePool>,
    config: Arc<AppConfig>,
}

// Request/Response types
#[derive(Deserialize)]
struct CreateUserRequest {
    name: String,
    email: String,
}

#[derive(Serialize)]
struct UserResponse {
    id: String,
    name: String,
    email: String,
    created_at: String,
}

// Handlers
async fn create_user(
    State(state): State<AppState>,
    Json(payload): Json<CreateUserRequest>,
) -> Result<(StatusCode, Json<UserResponse>), AppError> {
    let user = state.db.create_user(&payload.name, &payload.email).await?;

    Ok((
        StatusCode::CREATED,
        Json(UserResponse {
            id: user.id,
            name: user.name,
            email: user.email,
            created_at: user.created_at.to_rfc3339(),
        }),
    ))
}

async fn get_user(
    State(state): State<AppState>,
    Path(user_id): Path<String>,
) -> Result<Json<UserResponse>, AppError> {
    let user = state
        .db
        .find_user(&user_id)
        .await?
        .ok_or(AppError::NotFound(format!("User {user_id} not found")))?;

    Ok(Json(UserResponse {
        id: user.id,
        name: user.name,
        email: user.email,
        created_at: user.created_at.to_rfc3339(),
    }))
}

#[derive(Deserialize)]
struct ListParams {
    page: Option<u32>,
    per_page: Option<u32>,
}

async fn list_users(
    State(state): State<AppState>,
    Query(params): Query<ListParams>,
) -> Result<Js
Полный SKILL.md на GitHub

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

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

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

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

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

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

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

FAQ

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

Specialist subagent: Rust ownership/borrowing, async Rust, Axum/Actix web frameworks, and WASM specialist. Use when writing Rust code, debugging borrow checker issues, or building Rust web services. Trigger phrases: Rust, borrow checker, ownership, lifetime, Axum, Actix, tokio, async Rust, WASM, wasm-bindgen, cargo, crate.

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

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

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

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

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

Сравнить agent-rust-expert с