cargo-fuzz

cargo-fuzz is a skill for Claude Code, Codex from OutlineDriven/odin-claude-plugin. It costs 40 tokens per session (1,570 once invoked), scanned A, a copy of cargo-fuzz, Apache-2.0.

A guide for using cargo-fuzz to create, run, measure, and investigate fuzz tests in a Rust package. cargo-fuzz is a Rust tool that sends many varied inputs to code to find crashes and other failures.

In plain words
What is it for?
Use it when setting up or operating a cargo-fuzz target, measuring its coverage, or reproducing a selected failure in a Rust crate.
Why use it?
It provides a defined local workflow for fuzz targets, input collections, crash files, coverage reports, and the Rust toolchain needed to run them.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the odin-fuzzing plugin — 12 skills shipped together

Good fit Use it when setting up or operating a cargo-fuzz target, measuring its coverage, or reproducing a selected failure in a Rust crate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/outlinedriven/odin-claude-plugin/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 OutlineDriven/odin-claude-plugin --skill cargo-fuzz
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/odin-claude-plugin

Made for: Claude Code, Codex.

Or install odin-fuzzing, the plugin that ships this one along with the rest of its 12 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/outlinedriven/odin-claude-plugin/cargo-fuzz/github.svg)](https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/cargo-fuzz)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/odin-claude-plugin/cargo-fuzz"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/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/outlinedriven/odin-claude-plugin/cargo-fuzz"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-claude-plugin/cargo-fuzz.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,570 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 91% 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.00040 $0.01570
Opus 5 $0.00020 $0.00785
Sonnet 5 $0.00008 $0.00314
Haiku 4.5 $0.00004 $0.00157

Measured 3d ago against content hash 19e34f5b8112, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

cargo-fuzz scanned grade A with 0 findings 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 3d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

91% identical to cargo-fuzz — 0 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.

plugins/odin-fuzzing/skills/cargo-fuzz/SKILL.md · 64 lines

How it starts

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

cargo-fuzz

Contract

Field Bound contract
Trigger User needs to initialize, run, measure, or triage a cargo-fuzz target in a Rust crate.
Authority Reversible local: writes only the fuzz/ workspace, corpus, artifact, and coverage output directories under the target crate, plus src/ edits needed to expose a library target (e.g., moving code from src/main.rs to src/lib.rs) and nightly toolchain and cargo-fuzz installation via rustup and cargo install; rollback is removing fuzz/, reverting src/ edits, and uninstalling the added toolchain or tool. No remote mutation.
Side effect Creates and mutates Rust fuzz targets, corpus files, crash artifacts, coverage reports, and src/ layout on the local filesystem. Installs nightly Rust and cargo-fuzz if absent. No remote, credential, or VCS mutation.
Done The named cargo-fuzz target runs under the intended sanitizer and reproduces any selected artifact.

Inputs

  • Target crate path (required): the Cargo crate to fuzz, containing a library target.
  • Fuzz target name (required for run/coverage/triage; generated by init): the name under fuzz/fuzz_targets/.
  • Sanitizer choice (optional, default address): one of address, thread, memory, none. Use none only for pure safe Rust with no unsafe in the dependency tree.
  • Crash artifact path (optional, for triage): a file under fuzz/artifacts/<target>/.
  • Source filter (optional, for coverage): one or more src/*.rs paths to scope the HTML report, loaded into the SRC_FILTER array.

Procedure

  1. Install the nightly toolchain and cargo-fuzz with rustup install nightly and cargo install cargo-fuzz. Confirm both are installed with cargo +nightly --version and cargo fuzz --version. cargo-fuzz requires nightly because it relies on unstable compiler features and libFuzzer integration. Done when: nightly and cargo-fuzz are installed and confirmed.
  2. Ensure the target crate exposes a library target. If the project is binary-only, move reusable code from src/main.rs into src/lib.rs so the fuzz harness can call it. Done when: the crate exposes a library target.
  3. Initialize the fuzz workspace: cargo fuzz init. This creates fuzz/Cargo.toml and fuzz/fuzz_targets/fuzz_target_1.rs. Done when: the fuzz workspace is initialized.
  4. Write the harness in the generated fuzz target file using the fuzz_target! macro with #![no_main]:
    #![no_main]
    use libfuzzer_sys::fuzz_target;
    
    fuzz_target!(|data: &[u8]| {
        your_project::target_function(data);
    });
    
    Handle Result::Err gracefully inside the harness, and keep the harness deterministic with no RNG. For structure-aware fuzzing, derive Arbitrary on a type in the library crate (#[derive(Debug, Arbitrary)]) and add arbitrary = { version = "1", features = ["derive"] } to the library Cargo.toml. Use that type as the fuzz_target! parameter instead of &[u8]. Done when: the harness is written with deterministic behavior and graceful error handling.
  5. Run the campaign: cargo +nightly fuzz run <target>. AddressSanitizer is enabled by default. To disable it for pure safe Rust, first verify no unsafe code with cargo install cargo-geiger && cargo geiger, then run cargo +nightly fuzz run --sanitizer none <target> for approximately 2x throughput. Done when: the campaign is running or completed under the chosen sanitizer.
  6. Reproduce a crash artifact: cargo +nightly fuzz run <target> fuzz/artifacts/<target>/crash-<hash>. To replay the full corpus without fuzzing: cargo +nightly fuzz run <target> fuzz/corpus/<target> -- -runs=0. Pass libFuzzer options after -- (e.g. -timeout=10, -max_len=1024, -dict=dict.dict). Done when: the artifact is reproduced or the corpus is replayed.
  7. Measure coverage: install rustup toolchain install nightly --component llvm-tools-preview, cargo install cargo-binutils, and cargo install rustfilt. Run cargo +nightly fuzz coverage <target>. Generate the HTML report:
    HOST=$(rustc -vV | sed -n 's|host: ||p')
    cargo +nightly cov -- show -Xdemangler=rustfilt \
      "target/$HOST/coverage/$HOST/release/<target>" \
      -instr-profile="fuzz/coverage/<target>/coverage.profdata" \
      -show-line-counts-or-regions -show-instantiations \
      -format=html -o fuzz_html/ ${SRC_FILTER[@]+"${SRC_FILTER[@]}"}
    
    Leave SRC_FILTER unset when no source filter is supplied. Done when: the HTML coverage report is generated under fuzz_html/.

Read the full file on GitHub · 64 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 64 lines · 40 tokens per session scan A 19e34f5b8112

Subscribe to this mod's changes

cargo-fuzz is a skill published in the GitHub repository OutlineDriven/odin-claude-plugin (35 stars, last pushed 2d ago), licensed Apache-2.0. It adds 40 tokens to every session and 1,570 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to cargo-fuzz, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens