# Unsafe checker

> Unsafe checker is an open-source agent skill for developer tools. Reviews unsafe Rust code and FFI boundaries for SAFETY comments and soundness. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/k1-c/linear-tui/tree/main/.claude/skills/unsafe-checker
- **Repository:** https://github.com/k1-c/linear-tui
- **GitHub stars:** 21
- **License:** MIT
- **Skill name:** unsafe-checker
- **Collection:** https://github.com/k1-c/linear-tui
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-02

## About

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 绑定, 未定义行为

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/unsafe-checker)
- [Asks for: Read, Grep, Glob](https://github.com/k1-c/linear-tui/blob/HEAD/.claude/skills/unsafe-checker/SKILL.md)
- [License: MIT](https://github.com/k1-c/linear-tui/tree/HEAD/.claude/skills/unsafe-checker)

## Features

- **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

## Install

### Claude Code

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

```sh
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.

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

## 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, Go defensive coding, M11 ecosystem and M15 anti pattern.

## Where this comes from

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

## Alternatives

- [Rust review](https://ai-powered.com/skills/rust-review): Rust review is an open-source agent skill for security.
- [Coding guidelines](https://ai-powered.com/skills/coding-guidelines): Coding guidelines is an open-source agent skill for developer tools.
- [Go defensive coding](https://ai-powered.com/skills/go-defensive-coding): Go defensive coding is an open-source agent skill for developer tools.
- [M11 ecosystem](https://ai-powered.com/skills/m11-ecosystem): M11 ecosystem is an open-source agent skill for developer tools.
- [M15 anti pattern](https://ai-powered.com/skills/m15-anti-pattern): M15 anti pattern is an open-source agent skill for developer tools.
- [Poka yoke](https://ai-powered.com/skills/poka-yoke): Poka yoke is an open-source agent skill for developer tools.
- [Blast radius](https://ai-powered.com/skills/blast-radius-michael-denyer): Blast radius is an open-source agent skill for developer tools.
- [M06 error handling](https://ai-powered.com/skills/m06-error-handling): M06 error handling is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/unsafe-checker
