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.
npx agentmods add skills/msapps-mobile/claude-plugins/agents-md-optimizernpx skills add MSApps-Mobile/claude-plugins --skill agents-md-optimizergit clone --depth 1 https://github.com/MSApps-Mobile/claude-pluginsWrote 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/skills/msapps-mobile/claude-plugins/agents-md-optimizer)<a href="https://agentmods.dev/skills/msapps-mobile/claude-plugins/agents-md-optimizer"><img src="https://agentmods.dev/badge/skills/msapps-mobile/claude-plugins/agents-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 | $0.00208 | $0.02383 |
| Opus 5 | $0.00104 | $0.01192 |
| Sonnet 5 | $0.00042 | $0.00477 |
| Haiku 4.5 | $0.00021 | $0.00238 |
Grade A, and why
agents-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 3d 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 — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agents-md-optimizer
What this skill does
CLAUDE.md is loaded into every Claude session for the project it belongs to. That means every line is a recurring tax on the context window — paid before any real work starts, across every session, forever. Most CLAUDE.md files drift into bloat: people copy-paste API docs, write step-by-step tutorials, hoard historical state, stack negative "don't do X" rules. The result is a ~2,000-token baseline cost that degrades focus and wastes budget.
The fix is to treat CLAUDE.md like a focused recipe book: essential guidance only, everything else extracted to a location that loads on-demand. This skill does two things:
- Audit mode — read an existing
CLAUDE.md, diagnose what's bloat, and produce a slimmed rewrite plus an extraction plan (what moves where). - Author mode — interview about a new project and write a lean
CLAUDE.mdfrom scratch using the template.
When to pick a mode
Detect mode from input:
- The user points at an existing file, or one is visible in context → audit mode.
- The user wants a fresh
CLAUDE.mdfor a new or undocumented project → author mode. - Both (they showed a file but also want a rewrite philosophy applied to a second project) → run audit first, carry the principles into the author pass.
If it's ambiguous, ask one clarifying question: "Are we trimming an existing one, or writing a new one?"
The four-layer hierarchy — know where things actually belong
Every recommendation in this skill depends on understanding that CLAUDE.md isn't monolithic. Claude loads four layers in precedence order:
- Enterprise policy — organization-wide, set by admins.
./CLAUDE.md— project-level, committed to the repo. This is what most people mean by "CLAUDE.md." Shared with every collaborator.~/.claude/CLAUDE.md— user-level, personal defaults that apply across every project. Communication prefs, your own account info, your shell aliases../CLAUDE.local.md— project-local overrides, gitignored. Personal notes about this specific repo that shouldn't be shared with collaborators.
What ships with it
3 files 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.
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.
- 3d ago First seen · 156 lines · 208 tokens per session scan A 8091e5db2c90
agents-md-optimizer is a skill published in the GitHub repository MSApps-Mobile/claude-plugins (9 stars, last pushed 7d ago), licensed MIT. It adds 208 tokens to every session and 2,383 once invoked, about $0.0010 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.
Other skills, from other repositories
extract
Run the full Semantica semantic extraction pipeline on a file or selected text — NER, relations, events, coreference resolution, triplets, and validation. Clears result cache before each run. Returns Markdown tables with entity/relation/event/triplet results and inline validator warnings.
watch
File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through /do. Use for automatic reactions to file changes; do NOT use for…
review
5-pass structured code review — correctness, security, performance, readability, consistency.
live-preview
Mid-build visual verification loop. Takes screenshots of components during construction, not just after. Catches visual regressions and invisible features before they compound. Requires Playwright or similar screenshot tool.
marshal
Meta-orchestrator that takes any direction — broad, specific, or vague — and autonomously chains skills and context into actionable work. Gathers context from codebase, docs, and memory. Only asks the user when it genuinely cannot proceed. Single-session orchestrator.
wiki
Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to 400K words.