
Rust Engineer
Ship Rust services and CLIs with idiomatic async concurrency, error handling, and Tokio patterns without guessing runtime semantics.
Overview
rust-engineer is an agent skill for the Build phase that teaches idiomatic Rust async programming with Tokio, join/spawn concurrency, and HTTP-style I/O patterns.
Install
npx skills add https://github.com/jeffallan/claude-skills --skill rust-engineerWhat is this skill?
- Tokio async/await patterns with #[tokio::main] and manual Runtime::new block_on
- Concurrent execution via tokio::join!, try_join!, and tokio::spawn for parallel work
- Sequential vs concurrent async composition for latency-sensitive Rust services
- reqwest-style HTTP fetch flows with Result-based error propagation
- Guidance framed for production Rust engineers, not one-off syntax snippets
Adoption & trust: 3.8k installs on skills.sh; 9.7k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are building a Rust backend but async runtimes, join vs await ordering, and spawned tasks feel fragile and easy to get wrong under time pressure.
Who is it for?
Indie builders implementing Rust APIs, workers, or CLI tools who already know Rust basics and need async/Tokio guidance during feature implementation.
Skip if: Teams still choosing a language stack, greenfield architects who need system design before any Rust code, or pure frontend-only workflows with no Rust crate.
When should I use this skill?
When implementing or reviewing Rust async code with Tokio, concurrent tasks, or HTTP fetch flows in a backend or CLI crate.
What do I get? / Deliverables
Your agent applies consistent Tokio async patterns so network and compute work composes cleanly with explicit concurrency and error handling in Rust code.
- Async Rust functions and main/runtime setup aligned with Tokio idioms
- Concurrent task structure using join, try_join, or spawn as appropriate
Recommended Skills
Journey fit
Rust systems work lands in Build when you are implementing servers, workers, and performance-sensitive backends—not when you are still validating the idea. The skill’s examples center on async I/O, HTTP fetch, join/spawn, and runtime setup—the canonical backend shelf for Rust in Prism.
How it compares
Use as a focused Rust async implementation guide instead of generic “write me Rust” chat without runtime-aware patterns.
Common Questions / FAQ
Who is rust-engineer for?
Solo and indie developers shipping Rust backends, CLIs, or agent tooling who want Tokio-first async patterns applied during implementation in Claude Code, Cursor, or Codex.
When should I use rust-engineer?
Use it in the Build phase when you are coding async HTTP clients, parallel I/O with join or spawn, or setting up a Tokio runtime—not during initial market research or launch copy.
Is rust-engineer safe to install?
Review the Security Audits panel on this Prism page for install risk, file hash, and any published audit results before enabling the skill in your agent environment.
SKILL.md
READMESKILL.md - Rust Engineer
# Async Programming in Rust ## Basic Async/Await ```rust use tokio; // Async function returns a Future async fn fetch_data(url: &str) -> Result<String, reqwest::Error> { let response = reqwest::get(url).await?; let body = response.text().await?; Ok(body) } // Tokio runtime #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let data = fetch_data("https://api.example.com").await?; println!("Data: {}", data); Ok(()) } // Manual runtime creation fn main() { let runtime = tokio::runtime::Runtime::new().unwrap(); runtime.block_on(async { println!("Hello from async context"); }); } ``` ## Concurrent Execution ```rust use tokio; // Sequential execution async fn sequential() { let result1 = async_operation1().await; let result2 = async_operation2().await; // Waits for operation1 } // Concurrent execution with join! async fn concurrent() { let (result1, result2) = tokio::join!( async_operation1(), async_operation2() ); } // Concurrent with try_join! (stops on first error) async fn concurrent_with_errors() -> Result<(), Box<dyn std::error::Error>> { let (result1, result2) = tokio::try_join!( fallible_operation1(), fallible_operation2() )?; Ok(()) } // Spawning tasks async fn spawn_tasks() { let handle1 = tokio::spawn(async { // This runs on a separate task expensive_computation().await }); let handle2 = tokio::spawn(async { another_computation().await }); // Wait for both to complete let result1 = handle1.await.unwrap(); let result2 = handle2.await.unwrap(); } ``` ## Select and Race Conditions ```rust use tokio::time::{sleep, Duration}; // select! - wait for first to complete async fn first_to_complete() { tokio::select! { result = async_operation1() => { println!("Operation 1 completed first: {:?}", result); } result = async_operation2() => { println!("Operation 2 completed first: {:?}", result); } } } // Timeout pattern async fn with_timeout() -> Result<String, &'static str> { tokio::select! { result = fetch_data("https://api.example.com") => { result.map_err(|_| "Fetch failed") } _ = sleep(Duration::from_secs(5)) => { Err("Timeout") } } } // Cancellation with select! async fn cancellable_operation(mut cancel_rx: tokio::sync::watch::Receiver<bool>) { tokio::select! { result = long_running_task() => { println!("Task completed: {:?}", result); } _ = cancel_rx.changed() => { println!("Task cancelled"); } } } ``` ## Streams ```rust use tokio_stream::{self as stream, StreamExt}; // Creating streams async fn stream_example() { let mut stream = stream::iter(vec![1, 2, 3, 4, 5]); while let Some(value) = stream.next().await { println!("Value: {}", value); } } // Stream combinators async fn stream_combinators() { let stream = stream::iter(vec![1, 2, 3, 4, 5]) .filter(|x| *x % 2 == 0) .map(|x| x * 2); let results: Vec<_> = stream.collect().await; println!("Results: {:?}", results); } // Async stream processing use futures::stream::{self, StreamExt}; async fn process_stream() { let stream = stream::iter(vec![1, 2, 3, 4, 5]) .then(|x| async move { tokio::time::sleep(Duration::from_millis(100)).await; x * 2 }); stream.for_each(|x| async move { println!("Processed: {}", x); }).await; } ``` ## Channels for Communication ```rust use tokio::sync::{mpsc, oneshot, broadcast, watch}; // mpsc: multiple producer, single consumer async fn mpsc_example() { let (tx, mut rx) = mpsc::channel(32); tokio::spawn(async move { tx.send("Hello").await.unwrap(); tx.send("World").await.unwrap(); }); while let Some(msg) = rx.recv().await