/claude-registry:claude-md-optimizerfrom claude-registry
Analyzes and optimizes CLAUDE.md files following Anthropic's official best practices. Use when reviewing existing CLAUDE.md for improvements, or when user mentions CLAUDE.md is too long or ineffective.
Ships in claude-registry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Analyze, audit, and optimize CLAUDE.md files based on Anthropic's official best practices for effective Claude Code configuration.
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.
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
Read the existing CLAUDE.md (if present) and assess:
Compare against the checklist in references/best-practices.md.
Score each category:
Prioritize changes by impact:
High Priority:
Medium Priority:
Low Priority:
Either:
CLAUDE.md and its @imports load into every session, so their size is a cost on every turn.
# 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
Include YOUR project's actual patterns, not theoretical best practices.
# BAD: Generic advice
Follow clean code principles and write maintainable code.
# GOOD: Project-specific guidance
Use `logger` from @/utils, never console.log (tree-shaken in production).
Query keys must use queryKeys factory from @/lib/queryKeys.
For large documentation, split into separate files and reference them:
# In CLAUDE.md
See @.claude/rules/testing.md for testing standards.
See @docs/ARCHITECTURE.md for system design.
# NOT: 500 lines of testing docs inline
Show the commands your team uses:
## Development
npm run dev # Start dev server (localhost:3000)
npm test # Run tests in watch mode
npm run build # Production build
Current models follow CLAUDE.md closely; capitalised IMPORTANT / YOU MUST / ALWAYS markers make them over-apply a rule. Write the rule and its reason:
Use the logger utility, not console.log: console output is stripped in production.
Reserve emphasis for one rule you have actually seen ignored. Flag emphasis clusters without a reason as an issue.
When optimizing, provide:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub goodsmileduck/claude-registry --plugin claude-md-optimizer