unsafe-checker

Analyze unsafe Rust blocks and FFI interfaces for safety invariants.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/lywa1998/self-host-claude-marketplace --skill unsafe-checker-lywa1998
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unsafe-checker
Source: https://github.com/lywa1998/self-host-claude-marketplace/tree/main/plugins/rust-skills/skills/unsafe-checker
Command: npx skills add https://github.com/lywa1998/self-host-claude-marketplace --skill unsafe-checker-lywa1998

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured approach to reviewing unsafe Rust blocks and FFI interfaces, helping teams enforce memory-safety, correct aliasing, and robust cross-language boundaries.

Core Features & Use Cases

  • Rule-driven static checks for unsafe blocks, raw pointers, unions, and memory layouts.
  • Guidance and templates to document SAFETY sections and ensure proper safety invariants.
  • Use-case coverage across FFI boundaries, pointer manipulation, and panic-safety scenarios in Rust projects.

Quick Start

Inspect a Rust codebase containing unsafe blocks and apply the checker to identify safety gaps and generate remediation guidance.

Frequently Asked Questions about unsafe-checker

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

FAQPage Schema
How do I audit unsafe Rust blocks for memory safety and pointer aliasing issues?

To audit unsafe Rust blocks, this checker statically analyzes raw pointers, unions, and memory layouts to identify aliasing and initialization gaps. It produces actionable remediation guidance to enforce safety invariants across your codebase.

What is the best way to review FFI interfaces for stable memory layouts in Rust?

Reviewing FFI interfaces for stable memory layouts involves analyzing external interfaces and verifying thread-safety. This checker enforces proper documentation and validates stable FFI layouts to ensure robust cross-language boundaries.

How do I enforce SAFETY comments for unsafe Rust code?

Enforcing SAFETY comments for unsafe Rust requires templates to document safety invariants. The checker provides structured guidance to verify proper documentation and ensure every unsafe block includes necessary safety justifications.

Can I check panic safety across unsafe Rust blocks and FFI boundaries?

Checking panic safety across unsafe Rust blocks and FFI boundaries is supported. The checker analyzes panic-safety scenarios within unsafe sections and generates remediation guidance to prevent undefined behavior during unwinding.

Does this unsafe Rust reviewer work without external dependencies?

This unsafe Rust reviewer works without external dependencies. It operates directly on Rust codebases containing unsafe blocks, applying rule-driven static checks to identify safety gaps and verify documentation.

When should I not use a static checker for unsafe Rust code?

Static checkers for unsafe Rust should not replace dynamic testing or formal verification for highly complex memory manipulation. Use this checker for rule-driven static checks and remediation guidance, but validate critical safety invariants with comprehensive tests.