claude-md-guardian

claude-md-guardian is a skill for Claude Code, Codex from DojoGenesis/mcp. It costs 66 tokens per session (2,916 once invoked), scanned A, original, MIT.

A checker for CLAUDE.md files, which contain instructions that guide a coding agent's behavior in a project.

In plain words
What is it for?
Reviewing instruction files and producing a health report with suggestions for fixing them.
Why use it?
It finds conflicting, outdated, missing, or unnecessary instructions that can make the agent behave unpredictably.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: model in frontmatter; reads .claude/ paths; mentions CLAUDE.md.

Good fit Reviewing instruction files and producing a health report with suggestions for fixing them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dojogenesis/mcp/claude-md-guardian
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.

Any agent
npx skills add DojoGenesis/mcp --skill claude-md-guardian
Clone the repo
git clone --depth 1 https://github.com/DojoGenesis/mcp

Made for: Claude Code, Codex.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dojogenesis/mcp/claude-md-guardian"><img src="https://agentmods.dev/badge/skills/dojogenesis/mcp/claude-md-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,916 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.02916
Opus 5 $0.00033 $0.01458
Sonnet 5 $0.00013 $0.00583
Haiku 4.5 $0.00007 $0.00292

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

Security

Grade A, and why

claude-md-guardian 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.

internal/skills/bundled/dojo-craft/claude-md-guardian/SKILL.md · 247 lines

How it starts

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

CLAUDE.md Guardian Skill

I. Philosophy

CLAUDE.md is the agent's behavioral contract. When rules drift, conflict, or accumulate without review, agent behavior becomes unpredictable in ways that are almost impossible to debug — because the symptom (agent doing the wrong thing) is far removed from the cause (contradictory rule added three sessions ago).

The guardian treats CLAUDE.md like source code: it requires validation, consistency checks, and protection against unreviewed modification. The difference is that source code fails loudly at compile time. CLAUDE.md fails silently at runtime, in production, usually at the worst moment.

Three failure modes threaten CLAUDE.md health:

  1. Conflict — Contradictory rules across global, project, and subdirectory files. The hierarchy resolves them mechanically, but often not the way you intended.
  2. Drift — Rules that were true when written but no longer match the codebase. Port numbers change. Tool names change. Conventions change. The rule stays.
  3. Bloat — Accumulated rules that are redundant, vague, or unreferenced. More rules does not mean better behavior. It means more surface area for contradiction.

II. When to Use

  • After merging branches that touched CLAUDE.md independently
  • When agent behavior changes unexpectedly (first suspect: CLAUDE.md conflict or stale rule)
  • During periodic maintenance (weekly, or at convergence gates)
  • Before onboarding a new agent or team member to verify the contract is coherent
  • After applying learnings (reflect-and-learn) to verify no conflicts were introduced
  • After a major refactor that changed file paths, port numbers, or tool names

Do not use this skill to write new CLAUDE.md rules. Use it to validate existing ones.

III. Workflow

Step 1: DISCOVER

Find all behavioral configuration files across the entire hierarchy.

Locations to check:

  • ~/.claude/CLAUDE.md — global rules applied to all projects
  • ./CLAUDE.md — project root rules
  • ./<subdirectory>/CLAUDE.md — subdirectory-specific overrides
  • ./AGENTS.md — cross-tool compatibility file (can contradict CLAUDE.md silently)
  • ~/.claude/projects/<project-hash>/CLAUDE.md — project-specific agent memory overlays

Read the full file on GitHub · 247 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 · 247 lines · 66 tokens per session scan A 4fb57c095457

Subscribe to this mod's changes

claude-md-guardian is a skill published in the GitHub repository DojoGenesis/mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 66 tokens to every session and 2,916 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.