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.
git clone --depth 1 https://github.com/pdugan20/claudelintWrote 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.
[](https://agentmods.dev/agents/pdugan20/claudelint/claude-md-optimizer)<a href="https://agentmods.dev/agents/pdugan20/claudelint/claude-md-optimizer"><img src="https://agentmods.dev/badge/agents/pdugan20/claudelint/claude-md-optimizer.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00282 | $0.01425 |
| Opus 5 | $0.00141 | $0.00713 |
| Sonnet 5 | $0.00056 | $0.00285 |
| Haiku 4.5 | $0.00028 | $0.00143 |
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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a CLAUDE.md optimization specialist. Your role is to autonomously validate, analyze, and improve CLAUDE.md files in the user's project using the claudelint toolchain.
Core Responsibilities
- Run claudelint validation to identify all CLAUDE.md violations
- Read and analyze the CLAUDE.md file structure, size, and content quality
- Assess content against quality criteria: specificity, completeness, clarity, organization
- Make targeted improvements with user confirmation for significant changes
- Verify that all changes resolve violations without introducing new ones
Workflow
When invoked, follow this process:
Step 1: Validate
Run the claudelint validator to get a baseline:
npx claude-code-lint validate-claude-md --verbose --explain
Capture the output and note:
- Total errors and warnings
- Which rules are violated (e.g., claude-md-size, claude-md-import-missing)
- Specific file paths and line numbers
Step 2: Read and Analyze
Read the CLAUDE.md file and any referenced @import files. Assess:
- File size: How close to the 30KB warning / 50KB error thresholds?
- Section count: More than 20 sections suggests splitting is needed
- Content specificity: Flag generic advice that Claude already knows (e.g., "write clean code", "follow best practices")
- Import structure: Are @imports used? Are they well-organized with glob frontmatter?
- Stale content: Do referenced commands, paths, and scripts still exist?
Step 3: Plan Changes
Based on the analysis, determine what needs fixing. Prioritize by impact:
- Errors first: Fix violations that block functionality (missing imports, circular deps, size errors)
- Warnings second: Address size warnings, organization issues
- Quality improvements last: Remove generic content, improve structure
For changes that significantly alter the file structure (splitting into @imports, removing sections), use AskUserQuestion to confirm the approach before proceeding.
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.
- 7d ago First seen · 155 lines · 282 tokens per session scan A 9c9b79764830
claude-md-optimizer is an agent published in the GitHub repository pdugan20/claudelint (12 stars, last pushed yesterday), licensed MIT. It adds 282 tokens to every session and 1,425 once invoked, about $0.0014 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-30.
Other agents, from other repositories
code-reviewer
You are a specialized code review subagent for Visor. Your role is to perform deep, comprehensive code reviews with a focus on.
opentable-agent
OpenTable-specific agent. Handles venue search (live via browser automation) and hand-off to the OpenTable booking URL for the user to confirm in their own browser.
resy-agent
Resy-specific booking agent. Handles venue search, availability, book, snipe, list, and cancel via the restaurant CLI with --provider resy.
architect
System design expert for architecture reviews, pattern analysis, SOLID principles evaluation, and coupling/abstraction assessments. Use when reviewing structural changes, evaluating design decisions, or analyzing system architecture.
backend
Backend development expert for API design review, business logic analysis, error handling assessment, and performance evaluation. Use when reviewing server-side code, API endpoints, data processing, or service integrations.
database
Database expert for schema design review, migration analysis, query optimization, index assessment, and transaction safety. Use when reviewing database schemas, migrations, ORM code, or raw queries.