unsafe-checker

Detect unsafe Rust patterns and enforce safety invariants across codebases.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/yumazak/kodo --skill unsafe-checker-yumazak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unsafe-checker
Source: https://github.com/yumazak/kodo/tree/main/.agents/skills/unsafe-checker
Command: npx skills add https://github.com/yumazak/kodo --skill unsafe-checker-yumazak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Unsafe Checker helps teams identify and remediate unsafe Rust patterns, unsafe code blocks, and risky FFI boundaries to prevent memory-safety issues.

Core Features & Use Cases

  • Detects unsafe blocks and unsafe fns usage in Rust projects
  • Flags raw pointers, unions, and non-FFI-safe patterns
  • Provides safety invariant documentation guidance for reviewers
  • Useful for code reviews, CI checks, and educational tooling

Quick Start

Run the Unsafe Checker on a Rust codebase to surface unsafe patterns and generate concrete safety recommendations for remediation.

Frequently Asked Questions about unsafe-checker

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

FAQPage Schema
How do I detect unsafe Rust patterns and raw pointers in my codebase?

To detect unsafe Rust patterns, you need a static-analysis tool that identifies unsafe blocks, raw pointers, and unions. This process flags risky FFI boundaries and generates concrete safety recommendations for remediation during code reviews.

What is the best way to enforce safety invariants for Rust FFI boundaries?

Enforcing safety invariants for Rust FFI boundaries requires documenting specific safety requirements and verifying them during code review. The framework provides SAFETY comments and invariant verification to guide reviewers in validating memory-safety critical constructs.

How do I write SAFETY comments for unsafe blocks to pass code reviews?

Writing SAFETY comments for unsafe blocks involves documenting the specific invariants your code upholds to prevent memory-safety issues. The framework provides guidance to help developers document requirements and prove that non-FFI-safe patterns are handled correctly.

Can I use static analysis to check unsafe Rust code in CI pipelines?

Yes, you can use static analysis to check unsafe Rust code in CI pipelines. The checker surfaces unsafe patterns like unsafe fns and raw pointers, making it suitable for automated CI checks to prevent memory-safety issues from merging into your projects.

When do I need to verify safety invariants in Rust projects?

You need to verify safety invariants in Rust projects whenever you use unsafe blocks, raw pointers, or FFI boundaries. Verifying these memory-safety critical constructs prevents undefined behavior and ensures that your codebase remains safe despite bypassing Rust's borrow checker.