Skip to main content
skill CX Codex

address-sanitizer — Claude Code skill: what it does, how to install

This skill gives an agent a routine for building code with -fsanitize=address, reading ASan reports and freeing the fuzzer from memory caps. Aimed at C/C++ and Rust with unsafe blocks.

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

What address-sanitizer does

The skill walks an agent through an AddressSanitizer build: compile with -fsanitize=address plus -g, set ASAN_OPTIONS, then read the report to find the overflow or the read after free. It ships a step-by-step procedure, a short table of options (verbosity, abort_on_error, detect_leaks) and separate notes for libFuzzer, AFL++ and cargo-fuzz.

ASan reserves around 20TB of virtual address space, so the fuzzer's memory cap has to go: -rss_limit_mb=0 under libFuzzer, -m none under AFL++. Leave the cap in place and the runner kills the process at startup, which reads like a crash in your own code. Rust goes through --sanitizer=address in cargo fuzz.

Expect the build to run about 2-4 times slower. Windows support is experimental, macOS partial. Production is the wrong place for such a binary: it is slower and not safer, so keep it for tests and fuzzing runs. Pure Go or Java gains little here.

What it helps with

  • build a C or C++ target under -fsanitize=address
  • read an ASan stack trace down to the offending line
  • stop a fuzzer from dying on ASan's virtual memory demand
  • turn on leak detection for a unit test suite
  • add ASan to a Rust crate that leans on unsafe blocks

Example prompts for the agent

  • Build harness.cc with -fsanitize=fuzzer,address -g and run it with -rss_limit_mb=0
  • Here is the ASan report — which line is the use-after-free on?
  • Add --sanitizer=address to our cargo-fuzz target and check what the leak report says

How to install address-sanitizer

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill address-sanitizer -a claude-code

2Manually: put the files in place

~/.claude/skills/address-sanitizer/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/address-sanitizer/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about address-sanitizer

How do I install address-sanitizer in Claude Code?

Run npx skills add trailofbits/skills --skill address-sanitizer -a claude-code. The skill lands at ~/.claude/skills/address-sanitizer/SKILL.md.

What does address-sanitizer do?

It hands the agent a working routine for ASan builds: compiler flags, ASAN_OPTIONS, report reading, and the fuzzer settings that keep the process alive long enough to find something.

Does it work on Windows and macOS?

Windows support is experimental and macOS is partial, with some features not working. Linux is where ASan is fully supported.

Similar skills

Everything for Testing and QA →

From the same set77

fuzzing-dictionary Generates and connects token dictionaries for parsers and protocols in libFuzzer or AFL++ when coverage stalls on initial checks. CX Codex +1 5,300installs semgrep-rule-variant-creator Ports completed Semgrep rules to selected languages and creates separate rule and test directories. Use it when you already have a rule to adapt. CX Codex +1 5,300installs cosmos-vulnerability-scanner Finds vulnerabilities in Cosmos SDK modules and CosmWasm contracts that halt a chain or drain funds. Useful before a network goes live. CX Codex +1 5,300installs fuzzing-obstacles Patches anti-fuzzing patterns like checksums and time-seeded PRNGs in C, C++, and Rust. Useful when fuzzers get stuck on early validation checks. CX Codex +1 5,300installs substrate-vulnerability-scanner Scans Substrate and Polkadot pallets for 7 critical vulnerabilities such as panic DoS and integer overflow. Useful when auditing FRAME runtimes before mainnet launch. CX Codex +1 5,200installs atheris Guides setup of coverage-guided fuzzing for Python code and C extensions with Atheris. Use it to investigate crashes and memory corruption. CX Codex +1 5,200installs ossfuzz Guides your AI agent through enrolling projects in Google OSS-Fuzz and running fuzzer targets locally with helper scripts. CX Codex +1 5,200installs devcontainer-setup Creates a sandboxed devcontainer with Claude Code, persistent volumes, and tooling for Python, Node, Rust, or Go. Helpful when setting up isolated development workspaces. CX Codex +1 5,200installs

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