← ClaudeAtlas

debug-ruleslisted

Diagnose which rules loaded, which didn't, and why. Reads the InstructionsLoaded audit log and compares against expected rules.
stuartshields/claude-setup · ★ 2 · Code & Development · score 79
Install: claude install-skill stuartshields/claude-setup
<!-- Last updated: 2026-03-23T16:30+11:00 --> # Skill: debug-rules ## When to Use Use this skill when: - Conditional rules don't seem to be loading - Claude is ignoring instructions that should be in a rule file - You changed rule frontmatter and want to verify it works - You want to see what rules loaded in a specific session ## Prerequisites This skill requires the `InstructionsLoaded` audit hook. The hook is **not registered by default** - it's an on-demand diagnostic tool you enable when needed. ### Setup (one-time) The hook script `~/.claude/hooks/log-instructions.sh` should already exist. To enable logging, add this to `~/.claude/settings.json` under `"hooks"`: ```json "InstructionsLoaded": [ { "hooks": [ { "type": "command", "command": "~/.claude/hooks/log-instructions.sh" } ] } ] ``` Then start a new session, do some work that touches files matching your conditional rules, and run `/debug-rules` again. **Remove the hook from settings.json when done** - it's lightweight but unnecessary for normal use. ## Step 1: Verify hook is active 1. Check `~/.claude/hooks/log-instructions.sh` exists and is executable 2. Check `~/.claude/settings.json` has an `InstructionsLoaded` entry pointing to it 3. Check `~/.claude/instruction-audit.log` exists and is non-empty If the hook script is missing, tell the user and stop. If the hook script exists but isn't registered in settings.json, show them the setup instructions above. If the