·rust-unsafe
</>

rust-unsafe

huiali/rust-skills

不安全代码与 FFI 专家。处理 unsafe, raw pointer, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, MaybeUninit, NonNull, SAFETY comment, soundness, undefined behavior, UB, 安全抽象, 裸指针, 外部函数接口, 内存布局, 未定义行为

3Installs·0Trend·@huiali

Installation

$npx skills add https://github.com/huiali/rust-skills --skill rust-unsafe

SKILL.md

| FFI 调用 C | extern "C" { fn libcmalloc(size: usize) -> mut cvoid; } | ✅ | | 实现底层抽象 | Vec, Arc 的内部实现 | ✅ | | 性能优化(已测量) | 热点代码测出瓶颈 | ⚠️ 需验证 | | 逃避借用检查 | 不知道为什么要用 | ❌ |

| G-01 | 不要用 unsafe 逃避编译器安全检查 | | G-02 | 不要盲目为性能使用 unsafe | | G-03 | 不要为类型/方法创建名为 "Unsafe" 的别名 |

| M-01 | 为 struct/tuple/enum 选择合适的内存布局 | | M-02 | 不要修改其他进程的内存变量 | | M-03 | 不要让 String/Vec 自动释放其他进程的内存 | | M-04 | 优先使用 C-API 或 Syscalls 的可重入版本 | | M-05 | 用第三方 crate 处理位域 | | M-06 | 用 MaybeUninit 处理未初始化内存 |

不安全代码与 FFI 专家。处理 unsafe, raw pointer, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, MaybeUninit, NonNull, SAFETY comment, soundness, undefined behavior, UB, 安全抽象, 裸指针, 外部函数接口, 内存布局, 未定义行为 Source: huiali/rust-skills.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/huiali/rust-skills --skill rust-unsafe
Category
</>Dev Tools
Verified
First Seen
2026-02-01
Updated
2026-02-18

Quick answers

What is rust-unsafe?

不安全代码与 FFI 专家。处理 unsafe, raw pointer, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, MaybeUninit, NonNull, SAFETY comment, soundness, undefined behavior, UB, 安全抽象, 裸指针, 外部函数接口, 内存布局, 未定义行为 Source: huiali/rust-skills.

How do I install rust-unsafe?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/huiali/rust-skills --skill rust-unsafe Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/huiali/rust-skills