unsafe-checker

Detect unsafe Rust constructs and missing SAFETY comments in .rs files.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/Jylhis/claude-marketplace --skill unsafe-checker-jylhis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unsafe-checker
Source: https://github.com/Jylhis/claude-marketplace/tree/main/plugins/rust-dev/skills/unsafe-checker
Command: npx skills add https://github.com/Jylhis/claude-marketplace --skill unsafe-checker-jylhis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The unsafe-checker skill assists developers in reviewing Rust code that uses unsafe constructs, ensuring proper SAFETY comments and preventing undefined behavior.

Core Features & Use Cases

  • Scans Rust files for unsafe keywords, raw pointers, FFI, transmute, and other risky patterns.
  • Validates presence of required SAFETY documentation and suggests safer alternatives.
  • Provides quick reference tables for safety requirements, common errors, and recommended crates.

Quick Start

Ask the unsafe-checker skill to review the file 'src/main.rs' and point out any unsafe code lacking proper SAFETY comments.

Frequently Asked Questions about unsafe-checker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check unsafe Rust code for missing SAFETY comments?

To check unsafe Rust code for missing SAFETY comments, scan .rs source files to detect unsafe blocks, raw pointers, FFI, and transmute patterns, then validate the presence of required SAFETY comment annotations.

What unsafe Rust constructs should I document with a SAFETY comment?

Unsafe Rust constructs requiring SAFETY documentation include raw pointers, FFI bindings, transmute operations, and unsafe blocks, ensuring alignment, initialization, and thread-safety requirements are explicitly validated.

How do I review Rust FFI and transmute patterns for undefined behavior?

Review Rust FFI and transmute patterns by scanning source files for risky constructs and validating that required SAFETY comments address alignment, initialization, and thread-safety requirements to prevent undefined behavior.

Can this unsafe code checker scan any Rust project?

Yes, this unsafe code checker can scan any Rust project by analyzing .rs files across the entire codebase to detect unsafe keywords, raw pointers, and related risky patterns.

What is the best way to find safer alternatives for unsafe Rust blocks?

The best way to find safer alternatives for unsafe Rust blocks is to scan source files for risky patterns, validate missing SAFETY comments, and reference quick reference tables for recommended crates.

Why does my Rust code fail safety checks for raw pointers?

Rust code fails safety checks for raw pointers when missing SAFETY comments fail to validate alignment, initialization, and thread-safety requirements for unsafe blocks and transmute operations.