claudemd-bypass-audit

claudemd-bypass-audit is a command for Claude Code from sdsrss/claudemd. It costs 66 tokens per session (802 once invoked), scanned A, original, MIT.

A command that checks whether an agent used memories suggested by claudemd during recent coding sessions. It compares memory suggestions with later transcript activity and calculates how often they were applied or bypassed.

In plain words
What is it for?
Use it to audit memory suggestions over a chosen number of days and inspect summary, per-memory, or per-session results.
Why use it?
It shows whether stored project guidance is actually being read or cited, instead of leaving that effectiveness unknown.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: reads .claude/ paths.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the claudemd plugin — 16 commands, 6 hooks shipped together

Good fit Use it to audit memory suggestions over a chosen number of days and inspect summary, per-memory, or per-session results.

Compare 6 commands from other repositories ↓
Install

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.

Claude Code
/plugin marketplace add sdsrss/claudemd
Claude Code
/plugin install claudemd

Made for: Claude Code.

Or install claudemd, the plugin that ships this one along with the rest of its 16 commands, 6 hooks.

Wrote 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.

agentmods badge for claudemd-bypass-audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-bypass-audit/github.svg)](https://agentmods.dev/commands/sdsrss/claudemd/claudemd-bypass-audit)
Your own site
<a href="https://agentmods.dev/commands/sdsrss/claudemd/claudemd-bypass-audit"><img src="https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-bypass-audit/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.

agentmods 80×15 button for claudemd-bypass-audit

Your own site · 80×15
<a href="https://agentmods.dev/commands/sdsrss/claudemd/claudemd-bypass-audit"><img src="https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-bypass-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 802 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00066 $0.00802
Opus 5 $0.00033 $0.00401
Sonnet 5 $0.00013 $0.00160
Haiku 4.5 $0.00007 $0.00080

Measured 9d ago against content hash 1e2a64e85b17, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

claudemd-bypass-audit 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.

commands/claudemd-bypass-audit.md · 42 lines

What it actually says

Default window is 30 days. The script answers one question: when claudemd's memory-prompt-hint hook surfaced a relevant memory to the agent, did the agent actually read or cite it?

$ARGS parsing: same shape as /claudemd-rules — split $ARGS into a numeric day-count and an optional --verbose agent-presentation flag (NOT a script flag — the script ignores it):

$ARGS value CLAUDEMD_BYPASS_DAYS env Agent output
(empty) unset (script uses default 30) summary only
7 7 summary only
--verbose unset summary + full perMemory + perSession
90 --verbose 90 summary + full per-memory and per-session breakdown

Run: CLAUDEMD_BYPASS_DAYS=<numeric-from-$ARGS-or-30> node ${CLAUDE_PLUGIN_ROOT}/scripts/lesson-bypass-audit.js --json

(--cwd defaults to the current working directory, which is what you want when auditing the project the agent is running in.)

The JSON contains:

Field Meaning
totalSuggestEvents distinct UserPromptSubmit events where the hook surfaced ≥1 memory
totalSuggestions sum of suggested filenames across all events (one event can surface up to 5)
totalApplied suggestions where the filename appeared in the session transcript after the suggest timestamp
totalBypassed suggestions where the filename never appeared post-suggest
totalMissingTranscript suggestions whose session transcript was absent (deleted / synthetic / cwd mismatch) — separated from applied/bypassed so the operator can size the unmeasurable fraction
citeRecall applied / (applied + bypassed); null when no measurable data
bypassRate bypassed / (applied + bypassed); the inverse of cite-recall
perMemory per-filename {applied, bypassed, missingTranscript}
perSession per-session-id same shape, plus transcriptMissing: bool

Format: lead with citeRecall, bypassRate, and the top-5 bypassed memories. Suppress full perMemory / perSession arrays unless $ARGS contained --verbose.

Reading the signal:

  • citeRecall ≥ 60% over 30d with ≥20 measurable events = R3 Step 2 working as designed; cite-#NN contract loop is observable.
  • citeRecall < 30% consistently = either (a) suggestions are too noisy (FP rate high — investigate top suggested files for over-trigger patterns) or (b) agent is genuinely bypassing relevant memories (real cite-recall problem).
  • totalMissingTranscripttotalSuggestions = the --cwd doesn't match any sessions in ~/.claude/projects/<encoded>/. Re-run with explicit --cwd= to the project where suggestions fired.
  • Newly added memories may show 100% bypass for their first few suggest events while the agent hasn't yet learned to look at them — that's a Bayesian prior issue, not a measurement bug. Per §13.3 promotion criteria, fold into the existing 30d-default-OFF FP-collection window before treating as load-bearing.
Changes

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.

  1. 9d ago First seen · 42 lines · 66 tokens per session scan A 1e2a64e85b17

Subscribe to this mod's changes

claudemd-bypass-audit is a command published in the GitHub repository sdsrss/claudemd (2 stars, last pushed today), licensed MIT. It adds 66 tokens to every session and 802 once invoked, about $0.0003 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-31.