claudemd-analyze

claudemd-analyze is a command for Claude Code from sdsrss/claudemd. It costs 91 tokens per session (503 once invoked), scanned A, original, MIT.

A read-only command that checks whether a project's written claudemd specification still matches its implementation and supporting files. It reports findings by severity, from critical structural problems to low-priority drift.

In plain words
What is it for?
Use it as an advisory review or a stricter CI check before accepting changes to the specification and its enforcement data.
Why use it?
It exposes broken references, inaccurate size information, missing memory files, and gaps between quick-check terms and banned-vocabulary rules.

Command for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable.

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

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-analyze

README.md
[![agentmods](https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-analyze.svg)](https://agentmods.dev/commands/sdsrss/claudemd/claudemd-analyze)
Your own site
<a href="https://agentmods.dev/commands/sdsrss/claudemd/claudemd-analyze"><img src="https://agentmods.dev/badge/commands/sdsrss/claudemd/claudemd-analyze.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 503 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00091 $0.00503
Opus 5 $0.00046 $0.00251
Sonnet 5 $0.00018 $0.00101
Haiku 4.5 $0.00009 $0.00050

Measured 6d ago against content hash 9133d8273df6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

claudemd-analyze 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 6d 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-analyze.md · 26 lines

What it actually says

Usage: /claudemd-analyze (advisory) or /claudemd-analyze --strict (CI gate)

Run: node ${CLAUDE_PLUGIN_ROOT}/scripts/spec-coherence-audit.js $ARGS

Surface the per-check [✓]/[△]/[✗] block first, then the severity-grouped findings, then the one-line summary. Counter format: C=<critical> H=<high> M=<medium> L=<low>.

Severity meaning:

  • CRITICAL — breaks the spec's structural contract (unresolved §EXT ref)
  • HIGH — drift outside accepted tolerance (Sizing line off by >20B; per feedback_spec_sizing_recursive_rewrite.md)
  • MEDIUM — runtime-binding drift (MEMORY.md references missing file; a §10 quick-check term no banned-vocab.patterns row can match)
  • LOW — non-binding drift (orphan memory file not in index)

banned-vocab-spec-drift reports two things that are NOT findings and must not be read as coverage: acknowledgedCount (terms §10 names that are deliberately unmechanized — the note gives each one's measured false-positive reason) and ironLaw2Unenforced (§7's own phrasing list, which does not declare banned-vocab.patterns as its enumeration). Report both verbatim from the note rather than folding them into the severity counters.

Out of scope (covered by sibling commands):

  • HARD-rule → hook enforcement coverage → /claudemd-doctor + scripts/safety-coverage-audit.js
  • MEMORY.md tag-specificity → /claudemd-doctor (memory-tag-specificity check)
  • rule-hits.jsonl telemetry → /claudemd-audit

This command is read-only and exits 0 by default. --strict exits 1 on CRITICAL or HIGH findings — suitable for pre-tag ship gate.

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. 6d ago First seen · 26 lines · 91 tokens per session scan A 9133d8273df6

Subscribe to this mod's changes

claudemd-analyze is a command published in the GitHub repository sdsrss/claudemd (2 stars, last pushed yesterday), licensed MIT. It adds 91 tokens to every session and 503 once invoked, about $0.0005 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.