analyze-claude-md

analyze-claude-md is a command for Claude Code from juanmhidalgo/claude-plugins. It costs 43 tokens per session (1,180 once invoked), scanned A, original, MIT.

A command for checking a CLAUDE.md file against Anthropic's recommended practices. CLAUDE.md is a project instruction file used by Claude Code.

In plain words
What is it for?
Auditing project instructions, checking their organization and size, and identifying missing sections or workflow guidance.
Why use it?
It helps find unclear structure, unnecessary length, missing project guidance, unsafe sensitive data, and disorganized supporting rules before you edit the file.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; positional $N argument; mentions Claude Code.

Part of the claude-md-toolkit plugin — 1 skill, 3 commands shipped together

Good fit Auditing project instructions, checking their organization and size, and identifying missing sections or workflow guidance.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/juanmhidalgo/claude-plugins/analyze-claude-md
Install

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.

Clone the repo
git clone --depth 1 https://github.com/juanmhidalgo/claude-plugins

Made for: Claude Code.

Or install claude-md-toolkit, the plugin that ships this one along with the rest of its 1 skill, 3 commands.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/juanmhidalgo/claude-plugins/analyze-claude-md"><img src="https://agentmods.dev/badge/commands/juanmhidalgo/claude-plugins/analyze-claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,180 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.00043 $0.01180
Opus 5 $0.00022 $0.00590
Sonnet 5 $0.00009 $0.00236
Haiku 4.5 $0.00004 $0.00118

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

Security

Grade A, and why

analyze-claude-md 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 10d 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.

claude-md-toolkit/commands/analyze-claude-md.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Analyze CLAUDE.md

Analyze a CLAUDE.md file against Anthropic's official best practices.

Analysis Criteria

<structure_analysis weight="25">

  • XML tags present and consistent
  • Clear hierarchy (nesting, priority attributes)
  • Sections properly labeled (context, instructions, examples, references) </structure_analysis>

<conciseness_analysis weight="25">

  • Token count vs. target range for project size
  • No verbose explanations of basic concepts
  • No long embedded code examples (50+ lines)
  • No repetitive content </conciseness_analysis>

<content_quality_analysis weight="25">

  • Essential sections present (context, directories, standards, commands)
  • External references for complex content
  • Persuasion principles for critical rules (Authority, Commitment, Social Proof)
  • NO sensitive data (credentials, keys, connection strings)
  • Actionable workflows defined </content_quality_analysis>

<memory_patterns_analysis weight="25">

  • Uses imports (@path) for external content
  • Modularization with .claude/rules/*.md
  • Path-specific rules use YAML frontmatter </memory_patterns_analysis>

Token Targets by Project Size

<token_targets>

  • Small (< 10K LOC): 800-1200 tokens
  • Medium (10-50K LOC): 1200-2000 tokens
  • Large (> 50K LOC): 2000-2500 tokens </token_targets>

Scoring

<score_ranges>

  • 90-100: Excellent (minor tweaks only)
  • 75-89: Good (some optimization opportunities)
  • 60-74: Needs improvement
  • 0-59: Poor (major restructuring required) </score_ranges>

Output Format

<output_structure>

CLAUDE.md Analysis Report

File: [path] Date: [current date] Score: [X]/100 ([Rating])


Metrics

  • Lines: [count]
  • Estimated Tokens: [count * 8]
  • Target Range: [range for project size]
  • Status: [within/above/below target]

Read the full file on GitHub · 185 lines

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. 10d ago First seen · 185 lines · 43 tokens per session scan A 4930e4a6d2a8

Subscribe to this mod's changes

analyze-claude-md is a command published in the GitHub repository juanmhidalgo/claude-plugins (8 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 1,180 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-31.