unsafe-checker

Detect unsafe Rust code and risky FFI usage in Rust projects.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/AlexKVal/rust-skills-for-cursor --skill unsafe-checker-alexkval
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unsafe-checker
Source: https://github.com/AlexKVal/rust-skills-for-cursor/tree/main/skills/unsafe-checker
Command: npx skills add https://github.com/AlexKVal/rust-skills-for-cursor --skill unsafe-checker-alexkval

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps auditors detect unsafe Rust code, raw pointers, and risky FFI usage to prevent undefined behavior and improve safety.

Core Features & Use Cases

  • Unsafe code review: identify unsafe blocks and unsafe API usage.
  • FFI analysis: review foreign-function interfaces and extern blocks for safety compliance.
  • Safety guidance: provide remediation suggestions and safer design alternatives for risky patterns.

Quick Start

Scan your Rust project to surface unsafe blocks, raw pointers, and unsafe FFI usage, and generate actionable safety recommendations.

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 code for undefined behavior?

You can audit unsafe Rust code by scanning your project to identify unsafe blocks, raw pointers, transmute, and MaybeUninit usage, then applying the generated remediation guidance to mitigate undefined behavior.

What is the best way to review risky FFI usage in Rust projects?

Reviewing risky FFI usage involves analyzing extern blocks and foreign-function interfaces for safety compliance, checking raw pointer handling and validating SAFETY comments to prevent undefined behavior.

How do I find and fix unsafe API usage in my Rust library?

To find and fix unsafe API usage in your Rust library, scan for unsafe blocks and extern functions, then apply the provided safer design alternatives and remediation suggestions to correct risky patterns.

Can I use this to check Rust performance-critical modules with FFI interactions?

Yes, this analysis applies to Rust performance-critical modules with FFI interactions, detecting unsafe blocks, NonNull pointers, and extern functions while providing actionable safety remediation guidance.

When do I need to review SAFETY comments in unsafe Rust blocks?

Review SAFETY comments in unsafe Rust blocks during safety audits to validate whether invariants for raw pointers, transmute, and MaybeUninit operations are properly documented and sufficient to prevent undefined behavior.