mcpField
R
rust

rust

github.com/oakossDevelopment21120 installsUpdated 12w ago
Repository

About rust

Rust is a systems programming language focused on memory safety, concurrency, and performance. This skill offers practical guidance for developers building services, CLI tools, terminal interfaces, WebAssembly, and other performance-sensitive software.

Key features

  1. 01Ownership and borrowing guidance
  2. 02Error handling patterns
  3. 03Async programming with Tokio
  4. 04Web services with axum
  5. 05CLI development with clap
  6. 06Testing and benchmarking

Use cases

  1. 01Build memory-safe systems software
  2. 02Develop asynchronous web services
  3. 03Create command-line tools and terminal UIs
  4. 04Benchmark performance-sensitive applications

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/oakoss/agent-skills --skill rust

After installing, type/rustin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
async-tokio.md
axum-web.md
cli-applications.md
error-handling.md
ownership-and-types.md
ratatui-tui.md
release-pipeline.md
testing-and-benchmarks.md

Details

From the project README

Rust

Overview

Rust is a systems programming language focused on safety, concurrency, and performance. The ownership system guarantees memory safety without garbage collection, and the type system enforces thread safety at compile time.

When to use: Systems programming, web services (axum), CLI tools (clap), terminal UIs (ratatui), WebAssembly, performance-critical applications, anything requiring memory safety without runtime overhead.

When NOT to use: Rapid prototyping where compile times matter more than safety, simple scripting tasks, projects where the team has no Rust experience and deadlines are tight.

Quick Reference

PatternAPI / ToolKey Points
Ownership transferlet b = a;a is moved, no longer usable
Borrowing&T / &mut TOne mutable OR many immutable refs
Lifetime annotationfn f<'a>(x: &'a str) -> &'a strTies output lifetime to input
Error propagation? operatorConverts and propagates errors
Custom errorsthiserror::Error deriveStructured error types with Display
Ad-hoc errorsanyhow::Result<T>Context chaining for applications
Async runtime#[tokio::main]Entry point for async programs
Spawn tasktokio::spawn(async { })Concurrent async task execution
HTTP routeraxum::Router::new().route(...)Composable routing with extractors
ExtractorsJson<T>, Path<T>, State<T>Type-safe request parsing
Serialization#[derive(Serialize, Deserialize)]serde with format-agnostic derives
CLI parsing#[derive(Parser)]clap derive API for arg parsing
TUI renderingterminal.draw(|f| { })Immediate-mode ratatui rendering
Benchmarkingcriterion::CriterionStatistical benchmarking framework
Dep auditingcargo deny checkLicense, vulnerability, source audit
Binary releasecargo dist initCross-platform binary distribution
Changelogrelease-plz updateAuto semver bump and changelog

Common Mistakes

MistakeCorrect Pattern
Returning reference to local variableReturn owned type or use lifetime parameter
Using unwrap() in library codeReturn Result and let caller decide
clone() to satisfy borrow checkerRestructure code to avoid the borrow conflict
Blocking in async contextUse tokio::task::spawn_blocking
Shared mutable state without syncUse Arc<Mutex<T>> or channels
String where &str sufficesAccept &str in function parameters
Ignoring must_use warningsHandle or explicitly discard with let _ =
Large enum variantsBox the large variant to reduce overall size
async fn in traits without boundsAdd Send bound or use async-trait crate
Missing #[tokio::test] on async testsUse #[tokio::test] instead of #[test]

Delegation

  • Code exploration: Use Explore agent
  • Architecture review: Use Task agent
  • Code review: Delegate to code-reviewer agent

If the docker skill is available, delegate multi-stage container build patterns to it. If the github-actions skill is available, delegate CI pipeline configuration to it. If the openapi skill is available, delegate API specification and code generation to it.

References

Comments

Markdown supported