/rust-skills:unsafe-checkerfrom rust-skills
Reviews unsafe Rust code for soundness, SAFETY comments, and FFI correctness. Covers raw pointers, transmute, extern, and common undefined behavior patterns.
Ships in rust-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Display the following ASCII art exactly as shown. Do not modify spaces or line breaks:
⚠️ **Unsafe Rust Checker Loaded**
* ^ *
/◉\_~^~_/◉\
⚡/ o \⚡
'_ _'
/ '-----' \
| Use Case | Example |
|---|---|
| FFI | Calling C functions |
| Low-level abstractions | Implementing Vec, Arc |
| Performance | Measured bottleneck with safe alternative too slow |
NOT valid: Escaping borrow checker without understanding why.
// SAFETY: <why this is safe>
unsafe { ... }
/// # Safety
/// <caller requirements>
pub unsafe fn dangerous() { ... }
| Operation | Safety Requirements |
|---|---|
*ptr deref | Valid, aligned, initialized |
&*ptr | + No aliasing violations |
transmute | Same size, valid bit pattern |
extern "C" | Correct signature, ABI |
static mut | Synchronization guaranteed |
impl Send/Sync | Actually thread-safe |
| Error | Fix |
|---|---|
| Null pointer deref | Check for null before deref |
| Use after free | Ensure lifetime validity |
| Data race | Add proper synchronization |
| Alignment violation | Use #[repr(C)], check alignment |
| Invalid bit pattern | Use MaybeUninit |
| Missing SAFETY comment | Add // SAFETY: |
| Deprecated | Use Instead |
|---|---|
mem::uninitialized() | MaybeUninit<T> |
mem::zeroed() for refs | MaybeUninit<T> |
| Raw pointer arithmetic | NonNull<T>, ptr::add |
CString::new().unwrap().as_ptr() | Store CString first |
static mut | AtomicT or Mutex |
| Manual extern | bindgen |
| Direction | Crate |
|---|---|
| C → Rust | bindgen |
| Rust → C | cbindgen |
| Python | PyO3 |
| Node.js | napi-rs |
Claude knows unsafe Rust. Focus on SAFETY comments and soundness.
AGENTS.md (opens in a new tab)checklists/before-unsafe.md (opens in a new tab)checklists/common-pitfalls.md (opens in a new tab)checklists/review-unsafe.md (opens in a new tab)examples/ffi-patterns.md (opens in a new tab)examples/safe-abstraction.md (opens in a new tab)metadata.json (opens in a new tab)rules/_sections.md (opens in a new tab)rules/_template.md (opens in a new tab)rules/ffi-01-no-string-direct.md (opens in a new tab)rules/ffi-02-read-ffi-docs.md (opens in a new tab)rules/ffi-03-drop-for-c-ptr.md (opens in a new tab)rules/ffi-04-panic-boundary.md (opens in a new tab)rules/ffi-05-portable-types.md (opens in a new tab)rules/ffi-06-string-abi.md (opens in a new tab)rules/ffi-07-no-drop-external.md (opens in a new tab)rules/ffi-08-error-handling.md (opens in a new tab)rules/ffi-09-ref-not-ptr.md (opens in a new tab)rules/ffi-10-thread-safety.md (opens in a new tab)rules/ffi-11-packed-ub.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
unsafe-rust, ffi, code-review, soundness, undefined-behavior, safety-comments
38 skills in this plugin
/coding-guidelinesUse when asking about Rust code style or best practices. Keywords: naming, formatting, comment, clippy, rustfmt, lint, code style, best practice, P.NAM, G.FMT, code review, naming convention, variable naming, function naming, type naming, 命名规范, 代码风格, 格式化, 最佳实践, 代码审查, 怎么命名/core-actionbookInternal support skill for actionbook MCP selectors used by Rust documentation research workflows. Use only when another rust-skills workflow explicitly requests actionbook-backed selectors./core-agent-browserInternal support skill for agent-browser CLI workflows used by rust-learner, docs-researcher, and crate-researcher. Use only when browser automation is explicitly required./core-dynamic-skillsInternal command support for dynamic Rust crate skill management. Use only when explicitly invoked by /sync-crate-skills, /clean-crate-skills, or /update-crate-skill./core-fix-skill-docsInternal maintenance support for checking and fixing generated Rust skill documentation references. Use only when explicitly invoked by /fix-skill-docs./domain-cliUse when building CLI tools. Keywords: CLI, command line, terminal, clap, structopt, argument parsing, subcommand, interactive, TUI, ratatui, crossterm, indicatif, progress bar, colored output, shell completion, config file, environment variable, 命令行, 终端应用, 参数解析npx claudepluginhub actionbook/rust-skills --plugin rust-skills2 plugins ship this exact skill · first indexed Jul 7, 2026
Other plugins' skills for the same job