Context Audit
Diagnoses what contexts a project SHOULD have vs what it currently HAS.
Quick Audit
Run the audit script to see gaps:
bash
bash ~/.claude/commands/golem-powers/context-audit/scripts/audit.sh
What This Audits
- •Available contexts - What's in
~/.claude/contexts/or repocontexts/ - •Project tech stack - Detected from package.json, file patterns
- •Current CLAUDE.md - What
@context:refs exist - •Gap analysis - What's missing
Manual Audit Steps
If the script isn't available, follow these steps:
Step 1: Check Available Contexts
bash
find ~/.claude/contexts -name "*.md" -o -name "*.md" 2>/dev/null | sort # Or in repo: find contexts -name "*.md" 2>/dev/null | sort
Step 2: Detect Project Needs
| If Project Has | Should Include |
|---|---|
| Any project | base, skill-index |
| Interactive Claude | workflow/interactive |
| Ralph/PRD work | workflow/ralph |
| Next.js (package.json) | tech/nextjs |
| React Native/Expo | tech/react-native |
| Convex (convex/) | tech/convex |
| Supabase (supabase/) | tech/supabase |
| Hebrew/Arabic UI | workflow/rtl |
| UI components | workflow/design-system |
| Test files | workflow/testing |
Step 3: Check CLAUDE.md
bash
grep -E "@context:|contexts/" CLAUDE.md 2>/dev/null || echo "No @context: refs found"
Step 4: Report Gaps
Compare Step 2 (needed) vs Step 3 (has). Missing = gap.
Output Format
The audit produces:
code
=== CONTEXT AUDIT === AVAILABLE CONTEXTS: base.md skill-index.md tech/nextjs.md ... DETECTED TECH STACK: [x] Next.js (found next in package.json) [x] RTL (found Hebrew text) [ ] Convex (no convex/ dir) CURRENT CLAUDE.md CONTEXTS: (none found) RECOMMENDED @context: BLOCK: ## Contexts @context: base @context: skill-index @context: tech/nextjs @context: workflow/rtl @context: workflow/interactive GAP SUMMARY: Missing 5 contexts. Add the block above to CLAUDE.md.
Self-Improvement Loop
If you find gaps:
- •Ask the user if they want to fix it
- •Create a PRD story with
/golem-powers:prdif it's a systemic issue - •Fix immediately if it's a simple CLAUDE.md update
This is how claude-golem improves itself.