cargo-fuzz

cargo-fuzz is a skill for Claude Code from marduk191/qwen3_mcp. It costs 32 tokens per session (2,883 once invoked), scanned A, a copy of cargo-fuzz, MIT.

A Rust fuzz-testing workflow for Cargo projects. It uses libFuzzer to send unexpected data to Rust code and look for crashes or other faults.

In plain words
What is it for?
Use it to initialize a fuzzing project, write a test harness, and run that harness against Rust functions that process arbitrary input.
Why use it?
It helps find failures that ordinary tests may miss, including problems in code with unsafe operations. It also handles the setup needed to run the fuzzer and sanitizers.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Part of the testing-handbook-skills plugin — 15 skills shipped together

Good fit Use it to initialize a fuzzing project, write a test harness, and run that harness against Rust functions that process arbitrary input.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/marduk191/qwen3_mcp/cargo-fuzz
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add marduk191/qwen3_mcp --skill cargo-fuzz
Clone the repo
git clone --depth 1 https://github.com/marduk191/qwen3_mcp

Made for: Claude Code.

Or install testing-handbook-skills, the plugin that ships this one along with the rest of its 15 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cargo-fuzz

README.md
[![agentmods](https://agentmods.dev/badge/skills/marduk191/qwen3_mcp/cargo-fuzz/github.svg)](https://agentmods.dev/skills/marduk191/qwen3_mcp/cargo-fuzz)
Your own site
<a href="https://agentmods.dev/skills/marduk191/qwen3_mcp/cargo-fuzz"><img src="https://agentmods.dev/badge/skills/marduk191/qwen3_mcp/cargo-fuzz/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cargo-fuzz

Your own site · 80×15
<a href="https://agentmods.dev/skills/marduk191/qwen3_mcp/cargo-fuzz"><img src="https://agentmods.dev/badge/skills/marduk191/qwen3_mcp/cargo-fuzz.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,883 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 94% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.02883
Opus 5 $0.00016 $0.01442
Sonnet 5 $0.00006 $0.00577
Haiku 4.5 $0.00003 $0.00288

Measured 12d ago against content hash 9474ddcfb3ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

cargo-fuzz scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -o fuzz/corpus/fuzz_target_1/320x240.ogg \
Origin

This is a copy

94% identical to cargo-fuzz — 7 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/testing-handbook-skills/skills/cargo-fuzz/SKILL.md · 455 lines

How it starts

The opening of the file, as written. The whole thing — 455 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

#![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:

cargo fuzz init
# Edit fuzz/fuzz_targets/fuzz_target_1.rs with your harness
cargo +nightly fuzz run fuzz_target_1

Installation

cargo-fuzz requires the nightly Rust toolchain because it uses features only available in nightly.

Prerequisites

  • Rust and Cargo installed via rustup
  • Nightly toolchain

Linux/macOS

# Install nightly toolchain
rustup install nightly

# Install cargo-fuzz
cargo install cargo-fuzz

Verification

cargo +nightly --version
cargo fuzz --version

Writing a Harness

Project Structure

cargo-fuzz works best when your code is structured as a library crate. If you have a binary project, split your main.rs into:

src/main.rs  # Entry point (main function)
src/lib.rs   # Code to fuzz (public functions)
Cargo.toml

Initialize fuzzing:

cargo fuzz init

This creates:

fuzz/
├── Cargo.toml
└── fuzz_targets/
    └── fuzz_target_1.rs

Read the full file on GitHub · 455 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 455 lines · 32 tokens per session scan A 9474ddcfb3ca

Subscribe to this mod's changes

cargo-fuzz is a skill published in the GitHub repository marduk191/qwen3_mcp (13 stars, last pushed 7mo ago), licensed MIT. It adds 32 tokens to every session and 2,883 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 94% identical to cargo-fuzz, differing in 7 lines, and is treated as a copy.