Skip to content
Skill

Unsafe checker

Reviews unsafe Rust code and FFI boundaries for SAFETY comments and soundness

Unsafe checker is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
21
Last commit
License
MIT
Listing updated

Similar skills

About Unsafe checker

This skill gives the agent a checklist for reviewing unsafe Rust. It lists when unsafe is justified, such as calling C functions or building low-level abstractions, and flags it as a poor choice when used only to get past the borrow checker.

The guidance centers on documentation and soundness. The agent is pointed to a SAFETY comment format for unsafe blocks and a Safety section for unsafe functions, and it gets a quick reference of requirements for operations like raw pointer dereference, transmute, extern "C" calls, static mut and unsafe Send or Sync impls. A table of common errors maps problems such as null dereference, use after free, data races and alignment violations to suggested fixes.

The skill also recommends modern replacements for older patterns, such as MaybeUninit instead of mem::uninitialized, NonNull instead of raw pointer arithmetic, and bindgen instead of hand-written extern declarations. It names FFI crates for C, Rust to C, Python and Node.js bindings. It declares Read, Grep and Glob as its allowed tools and includes no scripts.

When your agent uses it

CRITICAL: Use for unsafe Rust code review and FFI. Triggers on: unsafe, raw pointer, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, std::ffi, MaybeUninit, NonNull, SAFETY comment, soundness, undefined behavior, UB, safe wrapper, memory layout, bindgen, cbindgen, CString, CStr, 安全抽象, 裸指针, 外部函数接口, 内存布局, 不安全代码, FFI 绑定, 未定义行为

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 54 files (179 KB) on GitHub on 2 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/unsafe-checker to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/unsafe-checker &&
cp -R "$tmp/.claude/skills/unsafe-checker" ~/.claude/skills/unsafe-checker &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/unsafe-checker inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/unsafe-checker to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/unsafe-checker &&
cp -R "$tmp/.claude/skills/unsafe-checker" ~/.agents/skills/unsafe-checker &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/unsafe-checker inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/unsafe-checker to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/unsafe-checker &&
cp -R "$tmp/.claude/skills/unsafe-checker" ~/.cursor/skills/unsafe-checker &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/unsafe-checker inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/k1-c/linear-tui.git --path .claude/skills/unsafe-checker

Or copy the folder to ~/.gemini/skills/unsafe-checker yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/unsafe-checker:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/k1-c/linear-tui.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/unsafe-checker &&
cp -R "$tmp/.claude/skills/unsafe-checker" ~/.copilot/skills/unsafe-checker &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/unsafe-checker inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/k1-c/linear-tui.git

Then copy linear-tui/.claude/skills/unsafe-checker into your agent's skills folder as unsafe-checker. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Unsafe usage criteria
Explains when unsafe code is justified and when it is not.
SAFETY comment conventions
Shows the expected format for SAFETY comments and unsafe function docs.
Operation requirements
Quick reference of safety conditions for pointer, transmute, extern and Send/Sync operations.
Common error fixes
Maps frequent unsafe bugs such as null dereference and data races to fixes.
Modern replacements
Suggests newer std and crate alternatives to deprecated unsafe patterns.
FFI crate guide
Lists crates for C bindings in both directions and for Python and Node.js.

Good for

  • Review an unsafe block for missing SAFETY justification
  • Check a C FFI binding for correct extern signatures and ABI
  • Audit a raw pointer based data structure for aliasing problems
  • Replace mem::uninitialized calls with MaybeUninit
  • Generate Rust bindings for a C header with bindgen

Unsafe checker FAQ

What tools does Unsafe checker need?

It is configured to use Read, Grep and Glob. It includes no scripts.

When does Unsafe checker trigger?

It applies to Rust files and triggers on keywords such as unsafe, FFI, raw pointer, transmute, extern, SAFETY comment and undefined behavior.

Which FFI crates does Unsafe checker recommend?

bindgen for C to Rust, cbindgen for Rust to C, PyO3 for Python and napi-rs for Node.js.

How do I install Unsafe checker in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/unsafe-checker to use it in all your projects, or to .claude/skills/unsafe-checker in one project.

Does Unsafe checker run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Unsafe checker?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Unsafe checker?

The closest alternatives to Unsafe checker are Rust review, Coding guidelines, Poka yoke, Blast radius and Readable cpp.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from k1-c/linear-tui

  1. Gives the agent a quick reference of Rust-specific naming, error handling and async rules

    • Open source
    • 21 GitHub stars
    • Developer tools
  2. Guides the agent to write Conventional Commits, splitting mixed changes into several

    • Open source
    • 21 GitHub stars
    • Developer tools
  3. Guides an agent through building Rust command-line tools with clap, config layers

    • Open source
    • 21 GitHub stars
    • Developer tools
  4. Guides the agent through Rust ownership, borrow and lifetime compiler errors

    • Open source
    • 21 GitHub stars
    • Developer tools
  5. Guides an agent in choosing Rust smart pointers like Box, Rc, Arc, Weak and RefCell

    • Open source
    • 21 GitHub stars
    • Developer tools
  6. Guides a Rust agent through E0596/E0499/E0502 borrow errors and interior mutability

    • Open source
    • 21 GitHub stars
    • Developer tools