Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

cargo-fuzz — Claude Code skill: what it does, how to install

Sets up cargo-fuzz inside a Cargo-based Rust crate and walks through the harness, sanitizers and crash triage.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill cargo-fuzz -a claude-code
Open on GitHub

What cargo-fuzz does

The skill brings cargo-fuzz into a project and keeps you on the rails: cargo fuzz init drops a fuzz/ directory with its own Cargo.toml and a stub harness at fuzz/fuzz_targets/fuzz_target_1.rs. libFuzzer does the fuzzing, and the Cargo subcommand turns on the compile flags you would otherwise wire up by hand, AddressSanitizer included. ASan is on by default.

Harnesses use the fuzz_target! macro rather than a hand-written main. For structured inputs the skill points at the arbitrary crate: derive Arbitrary on a type, then let that type be the closure argument. Fuzzing wants a library crate, so a binary project gets split into main.rs and lib.rs first — leave everything in main.rs and there is nothing clean to wrap.

Nightly is not optional. Skip rustup install nightly and cargo +nightly fuzz run will not build. With no unsafe in your code or dependencies, --sanitizer none drops the sanitizer overhead; cargo geiger tells you whether that applies. Crashes land in fuzz/artifacts/fuzz_target_1/ and replay by passing the artifact file after the target name.

What it helps with

  • start fuzzing a Cargo crate without hand-tuning build flags
  • wrap a fuzz_target! harness around unsafe blocks or FFI
  • replay a single crash from fuzz/artifacts/fuzz_target_1/
  • re-run the corpus without fuzzing via -- -runs=0
  • generate coverage from the corpus to find untouched lines

Example prompts for the agent

  • Set up cargo-fuzz in this crate and fill in `fuzz/fuzz_targets/fuzz_target_1.rs` for `parse_header`.
  • Run `cargo +nightly fuzz run fuzz_target_1` and tell me which input crashed.
  • Reproduce this crash artifact and suggest a fix in `src/lib.rs`.

How to install cargo-fuzz

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill cargo-fuzz -a claude-code

2Manually: put the files in place

~/.claude/skills/cargo-fuzz/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cargo-fuzz/

From the same set35

The whole set →
semgrep trailofbits Runs a Semgrep static security audit on your codebase. It presents a plan for user confirmation and merges all findings into SARIF. Claude Code CX Codex Cursor +1 9,500installs differential-review trailofbits Reviews code changes for security issues using Git history and test coverage. Use it for commits, diffs, and pull requests that need a written review report. Claude Code CX Codex Cursor +1 8,800installs modern-python trailofbits Configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. Claude Code CX Codex Cursor +1 8,700installs secure-workflow-guide trailofbits Guides smart contracts through Trail of Bits' 5-step security audit on check-in or before deployment. It runs static analysis, generates visual charts, and prepares fuzzing tests. Claude Code CX Codex Cursor +1 7,400installs sharp-edges trailofbits Audits API designs and configuration schemas for developer footguns. Flags dangerous defaults and fragile interfaces where the easiest path causes security vulnerabilities. Claude Code CX Codex Cursor +1 6,900installs agentic-actions-auditor trailofbits Inspects GitHub Actions workflows for prompt injection risks and insecure AI agent setups. Catches attacker inputs leaking into prompts via event contexts or environment variables. Claude Code CX Codex Cursor +1 6,700installs gh-cli trailofbits A skill that redirects GitHub requests from curl and fetch to authenticated gh CLI for repositories, pull requests, and issues. Use it for private repos and higher API limits. Claude Code CX Codex Cursor +1 6,600installs variant-analysis trailofbits Finds related occurrences of an already identified defect across a repository. Use it after a vulnerability or logic issue turns up and similar code needs checking. Claude Code CX Codex Cursor +1 6,400installs

Similar

fix-merge-conflicts cursor Resolves merge conflicts in a branch, then checks the build and tests before wrapping up. Use it when several conflicted files need focused fixes without a refactor. Claude Code CX Codex Cursor +1 2,700installs visual-verdict Yeachan-Heo A visual QA skill that compares generated UI screenshots against reference images and returns a structured JSON verdict for layout iterations. Claude Code CX Codex Cursor +1 890installs ai-debt-detector Adit Jain This skill audits AI-generated code for missed failure paths, orphaned resources, fake dependencies, and architecture drift before a merge. Claude Code CX Codex Cursor 2,900installs arize-experiment official arize Runs Arize experiments with the ax CLI to benchmark models and export evaluation scores across dataset versions. GitHub Copilot 1,100installs arize-evaluator official arize Runs LLM-as-judge workflows in Arize for spans and experiments, with evaluator management, task control, column mapping, and continuous monitoring. GitHub Copilot 1,100installs arize-dataset official arize This skill manages Arize datasets and examples through ax. Use it for test sets, evaluation examples, and dataset exports. GitHub Copilot 1,100installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. Claude Code 1,163,035installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. Claude Code CX Codex Cursor +1 673,100installs

Questions about cargo-fuzz

How do I install the cargo-fuzz skill in Claude Code?

One command: npx skills add trailofbits/skills --skill cargo-fuzz -a claude-code. The skill file then sits at ~/.claude/skills/cargo-fuzz/SKILL.md.

What does this skill do?

It sets up and runs cargo-fuzz for a Rust crate: initialisation, a fuzz_target! harness, structured inputs through arbitrary, sanitizer choice and replaying a crash artifact.

What do I need before it works?

Rust and Cargo installed through rustup, the nightly toolchain (rustup install nightly) and the tool itself (cargo install cargo-fuzz). Coverage adds llvm-tools-preview, cargo-binutils and rustfilt.

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor