claude-md-optimizer

claude-md-optimizer is a skill for Claude Code from Goodsmileduck/claude-registry. It costs 49 tokens per session (1,127 once invoked), scanned A, original, MIT.

A review guide for CLAUDE.md files, which configure how Claude Code works in a project. It checks their structure, content, length, and common problems against Anthropic’s recommended practices.

In plain words
What is it for?
Use it to audit an existing CLAUDE.md, rank problems, and suggest or apply improvements suited to the project and its team.
Why use it?
It helps find instructions that are missing, too long, unclear, or counterproductive. This makes the project guidance easier to maintain and more useful.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code.

Part of the claude-md-optimizer plugin — 1 skill shipped together

Good fit Use it to audit an existing CLAUDE.md, rank problems, and suggest or apply improvements suited to the project and its team.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/goodsmileduck/claude-registry/claude-md-optimizer
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 Goodsmileduck/claude-registry --skill claude-md-optimizer
Clone the repo
git clone --depth 1 https://github.com/Goodsmileduck/claude-registry

Made for: Claude Code.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/goodsmileduck/claude-registry/claude-md-optimizer"><img src="https://agentmods.dev/badge/skills/goodsmileduck/claude-registry/claude-md-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,127 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.00049 $0.01127
Opus 5 $0.00024 $0.00563
Sonnet 5 $0.00010 $0.00225
Haiku 4.5 $0.00005 $0.00113

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

Security

Grade A, and why

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

plugins/claude-md-optimizer/skills/claude-md-optimizer/SKILL.md · 172 lines

How it starts

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

Optimize CLAUDE.md

Analyze, audit, and optimize CLAUDE.md files based on Anthropic's official best practices for effective Claude Code configuration.

Degrees of Freedom

This is a medium-freedom task. Follow the structured workflow but adapt recommendations based on the specific project's needs, tech stack, and team conventions.

Workflow

Copy this checklist and track your progress:

Optimization Progress:
- [ ] Step 1: Analyze current CLAUDE.md state
- [ ] Step 2: Audit against best practices checklist
- [ ] Step 3: Identify and prioritize issues
- [ ] Step 4: Generate recommendations
- [ ] Step 5: Apply or present changes

1. Analyze Current State

Read the existing CLAUDE.md (if present) and assess:

  • Current structure and organization
  • Content categories present
  • Length and verbosity
  • Presence of anti-patterns

2. Audit Against Best Practices

Compare against the checklist in references/best-practices.md.

Score each category:

  • Present & Good - Follows best practices
  • Present but Needs Work - Exists but could be improved
  • Missing - Should be added
  • Anti-pattern - Should be removed/fixed

3. Generate Recommendations

Prioritize changes by impact:

High Priority:

  • Remove sensitive information (API keys, credentials)
  • Fix anti-patterns (generic advice, excessive length)
  • Add missing critical sections (project structure, commands)

Medium Priority:

  • Improve organization and scannability
  • Add missing helpful sections
  • Condense verbose explanations

Low Priority:

  • Formatting improvements
  • Minor restructuring
  • Optional enhancements

4. Apply Changes

Either:

  • Suggest mode: Present recommendations for user approval
  • Apply mode: Directly edit CLAUDE.md with improvements

Optimization Principles

Keep It Concise

CLAUDE.md is loaded into context every time. Total limit: 40k tokens (CLAUDE.md + all @referenced files combined).

# BAD: Verbose explanation
## Testing Guidelines
When running tests in this project, you should use the npm test command.
This will execute all test files and provide output. Make sure tests pass.

# GOOD: Concise and actionable
## Testing
npm test                    # Run all tests
npm run test:coverage       # With coverage report

Read the full file on GitHub · 172 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 172 lines · 49 tokens per session scan A ec982a04956a

Subscribe to this mod's changes

claude-md-optimizer is a skill published in the GitHub repository Goodsmileduck/claude-registry (1 stars, last pushed 1mo ago), licensed MIT. It adds 49 tokens to every session and 1,127 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.