Agent skill · Backend & API

cargo-fuzz

cargo-fuzz is the de facto fuzzing tool for Rust projects using Cargo. Use for fuzzing Rust code with libFuzzer backend.

trailofbitsgithub.com/trailofbitsGitHub ↗
claude-codeCC-BY-SA-4.0
Install
npx skills add trailofbits/skills --skill cargo-fuzz --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 3
SKILL.md size: 11 KB
Bundled scripts: none
Path: plugins/testing-handbook-skills/skills/cargo-fuzz/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 6,426
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# cargo-fuzz cargo-fuzz is the de facto choice for fuzzing Rust projects when using Cargo. It uses libFuzzer as the backend and provides a convenient Cargo subcommand that automatically enables relevant compilation flags for your Rust project, including support for sanitizers like AddressSanitizer. ## When to Use cargo-fuzz is currently the primary and most mature fuzzing solution for Rust projects using Cargo. | Fuzzer | Best For | Complexity | |--------|----------|------------| | cargo-fuzz | Cargo-based Rust projects, quick setup | Low | | AFL++ | Multi-core fuzzing, non-Cargo projects | Medium | | LibAFL | Custom fuzzers, research, advanced use cases | High | **Choose cargo-fuzz when:** - Your project uses Cargo (required) - You want simple, quick setup with minimal configuration - You need integrated sanitizer support - You're fuzzing Rust code with or without unsafe blocks ## Quick Start ```rust #![no_main] use libfuzzer_sys::fuzz_target; fn harness(data: &[u8]) { your_project::check_buf(data); } fuzz_target!(|data: &[u8]| { harness(data); }); ``` Initialize and run: ```bash cargo fuzz init # Edit fuzz/fuzz_targets/fuzz_target_1.rs with your harness cargo +nightly fuzz run fu

What's inside
Steps it walks through
  1. When to Use
  2. Quick Start
  3. Installation
  4. Prerequisites
  5. Linux/macOS
  6. Verification
  7. Writing a Harness
  8. Project Structure
  9. Harness Structure
  10. Harness Rules
  11. Structure-Aware Fuzzing
  12. Running Campaigns
  13. Basic Run
  14. Without Sanitizers (Safe Rust)
Ships with 2 files
  • agents/openai.yaml
  • assets/trail-of-bits-mark.svg
Commands it runs
cargo fuzz init
Edit fuzz/fuzz_targets/fuzz_target_1.rs with your harness
cargo +nightly fuzz run fuzz_target_1
Install nightly toolchain
rustup install nightly
Install cargo-fuzz
cargo install cargo-fuzz
cargo +nightly --version
cargo fuzz --version
cargo +nightly fuzz run --sanitizer none fuzz_target_1
More from skills
All skills →
About this skill
What does the cargo-fuzz skill do?

cargo-fuzz is the de facto fuzzing tool for Rust projects using Cargo. Use for fuzzing Rust code with libFuzzer backend.

How do I install it?

Run `npx skills add trailofbits/skills --skill cargo-fuzz --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From trailofbits/skills, a repository with 6,426 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going