- Home
- Skills
- Agents & Orchestration
- Rust Safety Rules
Rust Safety Rules
Enforce memory safety, FFI soundness, and panic-free library patterns in Rust codebases.
$6.99
Works with the AI tools you already use
Rust Safety Rules
Example session with this skill installed
Review this FFI wrapper. I added an unsafe Send impl to move the raw pointer between threads and a bytes method to get a slice. It occasionally crashes.
- Read your context and instructions
- Compiled the rust safety rules
Safety scope
FFI wrapper for raw pointers.
Findings
- sensor.rs — Unsafe rule 1. Missing SAFETY comment.
- sensor.rs — Send rule 2. Unsafe impl Send has no written proof.
Patch
// [Patched code with NonNull and SAFETY comments]
Audit notes
- Run cargo +nightly miri test.
Connects securely to your tools. The creator never sees your data.
What you get
About this skill
The problem
The Rust compiler handles most safety checks, but it cannot verify the invariants inside unsafe blocks, the soundness of FFI wrappers, or hand-written Send and Sync implementations. These blind spots often lead to rare, hard-to-debug segfaults and undefined behavior in production.
What it does
- Enforces mandatory SAFETY comments for every unsafe block that explain the invariant being relied upon.
- Audits ownership patterns to identify when borrow checker struggles indicate a design flaw rather than a syntax error.
- Flags prohibited panics, unwraps, and expects in library code to prevent process crashes for callers.
- Verifies that unsafe functions include proper safety sections in doc comments for downstream callers.
- Reviews hand-written thread-safety claims (Send/Sync) and demands written proof of synchronization.
Frameworks & tools
Rust (2021 and 2024 editions), Cargo, thiserror, anyhow, and cargo-deny.
Why this beats prompting it yourself
Generic LLMs often suggest fixes that simply silence the compiler without addressing underlying soundness issues. This skill follows a strict "Trigger Matrix" to catch subtle signals like mutex guards crossing await points or missing raw pointer invariants that standard prompting misses.
Use cases
- Reviewing FFI wrappers to ensure C pointers are handled safely before dereferencing.
- Refactoring library code to replace panics with robust error handling using thiserror.
- Auditing thread-safety implementations in systems-level concurrency primitives.
- Cleaning up "reflexive cloning" and improper interior mutability patterns.
Known limitations
It cannot run cargo commands, Miri, or tests. It only reviews and edits code within the editor based on static analysis of the provided text.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean 1 month ago
- Passed all security checks, Safe to install