fuzz-testing

fuzz-testing is a skill for Claude Code, Codex from sbom-tool/gh-guard. It costs 22 tokens per session (2,128 once invoked), scanned A, original, MIT.

A guide to fuzz testing Rust code by feeding it many generated inputs. It uses cargo-fuzz, a Rust tool around libFuzzer, and records useful inputs in a corpus for later runs.

In plain words
What is it for?
Use it to create fuzz targets for parsers and other APIs, manage seed inputs, and run fuzzing in continuous integration.
Why use it?
Random inputs can reveal crashes, memory errors, and logic bugs that fixed unit-test examples may miss.

Skill for Claude CodeCodex

Part of the gh-guard plugin — 14 skills, 5 commands shipped together

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.

agentmods
npx agentmods add skills/sbom-tool/gh-guard/fuzz-testing
Any agent
npx skills add sbom-tool/gh-guard --skill fuzz-testing
Clone the repo
git clone --depth 1 https://github.com/sbom-tool/gh-guard

Made for: Claude Code, Codex.

Or install gh-guard, the plugin that ships this one along with the rest of its 14 skills, 5 commands.

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 fuzz-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/sbom-tool/gh-guard/fuzz-testing.svg)](https://agentmods.dev/skills/sbom-tool/gh-guard/fuzz-testing)
Your own site
<a href="https://agentmods.dev/skills/sbom-tool/gh-guard/fuzz-testing"><img src="https://agentmods.dev/badge/skills/sbom-tool/gh-guard/fuzz-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,128 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00022 $0.02128
Opus 5 $0.00011 $0.01064
Sonnet 5 $0.00004 $0.00426
Haiku 4.5 $0.00002 $0.00213

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

Security

Grade A, and why

fuzz-testing 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.

skills/fuzz-testing/SKILL.md · 274 lines

How it starts

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

Fuzz Testing for Rust Projects

Coverage-guided fuzzing uses libFuzzer to generate random inputs that exercise code paths, catching panics, buffer overflows, and logic bugs that unit tests miss. Rust's cargo-fuzz wraps libFuzzer with a Cargo-native workflow.

Getting Started

Install and initialize:

cargo install cargo-fuzz --locked
cargo fuzz init                    # creates fuzz/ directory
cargo fuzz add parse_input         # creates a fuzz target

Directory structure after init:

fuzz/
  Cargo.toml              # workspace member with [[bin]] per target
  corpus/
    parse_input/           # seed corpus for each target
  fuzz_targets/
    parse_input.rs         # fuzz harness source

The fuzz/Cargo.toml declares each target as a [[bin]] entry and depends on your crate via path = "..".

Writing Effective Fuzz Targets

Basic &[u8] Harness

The simplest form — feed raw bytes to your parser:

#![no_main]
use libfuzzer_sys::fuzz_target;
use my_crate::parse;

fuzz_target!(|data: &[u8]| {
    let _ = parse(data);
});

Structured Harness with Arbitrary

For APIs that take structured types, derive Arbitrary to generate valid inputs:

#![no_main]
use libfuzzer_sys::fuzz_target;
use arbitrary::Arbitrary;

#[derive(Arbitrary, Debug)]
struct FuzzInput {
    header: u8,
    payload: Vec<u8>,
    flag: bool,
}

fuzz_target!(|input: FuzzInput| {
    my_crate::process(input.header, &input.payload, input.flag);
});

Add arbitrary as a dependency in fuzz/Cargo.toml:

[dependencies]
arbitrary = { version = "1", features = ["derive"] }

Common Target Types

Target Type Input Strategy What It Finds
Parser &[u8] or &str Panics, infinite loops, stack overflows
Serializer Roundtrip: deserialize then re-serialize Data corruption, lossy encoding
Unsafe code Structured inputs targeting unsafe blocks Memory safety violations
Format handler File-like &[u8] (image, binary format) Buffer overflows, OOB reads
State machine Sequence of Arbitrary operations Invalid state transitions, panics

Read the full file on GitHub · 274 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. 3d ago First seen · 274 lines · 22 tokens per session scan A b3677254948a

Subscribe to this mod's changes

fuzz-testing is a skill published in the GitHub repository sbom-tool/gh-guard (15 stars, last pushed 5mo ago), licensed MIT. It adds 22 tokens to every session and 2,128 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.