Skip to main content
ClaudeWave
Slash Command127 repo starsupdated 1mo ago

audit

The audit command analyzes recurring context files in a project to identify memory usage patterns and suggest optimization opportunities. Use it to review how much token budget persistent files consume, identify the largest contributors, spot redundant content, and receive prioritized recommendations for reducing context overhead through compression, file splitting, and output filtering.

Install in Claude Code
Copy
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/0xhimanshu/governor/HEAD/commands/audit.md -o ~/.claude/commands/audit.md
Then start a new Claude Code session; the slash command loads automatically.

audit.md

# Governor Audit

Audit paths from `$ARGUMENTS`. If no arguments are provided, audit common memory
files such as `CLAUDE.md`, `.claude/CLAUDE.md`, `.claude/rules`, `AGENTS.md`,
Cursor rules, and Windsurf rules.

Run:

```bash
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/governor.py" audit $ARGUMENTS
```

Summarize:

- total recurring-context estimate
- largest context files
- duplicate/oversized files
- top three recommendations

Prefer low-friction recommendations before governance:

1. compress always-loaded memory
2. split long details into on-demand skills/reference files
3. filter noisy test/build/search output
4. use `/clear` when task changes
5. use `/compact` only when continuing the same task

Keep recommendations helpful, not bossy. Do not require planning unless the user
explicitly asks or the task is broad and risky.