rust-expert

rust-expert is a skill for Claude Code from personamanagmentlayer/pcl. It costs 60 tokens per session (1,885 once invoked), scanned A, original, Apache-2.0.

A guide to Rust, a programming language designed for fast software with strict memory-safety rules. It explains ownership, borrowing, lifetimes, asynchronous programming, and error handling.

In plain words
What is it for?
Use it when building systems software, concurrent programs, command-line tools, or other performance-sensitive Rust applications.
Why use it?
It helps developers understand compiler errors caused by unsafe memory access or incorrect ownership, which are central to Rust programming.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when building systems software, concurrent programs, command-line tools, or other…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/personamanagmentlayer/pcl/rust-expert
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add personamanagmentlayer/pcl --skill rust-expert
Clone the repo
git clone --depth 1 https://github.com/personamanagmentlayer/pcl

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rust-expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/rust-expert.svg)](https://agentmods.dev/skills/personamanagmentlayer/pcl/rust-expert)
Your own site
<a href="https://agentmods.dev/skills/personamanagmentlayer/pcl/rust-expert"><img src="https://agentmods.dev/badge/skills/personamanagmentlayer/pcl/rust-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,885 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.01885
Opus 5 $0.00030 $0.00942
Sonnet 5 $0.00012 $0.00377
Haiku 4.5 $0.00006 $0.00188

Measured yesterday against content hash a0d89eb4d52a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

rust-expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

stdlib/languages/rust-expert/SKILL.md · 361 lines

How it starts

The opening of the file, as written. The whole thing — 361 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

// Newtype pattern for type safety
struct UserId(u64);
struct ProductId(u64);

fn get_user(id: UserId) -> User {
    // Cannot accidentally pass ProductId
}

// Builder pattern with typestate
struct Locked;
struct Unlocked;

struct Door<State> {
    state: PhantomData<State>,
}

impl Door<Locked> {
    fn unlock(self) -> Door<Unlocked> {
        Door { state: PhantomData }
    }
}

impl Door<Unlocked> {
    fn lock(self) -> Door<Locked> {
        Door { state: PhantomData }
    }

    fn open(&self) {
        println!("Opening door");
    }
}

4. Error Handling

// Use Result<T, E> for recoverable errors
fn parse_config(path: &str) -> Result<Config, ConfigError> {
    // Implementation
}

// Use panic! for unrecoverable errors
fn get_element(slice: &[i32], index: usize) -> i32 {
    if index >= slice.len() {
        panic!("Index out of bounds");
    }
    slice[index]
}

// Use Option<T> for nullable values
fn find_user(id: u64) -> Option<User> {
    // Implementation
}

Read the full file on GitHub · 361 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · -637 lines · +37 tokens per session a0d89eb4d52a
  2. 3d ago First seen · 998 lines · 23 tokens per session scan A a16decbceedb

Subscribe to this mod's changes

rust-expert is a skill published in the GitHub repository personamanagmentlayer/pcl (41 stars, last pushed yesterday), licensed Apache-2.0. It adds 60 tokens to every session and 1,885 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.