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.
npx skills add Redtropig/harness-anchor --skill cpp-sanitizersgit clone --depth 1 https://github.com/Redtropig/harness-anchorWrote 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.
[](https://agentmods.dev/skills/redtropig/harness-anchor/cpp-sanitizers)<a href="https://agentmods.dev/skills/redtropig/harness-anchor/cpp-sanitizers"><img src="https://agentmods.dev/badge/skills/redtropig/harness-anchor/cpp-sanitizers/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.
<a href="https://agentmods.dev/skills/redtropig/harness-anchor/cpp-sanitizers"><img src="https://agentmods.dev/badge/skills/redtropig/harness-anchor/cpp-sanitizers.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00040 | $0.01837 |
| Opus 5 | $0.00020 | $0.00919 |
| Sonnet 5 | $0.00008 | $0.00367 |
| Haiku 4.5 | $0.00004 | $0.00184 |
Grade A, and why
cpp-sanitizers 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
C/C++ Sanitizers — Runtime Bug Catchers
Sanitizers are compiler-instrumented runtime checks. They catch what static analysis can't (path-sensitive errors, race conditions, memory errors discovered at runtime). They run your normal tests under instrumentation; failures abort with a precise report.
| Sanitizer | What it catches | Slowdown |
|---|---|---|
| ASan (Address) | Use-after-free, heap/stack overflow, leaks (leaks: Linux only) | 2-3x |
| UBSan (UB) | Signed overflow, null deref, misaligned, OOB shift, ... (MSVC: unavailable — see Platform notes) | ~1.1x |
| TSan (Thread) | Data races, deadlocks (not available on Windows — see Platform notes) | 5-10x |
| MSan (Memory) | Use of uninitialized memory | 3x (Linux only, Clang only) |
Note: ASan + UBSan are combinable. TSan is mutually exclusive with ASan/MSan.
The /sanitize command
/sanitize automates the ASan+UBSan build+test flow below and reports findings in a fixed
structure (Build / Tests / Findings / Verdict / Recommendation) with a .harness-anchor/sanitize-*.log
evidence path. Reach for it for a one-shot run; read on to understand what it does, how to
read the output, and how to suppress known third-party noise. Run TSan separately — it cannot
share a build with ASan.
Prerequisites
- Clang or recent GCC (
-fsanitize=family supported since GCC 4.8 / Clang 3.1+) - A separate sanitizer build directory (don't mix configs)
- Tests that actually exercise the suspect code paths — and that the runner actually runs: a
sanitizer build only catches UB on paths its tests execute, so a binary built but never
add_test-registered is silently skipped (a false "clean"). Use/test-planto find such run-scope gaps before trusting a clean result.
Standard build setup
ASan + UBSan (most useful default)
# CMake
cmake -S . -B .build/asan \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g -O1" \
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
cmake --build .build/asan
ctest --test-dir .build/asan --output-on-failure
What ships with it
2 files 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.
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.
- 9d ago First seen · 164 lines · 40 tokens per session scan A f6c1ca1d9511
cpp-sanitizers is a skill published in the GitHub repository Redtropig/harness-anchor (13 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 1,837 once invoked, about $0.0002 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.
Other skills, from other repositories
cmd_cpp_build
Fix C++ build errors, CMake issues, and linker problems incrementally. Invokes the cpp-build-resolver agent for minimal, surgical fixes.
error-handling
Apply error handling and recovery patterns in JavaScript/TypeScript or Node.js. Use when implementing error handling, retry logic, or when the user mentions domain errors, error recovery, error escalation.
cpp
Use when writing modern C++ (17/20/23). Covers RAII, smart-pointer ownership, move semantics, ranges, concepts, and eliminating undefined behavior with sanitizers.
zephyr-json
JSON serialization and deserialization in Zephyr RTOS using the descriptor-based JSON library. Use when encoding C structs to JSON strings, parsing JSON into C structs, working with nested objects or arrays, handling cloud/IoT protocols (MQTT, HTTP, CoAP payloads), or implementing REST APIs on embedded devices.
unreal-cpp
A safety guide for writing Unreal Engine C++ and Blueprint code involving engine objects, memory cleanup, reflection, and frame updates.
gdb
Debug and trace C/C++/Rust programs with the GNU Debugger (GDB) without blocking the agent. Use when you need to set tracepoints, inspect variables, or monitor a running process while staying responsive to the user.