Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Redtropig/harness-anchor/plugin install 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/commands/redtropig/harness-anchor/sanitize)<a href="https://agentmods.dev/commands/redtropig/harness-anchor/sanitize"><img src="https://agentmods.dev/badge/commands/redtropig/harness-anchor/sanitize/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/commands/redtropig/harness-anchor/sanitize"><img src="https://agentmods.dev/badge/commands/redtropig/harness-anchor/sanitize.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.00072 | $0.01499 |
| Opus 5 | $0.00036 | $0.00749 |
| Sonnet 5 | $0.00014 | $0.00300 |
| Haiku 4.5 | $0.00007 | $0.00150 |
Grade A, and why
sanitize 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 8d 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 — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/sanitize
Build the project under runtime sanitizers, run its tests, and report findings in a fixed structure — so the result is parseable and honest about what was actually run.
Why a command, not a hook: a sanitizer build+test cycle takes minutes, far beyond
the ≤5s warn-only hook budget (CLAUDE.md invariants #4 and #7). PostToolUse may suggest
/sanitize after a C/C++ source change, but it must never run sanitizers inline.
Steps
-
Detect C/C++ and the build system:
bash ${CLAUDE_PLUGIN_ROOT}/scripts/cpp-detect.shParse the JSON. If
is_cpp_projectisfalse, refuse —/sanitizeis C/C++ only. Recordbuild_system(cmake / meson / make / bazel). -
Locate (or materialize) the sanitizer build script:
- If
scripts/sanitizer-build.shalready exists (dropped by/cpp-init), use it. - Else if
build_system == cmake, AskUserQuestion to materialize it from${CLAUDE_PLUGIN_ROOT}/templates/cpp/sanitizer-build.sh.tpl→scripts/sanitizer-build.sh, thenchmod +x. Never overwrite a non-empty existing file without asking (same overwrite policy as/anchorand/cpp-init). - Else (meson / make / bazel): there is no canned script — use the build-system recipe
from the
cpp-sanitizersskill, or ask the user for the exact command.
- If
-
Pick the configuration (ASan+UBSan and TSan are mutually exclusive — never one build):
- Default: ASan + UBSan — combinable, covers the most ground (memory errors + UB).
- For a hang, an intermittent failure, or a suspected data race, run TSan in a separate build dir instead. If the symptom is ambiguous, AskUserQuestion which to run.
- Windows: TSan is unavailable on Windows toolchains — if TSan is requested or
indicated, report Verdict INFRA-FAIL with: "TSan is unavailable on Windows;
run the TSan arm under WSL2 or Linux CI, or use Intel Inspector for native race
detection" (see
cpp-sanitizers→platform/windows.md). ASan+UBSan proceed normally with clang/MinGW; under pure MSVC only ASan is available (UBSan flags will fail at configure — that too is INFRA-FAIL, not CLEAN).
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.
- 8d ago First seen · 109 lines · 72 tokens per session scan A 0ee20ee74493
sanitize is a command published in the GitHub repository Redtropig/harness-anchor (13 stars, last pushed 1mo ago), licensed MIT. It adds 72 tokens to every session and 1,499 once invoked, about $0.0004 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 commands, from other repositories
test-tdd
Run when user calls /test-tdd. Scans modified files, locates their corresponding unit/integration test suites, and runs them.
ci-debug
Diagnose a failing CI run against an 11-pattern playbook. Classifies the failure, cites the relevant memory entry, proposes the exact fix command — but NEVER applies without explicit user approval. Use when a specific PR check or GitHub Actions run failed and you want a diagnosis instead of speculation. Don't use for…
fire-verify-uat
Conversational User Acceptance Testing with automatic parallel diagnosis on failures.
simplify-fn
Refactor a complex function to reduce cyclomatic complexity.
fix-test
Auto-diagnose and fix failing tests — identifies root causes and applies fixes.
bug
Reproduce then TDD-fix a ready-for-agent bug ticket in this checkout. Web bugs get a browser repro first.