# rust

This skill hands your agent a local copy of the official Rust docs: the language, Cargo, rustc, unsafe and async. Useful when you are editing a crate or fighting the borrow checker.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 922 installs · ★ 4
- Author: Fandhe-AI
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Fandhe-AI/agent-reference-skills/tree/HEAD/skills/rust/SKILL.md
- Updated: 2026-10-25
- HTML: https://affpapa.org/en/nevibecode/skills/rust

## What it does

The skill packs 14 official Rust sources into markdown files under `references/`. You get TRPL and Rust by Example, the language reference, the Cargo Book, the rustc Book, the rustdoc Book, the Rustonomicon on unsafe, the Edition Guide, standard library sections and the error index. Nothing is fetched at runtime — the agent reads local pages.

It routes by a task-to-category table. Ask about ownership or traits and the agent opens `references/book/README.md`, finds the chapter, reads it. Ask about `Cargo.toml`, workspaces or features and it goes to `references/cargo/`. Compiler flags, `--print`, sanitizers, LTO live in `references/rustc/`. Separate folders cover CLI tools, embedded targets and runnable snippets in `samples/`.

The skill is marked `user-invocable: false`, so you cannot call it by hand — it picks itself up when a task touches Rust. The reference is pinned to Rust 1.99.1, so questions about nightly-only features will not be answered from it. If your project still sits on an older edition, check `references/edition-guide/`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/rust/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/rust/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/rust/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/rust/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Fandhe-AI/agent-reference-skills rust
```

2. **Manually: put the files in place**
- File: `.github/skills/rust/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Fandhe-AI/agent-reference-skills --path skills/rust
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/rust/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Fandhe-AI/agent-reference-skills --skill rust -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Fandhe-AI/agent-reference-skills/tree/HEAD/skills/rust/SKILL.md

## When to use it
- figure out why the borrow checker rejects a function
- declare features correctly in `Cargo.toml`
- find the right `rustc` flag for a debug build
- check what counts as undefined behavior inside an unsafe block
- migrate a crate to a newer language edition

## Example prompts
- explain why this function fails to compile over ownership
- how do I set up a workspace with two crates in `Cargo.toml`?
- show me an example of async/await with `tokio`

## Similar
- [rust-router](https://affpapa.org/en/nevibecode/skills/rust-router.md) — skill · 2700 installs
- [rust-engineer](https://affpapa.org/en/nevibecode/skills/rust-engineer.md) — skill · 6300 installs
- [rust-deps-visualizer](https://affpapa.org/en/nevibecode/skills/rust-deps-visualizer.md) — skill · 3000 installs
- [rust-refactor](https://affpapa.org/en/nevibecode/skills/rust-refactor.md) — skill · 314 installs
- [rust-best-practices](https://affpapa.org/en/nevibecode/skills/rust-best-practices.md) — skill · 21100 installs
- [rust-async-patterns](https://affpapa.org/en/nevibecode/skills/rust-async-patterns.md) — skill · 20625 installs

## Other versions with the same name
- [rust · mindrally](https://affpapa.org/en/nevibecode/skills/mindrally-rust.md) — 778 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
