Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By MSApps-Mobilev1.0.4MITIn 1 marketplace
Trims a bloated CLAUDE.md or AGENTS.md down to a lean file and maps each removed section to where it should go. Can also write a new one from scratch for a project without instructions yet.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Audit bloated agent-instruction files (CLAUDE.md, AGENTS.md, and their local/user-level variants) and rewrite them lean — or author a new one from scratch following the 200-line "recipe book" principle.
CLAUDE.md is loaded into every Claude session. Every line is a recurring tax on the context window, paid before any real work starts, across every session, forever. Most files drift into bloat: embedded API docs, step-by-step tutorials, hoarded historical state, stacked negative "don't do X" rules.
This plugin provides two modes:
| Mode | When to use |
|---|---|
| Audit | You have an existing file that's grown too large or has anti-patterns |
| Author | You want a lean CLAUDE.md for a new or undocumented project |
agents-md-optimizerThe core skill. Detects the right mode from context and runs accordingly.
Audit mode — reads the target file, runs scripts/audit.py for a quantitative report (line count, token estimate, anti-patterns with line numbers), classifies every section as keep/extract/delete, and produces:
Author mode — interviews the user (project identity, stack, house rules, output prefs, boundaries) and writes a lean file using references/template.md.
CLAUDE.md or AGENTS.md in context that is >200 lines or contains known anti-patternsUnderstanding where things belong is the core of this skill:
./CLAUDE.md — project-level, committed to the repo, shared with every collaborator~/.claude/CLAUDE.md — user-level, personal defaults across every project./CLAUDE.local.md — project-local, gitignored, personal notes about this specific repo| Pattern | Fix |
|---|---|
| Negative rules stacked | Flip to positive directives |
| Embedded reference docs | Move to docs/, add a pointer |
| Step-by-step tutorials | Extract to a script or Skill |
| Preemptive file preloads | Delete — Claude reads on demand |
| Ephemeral / dated state | Move to CLAUDE.local.md |
| Personal preferences | Move to ~/.claude/CLAUDE.md |
| Duplicated skill content | Delete — skill already covers it |
| General knowledge re-statements | Delete |
skills/agents-md-optimizer/references/template.md — lean CLAUDE.md skeletonskills/agents-md-optimizer/references/anti-patterns.md — catalog of bloat patterns with before/after rewritesskills/agents-md-optimizer/scripts/audit.py — quantitative audit scriptpython3 skills/agents-md-optimizer/scripts/audit.py path/to/CLAUDE.md
python3 skills/agents-md-optimizer/scripts/audit.py path/to/CLAUDE.md --json
python3 skills/agents-md-optimizer/scripts/audit.py path/to/CLAUDE.md --strict
In Claude Code (2.1.275 or later):
/plugin install agents-md-optimizer --marketplace MSApps-Mobile/claude-plugins
Or install via the Cowork plugin system, or copy skills/agents-md-optimizer/ into your .claude/skills/ directory.
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub msapps-mobile/claude-plugins --plugin agents-md-optimizerPlugins from other owners that cover similar ground