Rust Systems
Rust systems programming with zero-cost abstractions, memory safety, and TDD. Use when working on Rust projects requiring performance, safety, or systems-level code. Emphasizes std-first philosophy and minimal dependencies. Do NOT use for other programming languages.
Get the complete skill folder, including its scripts and reference files.
When to use this skill
Use Rust Systems when an AI agent needs a reusable SKILL.md workflow for this job: Rust systems programming with zero-cost abstractions, memory safety, and TDD. Use when working on Rust projects requiring performance, safety, or systems-level code. Emphasizes std-first philosophy and minimal dependencies. Do NOT use for other programming languages.
When not to use it
Skip Rust Systems when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.
How to install
Where will you use it?
mkdir -p ~/.claude/skills/rust-systems # Save SKILL.md to ~/.claude/skills/rust-systems/SKILL.md
- Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/rust-systems/SKILL.md. For a shared project, commit the folder at .claude/skills/rust-systems/ instead.
- Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
- For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.
Full install guide for Claude, Cursor, and Codex →
Try a starter prompt
After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.
Use the Rust Systems skill for this task: Use Rust Systems when this documented workflow matches the task. Confirm any required inputs or files before making changes.
What supports this recommendation?
69/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.
- Documentation
- 77/100
- Practical detail
- 68/100
- Source evidence
- 53/100
- Source signals
- 72/100
Model compatibility evidence
- claudeuntested
No model-specific signal or recorded compatibility test was found.
- chatgptuntested
No model-specific signal or recorded compatibility test was found.
- geminiuntested
No model-specific signal or recorded compatibility test was found.
- copilotuntested
No model-specific signal or recorded compatibility test was found.
- llamauntested
No model-specific signal or recorded compatibility test was found.
- perplexityinferred
The skill text mentions Perplexity or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.
- mistraluntested
No model-specific signal or recorded compatibility test was found.
- grokuntested
No model-specific signal or recorded compatibility test was found.
Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.
What this skill does
# Rust Systems Architect
You are an elite Rust architect championing zero-cost abstractions and "less is more" philosophy while maintaining memory safety and performance.
## Core Principles
- **Zero-Cost Abstractions**: No runtime overhead for abstractions - **Memory Safety**: Safe Rust first, unsafe only when profiled and necessary - **Std-First**: Prefer standard library over external crates - **Minimal Dependencies**: Every crate is a liability - **TDD**: Write tests before implementation, 80%+ coverage
## Hierarchy of Preferences
``` &str > String Stack > Heap Move > Borrow > Rc > Arc Sync > Async Std > External crate Safe > Unsafe ```
## Quality Gate Checklist
- [ ] `cargo test --all-features` passes (zero failures) - [ ] `cargo clippy -- -D warnings` passes (zero warnings) - [ ] `cargo fmt -- --check` passes - [ ] `cargo doc --no-deps` builds - [ ] Coverage >= 80% (use cargo-tarpaulin)
## Ownership Patterns
For the full pattern library — ownership, borrowing, lifetimes, error handling, concurrency, and unsafe patterns — read `references/patterns.md` before writing or reviewing non-trivial Rust.
```rust // YES: Simple, clear ownership fn process(data: Vec<u8>) -> String { String::from_utf8_lossy(&data).into_owned() }
// NO: Unnecessary lifetime complexity fn process<'a, 'b>(data: &'a [u8]) -> Cow<'b, str> where 'a: 'b { ... } ```
## Error Handling
```rust // Simple and explicit fn parse(s: &str) -> Result<u32, ParseIntError> { s.parse() }
// Use Box<dyn Error> until you need more fn complex() -> Result<T, Box<dyn Error>> { ... } ```
## Dependency Decision Tree
``` Can std do this? → Use std <50 lines to implement? → Write those lines Performance critical? → Benchmark first Genuinely complex? → Research → MAYBE add crate ```
## Debugging Workflow
1. Run `cargo build` and `cargo test` 2. READ Rust's excellent error messages 3. Use `rustc --explain E0XXX` for error codes 4. Only then use Perplexity for SPECIFIC errors
## Rust Mantras
- "The compiler is my pair programmer" - "std before crates" - "Stack before heap" - "&str before String" - "Move before borrow before Rc before Arc" - "Safe before unsafe" - "Sync before async"
## Completion Report Format
When reporting to PM, include EXACT output: ``` QUALITY GATES PASSED: - cargo test: X/X passing (0 failures) - cargo clippy: 0 warnings - cargo fmt: all formatted - cargo doc: builds successfully ```
❌ NEVER: "tests should pass" or "clippy looks clean" ✅ ALWAYS: exact counts from terminal output
## File Hygiene
- Docs → `docs/`, Tests → `tests/`, no throwaway files in project root - Litmus test: "Will this file be useful 200 PRs from now?" - FORBIDDEN: debug_*.rs, temp scripts, root-level markdown summaries
Intended uses
- Use Rust Systems when this documented workflow matches the task.
Implementation notes
- Review the source instructions and adapt inputs before running the workflow.
Try it, then tell us how it went
A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.