harness-writing

Guide writing fuzzing harnesses across languages and fuzzing engines.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/ofelixdev/cc-kit --skill harness-writing-ofelixdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-writing
Source: https://github.com/ofelixdev/cc-kit/tree/main/template/skills/harness-writing
Command: npx skills add https://github.com/ofelixdev/cc-kit --skill harness-writing-ofelixdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides techniques and patterns for writing robust fuzzing harnesses, ensuring that fuzzers can effectively exercise target code and uncover bugs.

Core Features & Use Cases

  • Harness Design Patterns: Learn how to structure harnesses for various input types (integers, strings, complex structures).
  • Tool-Specific Guidance: Get practical advice for libFuzzer, AFL++, cargo-fuzz, and go-fuzz.
  • Use Case: When developing a new security feature, use this Skill to guide the creation of a fuzzing harness that maximizes code coverage and bug detection for the new parsing logic.

Quick Start

Use the harness-writing skill to create a minimal C++ fuzzing harness for a target function.

Frequently Asked Questions about harness-writing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a fuzzing harness for a new parsing function?

To write an effective fuzzing harness, structure your target function to accept arbitrary byte arrays and pass them to the parsing logic. This Skill provides design patterns for handling integers, strings, and complex structures to maximize code coverage and bug detection.

What is structure-aware fuzzing and when do I need it?

Structure-aware fuzzing generates valid structured data instead of random bytes to exercise complex parsing logic deeply. You need it when targeting functions requiring specific input formats, utilizing techniques like the arbitrary crate or FuzzedDataProvider for data extraction.

Does this provide guidance for writing fuzzing harnesses in Rust and Go?

Yes, it provides tool-specific guidance for Rust and Go environments. It covers using cargo-fuzz and the arbitrary crate for Rust, along with go-fuzz, ensuring you can create effective harnesses across these programming languages.

What's the best way to extract multiple data types from a single fuzzer input?

The best way to extract multiple data types is using FuzzedDataProvider or structure-aware fuzzing techniques. These methods allow structured data extraction from a single input stream, enabling interleaved fuzzing to test complex logic paths effectively.

Why does my fuzzing harness not trigger deeper code branches?

Your fuzzing harness may not trigger deeper branches due to anti-patterns like rejecting invalid inputs too early. This Skill provides troubleshooting tips and structure-aware fuzzing techniques to bypass input validation and increase code coverage.

Can I use this skill to create a minimal C++ fuzzing harness for libFuzzer?

Yes, you can use this Skill to create a minimal C++ fuzzing harness for libFuzzer. It includes tool-specific instructions for libFuzzer and AFL++, guiding you through the quick start process to effectively exercise your target code.