Skip to main content
skill CX Codex

unsafe-checker — Claude Code skill: what it does, how to install

Reviews unsafe Rust blocks and FFI boundaries, tracking required SAFETY comments and catching common causes of undefined behavior.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add actionbook/rust-skills --skill unsafe-checker -a claude-code
Open on GitHub

What unsafe-checker does

The skill inspects .rs files across your codebase using Read, Grep, and Glob. It monitors unsafe blocks, raw pointers, union declarations, #[repr(C)] attributes, and FFI bindings to audit low-level memory operations.

It enforces documentation standards by demanding // SAFETY: explanations above dangerous blocks and /// # Safety sections on public unsafe functions. Bypassing the borrow checker simply to silence compiler errors is explicitly treated as invalid. The checks target pointer alignment, initialization status, aliasing violations, and correct Send or Sync concurrency contracts.

Outdated idioms get flagged with modern replacements. It catches mem::uninitialized() in favor of MaybeUninit, recommends NonNull over raw pointer math, and warns against dangling pointers when calling .as_ptr() on temporary CString instances.

What it helps with

  • catch potential undefined behavior across unsafe code blocks
  • verify FFI signatures and external C function bindings
  • enforce mandatory // SAFETY: and /// # Safety documentation
  • replace deprecated constructs like mem::uninitialized() with MaybeUninit

Example prompts for the agent

  • Review the unsafe blocks in src/ffi.rs for alignment violations and required SAFETY comments.
  • Scan the crate for deprecated mem::zeroed calls and update them to MaybeUninit.
  • Audit C interface bindings in src/bindings.rs for memory layout and ABI issues.

How to install unsafe-checker

1Skills CLI (Vercel)

npx skills add actionbook/rust-skills --skill unsafe-checker -a claude-code

2Manually: put the files in place

~/.claude/skills/unsafe-checker/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/unsafe-checker/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about unsafe-checker

How do I install unsafe-checker in Claude Code?

Run npx skills add actionbook/rust-skills --skill unsafe-checker -a claude-code. You can also place the skill file into ~/.claude/skills/unsafe-checker/SKILL.md.

What does the unsafe-checker skill inspect?

It reviews low-level Rust code for undefined behavior, checking pointer alignment, aliasing, data races, and enforcing mandatory // SAFETY: comments.

Which crates does unsafe-checker recommend for FFI?

It suggests bindgen for C to Rust, cbindgen for Rust to C, PyO3 for Python integrations, and napi-rs for Node.js.

Similar skills

Everything for Code review and refactoring →

From the same set33

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor