Activates when you're working with unsafe Rust blocks, FFI bindings, or raw pointers. Displays quick reference tables for safety requirements (dereferencing, transmute, extern calls), common errors like null pointer derefs and use after free, and deprecated patterns you should avoid (like mem::uninitialized). Also covers FFI tooling like bindgen and cbindgen. The real value is having those SAFETY comment examples and soundness checklists right there when you need them, since unsafe code review is all about documentation and understanding invariants. Best paired with actual unsafe Rust knowledge, this is a checklist not a tutorial.

skills.sh installs
3.5K
GitHub stars
1.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add actionbook/rust-skills --skill unsafe-checker --agent claude-code

Installs into .claude/skills of the current project.

Files

Display the following ASCII art exactly as shown. Do not modify spaces or line breaks:

⚠️ **Unsafe Rust Checker Loaded**

     *  ^  *
    /◉\_~^~_/◉\
 ⚡/     o     \⚡
   '_        _'
   / '-----' \

Unsafe Rust Checker

When Unsafe is Valid

Use CaseExample
FFICalling C functions
Low-level abstractionsImplementing Vec, Arc
PerformanceMeasured bottleneck with safe alternative too slow

NOT valid: Escaping borrow checker without understanding why.

Required Documentation

// SAFETY: <why this is safe>
unsafe { ... }

/// # Safety
/// <caller requirements>
pub unsafe fn dangerous() { ... }

Quick Reference

OperationSafety Requirements
*ptr derefValid, aligned, initialized
&*ptr+ No aliasing violations
transmuteSame size, valid bit pattern
extern "C"Correct signature, ABI
static mutSynchronization guaranteed
impl Send/SyncActually thread-safe

Common Errors

Sponsors

Details

Repository
github.com/actionbook/rust-skills
Categories
Frontend Development, Git & Pull Requests, Code Review & Quality, Rust
First seen
May 16, 2026

More from actionbook/rust-skills

All 38
1openai avatarchatgpt-appsopenai/skillsBuild, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, regist3.5Kskills.sh installs
2enzed avatarr3f-interactionenzed/r3f-skillsReact Three Fiber interaction - pointer events, controls, gestures, selection. Use when handling user input, implementing click detection, adding camera control3.4Kskills.sh installs
3freshtechbro avatarweb3d-integration-patternsfreshtechbro/claudedesignskillsMeta-skill for combining Three.js, GSAP ScrollTrigger, React Three Fiber, Motion, and React Spring for complex 3D web experiences. Use when building application3.4Kskills.sh installs
4markdown-viewer avatargraphvizmarkdown-viewer/skillsCreate directed/undirected graphs using DOT language with automatic layout. Best for dependency trees, call graphs, package hierarchies, and module relationship3.4Kskills.sh installs
5netlify avatarnetlify-image-cdnnetlify/context-and-toolsGuide for using Netlify Image CDN for image optimization and transformation. Use when serving optimized images, creating responsive image markup, setting up use3.3Kskills.sh installs
6tradermonty avatardowntrend-duration-analyzertradermonty/claude-trading-skillsAnalyze historical downtrend durations and generate interactive HTML histograms showing typical correction lengths by sector and market cap.3.3Kskills.sh installs