Analyze CLAUDE.md files against Anthropic's official best practices with level-specific requirements.
Analyzes CLAUDE.md files against Anthropic's best practices, checking for level-specific requirements and token efficiency. Use this when you need to audit context files for proper structure, content placement, and conciseness.
/plugin marketplace add nathanvale/side-quest-marketplace/plugin install plugin-template@side-quest-marketplaceAnalyze CLAUDE.md files against Anthropic's official best practices with level-specific requirements.
For Anthropic's official guidelines and best practices, see: @../templates/best-practices.md
Parse arguments or auto-detect:
| Location | Level | Detection |
|---|---|---|
~/.claude/CLAUDE.md | user | Home directory |
./CLAUDE.md (repo root) | project | Has .git sibling |
src/*/CLAUDE.md | module | Inside src/lib/packages dir |
For detailed quality checks and requirements by level, see: @../templates/quality-checks.md
For formatting best practices, see: @../templates/formatting-guide.md
Token Budgets:
Key Requirements:
Common Anti-Patterns:
## CLAUDE.md Audit Report
**Level:** [user | project | module]
**File:** [path]
**Lines:** X (Budget: Y-Z, Max: W)
### Level-Specific Compliance
#### Required Content
| Requirement | Status | Notes |
|-------------|--------|-------|
| [requirement 1] | ✅/❌ | [details] |
| [requirement 2] | ✅/❌ | [details] |
#### Content That Should Move
| Content | Current Location | Should Be In |
|---------|------------------|--------------|
| [item] | [this file] | [correct level] |
### Token Efficiency Score
**Overall: X/10**
| Criterion | Score | Notes |
|-----------|-------|-------|
| Structure | X/10 | Headings, bullets, tables |
| Conciseness | X/10 | No verbose explanations |
| Imports | X/10 | Modular, on-demand loading |
| Emphasis | X/10 | Critical rules marked |
| Specificity | X/10 | Actionable directives |
| Level-appropriate | X/10 | Right content for this level |
### Issues Found
#### 🔴 High Priority
- **[Issue]**: [problem]
- Line(s): X-Y
- Fix: [action]
- Before: `[current]`
- After: `[improved]`
#### 🟡 Medium Priority
...
#### 🟢 Suggestions
...
### What's Working Well
- [strength]
- [strength]
### Directory Structure Audit
**Status:** ✅ Present and annotated | 🟡 Present but no annotations | 🔴 Missing
Current:
[paste current tree or note if missing]
Suggestions:
- [specific improvements]
### Duplication Check
| Content | Also In | Action |
|---------|---------|--------|
| [item] | [project file] | Remove from [location] |
### Scope Audit
**Focused:** ✅ Yes | ❌ No (contains project-wide content)
Content that belongs in parent:
- [item that should be in root CLAUDE.md]
For detailed examples of common issues and fixes, see: @../templates/quality-checks.md
Now audit the CLAUDE.md file: $ARGUMENTS