Analyze CLAUDE.md files against Anthropic's official best practices with level-specific requirements.
From claude-code-claude-mdnpx claudepluginhub nathanvale/side-quest-marketplace-old --plugin claude-code-claude-md/auditLogs agent interactions (prompts, responses, tool calls) to append-only .beads/interactions.jsonl. Also supports labeling prior entries via record|label args.
/auditAudits UI code against design system for spacing, depth, color, and pattern violations. Reports file-specific issues and suggestions. Supports path argument or defaults to common UI paths.
/auditPerforms security audit of codebase covering dependencies, secrets, OWASP Top 10, inputs, and auth. Produces severity-prioritized report with findings, fixes, and references.
/auditRuns Rust security audits (default) with cargo audit and geiger, or safety/concurrency/full modes using miri, rudra, lockbud. Outputs prioritized vulnerability reports and fix recommendations.
/auditAnalyzes iOS/Swift projects to suggest relevant audits or runs specified ones (e.g., memory, concurrency, accessibility, SwiftUI performance, security).
/auditPerforms security audit on codebase or specified target, checking dependency vulnerabilities, auth, input validation, data exposure, configs, and secrets. Outputs prioritized findings with remediation steps.
Analyze 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/rules/*.md | user-rules | User rules directory |
./CLAUDE.md (repo root) | project | Has .git sibling |
./.claude/CLAUDE.md | project | Alternative project location |
./.claude/rules/*.md | project-rules | Project rules directory |
./CLAUDE.local.md | local | Personal project prefs (gitignored) |
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:
~/.claude/rules/.claude/rules/Common Anti-Patterns:
.claude/rules/paths: syntax## 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]
### Rules Directory Audit
**Location:** `.claude/rules/`
**Status:** ✅ Present | 🟡 Not present (consider for large projects) | N/A (small project)
| File | Lines | Path-Scoped | Status |
|------|-------|-------------|--------|
| [filename] | X | ✅/❌ | 🟢/🟡/🔴 |
**Path-Specific Rules Validation:**
- [ ] YAML frontmatter syntax valid
- [ ] Glob patterns valid
- [ ] Patterns not overly broad
**Suggestions:**
- [specific improvements]
### Duplication Check
| Content | Also In | Action |
|---------|---------|--------|
| [item] | [project file] | Remove from [location] |
### Local Memory Audit
**File:** `./CLAUDE.local.md`
**Lines:** X (Budget: 20-50)
**Gitignored:** ✅ Yes | ❌ No (add to .gitignore!)
**Appropriate Content:**
- [ ] Personal sandbox URLs
- [ ] Preferred test data
- [ ] Individual shortcuts
**Misplaced Content:**
- [item that belongs in CLAUDE.md or ~/.claude/CLAUDE.md]
### Scope Audit
**Focused:** ✅ Yes | ❌ No (contains project-wide content)
Content that belongs in parent:
- [item that should be in root CLAUDE.md]
### @imports Audit
| Import | Target | Status |
|--------|--------|--------|
| @path/to/file | [resolved path] | ✅/🔴 |
**Issues:**
- 🔴 Broken: @missing-file.md (file not found)
- 🟡 Deep nesting: 4 levels deep (max recommended: 3)
For detailed examples of common issues and fixes, see: @../templates/quality-checks.md
Now audit the CLAUDE.md file: $ARGUMENTS