This is a comprehensive Rust reference that covers the language's core concepts with practical examples. You get detailed coverage of ownership rules, borrowing patterns, lifetime annotations, and the type system including traits and generics. The error handling section walks through Result types, the ? operator, and custom error implementations with anyhow and thiserror. There's also async/await patterns with Tokio, though the source cuts off mid-example. It's structured more like documentation than an interactive coding assistant, so treat it as a quick reference when you need to check syntax for lifetimes or remember how trait bounds work. Best for intermediate developers who know Rust basics but need examples of idiomatic patterns.

skills.sh installs
177
GitHub stars
44
last updated
Aug 21, 2026

Install

$ npx -y skills add personamanagmentlayer/pcl --skill rust-expert --agent claude-code

Installs into .claude/skills of the current project.

Files

Rust Expert

You are an expert Rust developer with deep knowledge of ownership, lifetimes, type system, async programming, and systems programming. You write safe, fast, and idiomatic Rust code following community best practices.

Best Practices

1. Use Idiomatic Rust

// Prefer iterators over loops
let sum: i32 = vec![1, 2, 3, 4, 5]
    .iter()
    .map(|x| x * 2)
    .filter(|x| x > &5)
    .sum();

// Use match for exhaustive handling
match result {
    Ok(value) => println!("Success: {}", value),
    Err(e) => eprintln!("Error: {}", e),
}

// Prefer &str over &String in function parameters
fn greet(name: &str) -> String {
    format!("Hello, {}!", name)
}

2. Avoid Unnecessary Cloning

// Bad - unnecessary clone
fn process(data: &Vec<i32>) -> Vec<i32> {
    data.clone() // Allocates memory
}

// Good - borrow when possible
fn process(data: &[i32]) -> i32 {
    data.iter().sum()
}

// Good - use Cow when needed
use std::borrow::Cow;

fn process<'a>(data: &'a str) -> Cow<'a, str> {
    if data.contains("bad") {
        Cow::Owned(data.replace("bad", "good"))
    } else {
        Cow::Borrowed(data)
    }
}

3. Use the Type System

Sponsors

Details

Repository
github.com/personamanagmentlayer/pcl
Categories
Debugging, Rust
First seen
Jun 3, 2026

More from personamanagmentlayer/pcl

All 99

Recommended

More Debugging
1samhvw8 avatarfrontend-developmentsamhvw8/dotfilesMulti-framework frontend development. Frameworks: React 18+ (Suspense, hooks, TanStack), Vue 3 (Composition API, Pinia, Nuxt), Svelte 5 (Runes, SvelteKit), Angu174skills.sh installs
2aiskillstore avatarmcp-integrationaiskillstore/marketplaceModel Context Protocol (MCP) integration specialist. Use when creating MCP server configurations, implementing MCP integrations, or optimizing MCP performance. 173skills.sh installs
3charleswiltgen avataraxiom-app-shortcuts-refcharleswiltgen/axiomUse when implementing App Shortcuts for instant Siri/Spotlight availability, configuring AppShortcutsProvider, adding suggested phrases, or debugging shortcuts 172skills.sh installs
4bbeierle12 avatarshader-fundamentalsbbeierle12/skill-mcp-claudeGLSL shader fundamentals—vertex and fragment shaders, uniforms, varyings, attributes, coordinate systems, built-in variables, and data types. Use when writing c171skills.sh installs
5charleswiltgen avataraxiom-background-processing-diagcharleswiltgen/axiomSymptom-based background task troubleshooting - decision trees for 'task never runs', 'task terminates early', 'works in dev not prod', 'handler not called', wi169skills.sh installs
6charleswiltgen avataraxiom-objc-block-retain-cyclescharleswiltgen/axiomUse when debugging memory leaks from blocks, blocks assigned to self or properties, network callbacks, or crashes from deallocated objects - systematic weak-str169skills.sh installs