ワンクリックで
audit-claude-config
Use when asked to audit Claude Code config, validate plugin settings, or diagnose plugin issues.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when asked to audit Claude Code config, validate plugin settings, or diagnose plugin issues.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Rewrite an issue's Implementation Steps, Acceptance Criteria, and Files to Modify in place from its own accumulated research findings, without appending or bulldozing human prose
Use when asked to audit documentation accuracy, coverage, or find documentation gaps.
Use when asked about project health, velocity, bug trends, or whether we're making progress.
Use when asked for an adversarial go/no-go review or whether an issue is worth implementing.
Use when asked to manually compact a session's memory, trigger session summarization, or reduce a long session's context footprint.
Use when asked to manually compact a session's memory, trigger session summarization, or reduce a long session's context footprint.
| name | audit-claude-config |
| description | Use when asked to audit Claude Code config, validate plugin settings, or diagnose plugin issues. |
| disable-model-invocation | true |
| argument-hint | [scope] |
| allowed-tools | ["Read","Glob","Edit","Task","Bash(git:*)"] |
| arguments | [{"name":"scope","description":"Audit scope (all|managed|user|project|hooks|mcp|agents|commands|skills|output-styles|lsp|keybindings|claudeignore|plugin-settings|settings)","required":false},{"name":"flags","description":"Optional flags: --non-interactive (no prompts), --fix (auto-apply safe fixes)","required":false}] |
| metadata | {"short-description":"Use when asked to audit Claude Code config, validate plugin settings, or diagnos"} |
You are tasked with performing a comprehensive audit of CLAUDE.md files and Claude Code plugin configuration using a three-wave parallel sub-agent architecture.
/Library/Application Support/ClaudeCode/CLAUDE.md/etc/claude-code/CLAUDE.md./.claude/CLAUDE.md or ./CLAUDE.md - Team-shared instructions./.claude/rules/*.md - Modular project instructions (supports paths frontmatter for conditional loading, subdirectories, symlinks)~/.claude/CLAUDE.md - Personal preferences for all projects~/.claude/rules/*.md - Personal modular rules (loaded before project rules)./CLAUDE.local.md - Personal project preferences (auto-gitignored)~/.claude/projects/<project>/memory/MEMORY.md - Claude's automatic notes (first 200 lines loaded at startup; topic files loaded on-demand)agents/*.md - Sub-agent definitionsskills/*.md - Skill definitionscommands/*.md - Slash command definitionshooks/hooks.json + hooks/prompts/*.md + scripts/little_loops/hooks/ + hooks/adapters/ - Lifecycle hooks (Python handlers in scripts/little_loops/hooks/, host adapters in hooks/adapters/<host>/, intent handlers contributed via LLHookIntentExtension)/Library/Application Support/ClaudeCode/managed-settings.json (macOS) or /etc/claude-code/managed-settings.json (Linux)~/.claude/settings.json - Personal settings across all projects.claude/settings.json - Team-shared project settings (committed to git).claude/settings.local.json - Personal project overrides (gitignored)~/.claude.json - Preferences, OAuth, user/local MCP configs./.ll/ll-config.json - Little-loops plugin configconfig-schema.json - Configuration validation schema.mcp.json (project), ~/.claude.json mcpServers (user/local), managed-mcp.json (managed) - MCP servers across all scopes.claude/output-styles/ and ~/.claude/output-styles/ - Custom output style markdown files with YAML frontmatter.lsp.json (plugin root) - LSP server config; lspServers field in .claude-plugin/plugin.json~/.claude/keybindings.json - Context-scoped key bindings.claudeignore - Gitignore-syntax file controlling what Claude can seesettings.json (plugin root) - Default agent settings$ARGUMENTS
Parse arguments:
- SCOPE="${scope:-all}"
- NON_INTERACTIVE=false (set true if flags contains "--non-interactive")
- AUTO_FIX=false (set true if flags contains "--fix")
Create a todo list to track audit progress:
Use TodoWrite to create:
- Discover configuration files
- Wave 1: Audit CLAUDE.md files
- Wave 1: Audit plugin components
- Wave 1: Audit config files
- Wave 2: Check internal consistency
- Wave 2: Check external consistency
- Wave 3: Generate fix suggestions
- Interactive fix session (unless --non-interactive)
- Generate final report
IMPORTANT: Spawn all 3 agents in a SINGLE message with multiple Task tool calls.
Based on SCOPE, spawn the relevant agents:
subagent_type="codebase-analyzer" — audits all memory files across the full
memory hierarchy (managed, project, user, local, auto memory, and rules
directories). Assesses structure, content quality, best practices, performance,
rules-frontmatter validity, and auto-memory size. Returns per-file quality
scores, severity-tagged issues with line numbers, and reference lists (@imports,
/ll:X commands, MCP tools, rules symlinks, rules path patterns) for Wave 2.
See wave1-prompts.md for the full verbatim prompt.
subagent_type="plugin-config-auditor" — audits agents (agents/*.md), skills
(skills/*.md), commands (commands/*.md), and hooks (hooks/hooks.json +
hooks/prompts/*.md + scripts/little_loops/hooks/prompts/*.md). Checks description quality, frontmatter completeness,
tool appropriateness, JSON validity, recognized event/handler types, and timeout
defaults. Returns a per-component summary table, severity-tagged issues, quality
scores, and reference lists (subagent_type values, prompt file paths, /ll:X
references in skills) for Wave 2.
See wave1-prompts.md for the full verbatim prompt.
subagent_type="codebase-locator" — locates and audits all configuration and
settings files across every scope: .ll/ll-config.json, config-schema.json,
MCP configs (.mcp.json, ~/.claude.json mcpServers, managed-mcp.json), the
full settings hierarchy (managed/user/project/local + ~/.claude.json prefs),
output styles, LSP servers (.lsp.json + plugin.json lspServers), keybindings,
.claudeignore, and plugin root settings.json. Validates JSON syntax, schema
compliance, path references, MCP transport types and ${VAR} expansion, and
checks every settings key against the recognized-key reference table (types,
deprecated keys, managed-only keys, permission-rule syntax). Returns config and
settings inventories, validation issues, MCP server inventory per scope, and the
full set of Wave 2 reference values (permission rules, inline hooks,
plansDirectory, enabledPlugins, outputStyle, respectGitignore,
lspServers, output style files, .claudeignore status).
See wave1-prompts.md for the full verbatim prompt, including the Recognized settings keys reference table (key types, deprecated keys, managed-only keys, and permission-rule syntax validation).
After all Wave 1 agents complete:
plansDirectory value (from any scope) for path existence checkenabledPlugins values (from any scope) for cross-referenceoutputStyle setting value (effective, considering scope precedence) and output style files foundrespectGitignore setting value (effective, considering scope precedence) and .claudeignore existencelspServers field presence in plugin.json and .lsp.json existencePresent Wave 1 summary:
Wave 1 Analysis Complete
| Category | Files | Issues | Health |
|----------|-------|--------|--------|
| CLAUDE.md | X | Y | Z/10 |
| Agents | X | Y | Z/10 |
| Skills | X | Y | Z/10 |
| Commands | X | Y | Z/10 |
| Hooks | X | Y | Z/10 |
| Config | X | Y | Z/10 |
| Settings Hierarchy | X | Y | Z/10 |
| Output Styles | X | Y | Z/10 |
| LSP Servers | X | Y | Z/10 |
| Keybindings | X | Y | Z/10 |
| .claudeignore | X | Y | Z/10 |
| Plugin settings | X | Y | Z/10 |
Critical issues: N
Warnings: N
Info: N
Proceed directly to Wave 2 consistency checks.
IMPORTANT: Spawn both agents in a SINGLE message with multiple Task tool calls.
Use Task tool with subagent_type="consistency-checker"
Prompt:
Using these references from Wave 1, check internal plugin consistency:
References to validate:
[INSERT COMPILED REFERENCE LISTS FROM WAVE 1]
Check:
1. **Commands → Agents**: Every subagent_type value has matching agents/X.md
2. **Hooks → Prompts**: Every prompt path in hooks.json resolves to existing file
3. **Config → Schema**: ll-config.json values comply with config-schema.json types
4. **CLAUDE.md → @imports**: Every @import reference resolves to existing file
5. **Rules → Frontmatter**: YAML frontmatter in .claude/rules/*.md and ~/.claude/rules/*.md parses correctly
6. **Rules → Paths**: Glob patterns in `paths` fields are syntactically valid
7. **Rules → Symlinks**: All symlinks in rules directories resolve to existing targets
8. **Auto Memory → Size**: MEMORY.md ≤ 200 lines (only first 200 loaded at startup)
9. **Skills → Commands**: /ll:X references in skill files have matching commands/X.md or are valid skill names (skills/X/SKILL.md exists)
10. **LSP → Config**: If `lspServers` field is present in plugin.json, verify .lsp.json exists at plugin root; if .lsp.json exists, verify `lspServers` is referenced in plugin.json
11. **Settings → Scope Conflicts**: Detect same key set at multiple scopes with different values; report which scope wins per precedence (managed > local > project > user)
12. **Settings → Inline Hooks**: If `hooks` key is present in any settings file, validate using same rules as hooks.json (event types, handler types, timeout defaults)
13. **Settings → plansDirectory**: If `plansDirectory` is set in any scope, verify the path exists or note it will be created on first use
14. **Settings → enabledPlugins**: If `enabledPlugins` is set, cross-reference against installed plugin directories
Return:
- Reference validation table with status for each
- List of missing references (CRITICAL)
- List of broken references (WARNING)
- Rules validation results (frontmatter, paths, symlinks)
- Auto memory size warnings
- Skills → Commands validation results
- LSP cross-reference results
- Settings scope conflict table (key, scopes, values, effective value)
- Settings inline hooks validation results
- Settings path reference results (plansDirectory, enabledPlugins)
- Internal consistency score
Use Task tool with subagent_type="consistency-checker"
Prompt:
Using these references from Wave 1, check external consistency:
References to validate:
[INSERT COMPILED REFERENCE LISTS FROM WAVE 1]
Check:
1. **CLAUDE.md → MCP**: MCP tools mentioned exist in any MCP scope (project, user, local, managed)
2. **MCP Scope Conflicts**: Detect same server name defined at multiple scopes; report which scope takes precedence (managed > local > project > user)
3. **MCP Approval → Servers**: Cross-reference enabledMcpjsonServers/disabledMcpjsonServers against actual server names in .mcp.json; flag references to non-existent servers as WARNING
4. **MCP Managed Policy → Servers**: If allowedMcpServers/deniedMcpServers present in managed settings, cross-reference against all discovered server names across all scopes; flag servers blocked by managed deny that are configured in project/user scope as WARNING
5. **CLAUDE.md → Commands**: /ll:X references have matching commands/X.md
6. **Hooks → Scripts**: Bash scripts referenced are executable
7. **Config → Paths**: File paths in config files exist in filesystem
8. **Memory Hierarchy**: Check for conflicts between managed policy, user memory, and project memory
9. **Rules Path Overlap**: Detect overlapping path patterns across rules files
10. **Local vs Project**: Check for conflicts between CLAUDE.local.md and project CLAUDE.md
11. **outputStyle → Output Style File**: If `outputStyle` is set in any settings scope, verify the referenced output style file exists in .claude/output-styles/ or ~/.claude/output-styles/ (use effective value considering scope precedence)
12. **respectGitignore → .claudeignore**: If `respectGitignore` is false (or absent) but .claudeignore exists, warn about potential confusion; if `respectGitignore` is true but no .claudeignore or .gitignore exists, note that ignore file may be missing
13. **Settings → Permission Overlap**: Detect permission rules at different scopes that may conflict (e.g., `allow` at user scope contradicted by `deny` at project scope for same pattern)
14. **Settings → Managed-Only Keys**: Flag managed-only keys (`disableBypassPermissionsMode`, `allowManagedHooksOnly`, `allowManagedPermissionRulesOnly`, `allowedMcpServers`, `deniedMcpServers`, `strictKnownMarketplaces`, `forceLoginMethod`, `forceLoginOrgUUID`, `companyAnnouncements`) found in non-managed settings files — these are silently ignored at runtime
15. **Settings → Deprecated Keys**: Flag `includeCoAuthoredBy` in any settings file with guidance to use `attribution` instead
Return:
- External reference validation table
- Hierarchy conflicts detected with recommended resolution
- Rules path overlap warnings
- List of missing/broken external references
- MCP scope conflict table (server name, scopes, precedence winner)
- MCP approval cross-reference results (enabledMcpjsonServers/disabledMcpjsonServers vs actual servers)
- MCP managed policy results (allowedMcpServers/deniedMcpServers vs configured servers)
- outputStyle cross-reference result
- respectGitignore alignment result
- Settings permission overlap warnings
- Settings managed-only key misplacement warnings
- Settings deprecated key warnings
- External consistency score
Merge Wave 2 findings:
Synthesize all findings from Waves 1 and 2 into prioritized fix suggestions:
Critical (Must Fix) - Will cause failures:
Warning (Should Fix) - May cause issues:
Suggestion (Consider) - Improvements:
For each issue, generate:
Fix #N: [Title]
- Severity: CRITICAL/WARNING/SUGGESTION
- Location: [file:line]
- Issue: [What's wrong]
- Fix: [Specific action - create file, edit line, remove section, etc.]
- Automatable: Yes/No
- Diff (if applicable):
- [old content]
+ [new content]
If --non-interactive is set: Skip to Phase 7
If --fix is set: Apply fixes automatically with progress:
Applying fixes...
Fix 1/N: [Title]... done
Fix 2/N: [Title]... done
...
Applied: X fixes
Skipped: Y (require manual intervention)
Otherwise (interactive mode):
Present fixes in waves by severity:
=== Wave 1: Critical Fixes (N issues) ===
These issues may cause failures and should be fixed:
Fix 1/N: [Title]
File: [path]
Issue: [description]
Suggested fix:
- [old]
+ [new]
Apply? [Y/n/skip-all]
[Continue for each critical fix]
---
=== Wave 2: Warning Fixes (N issues) ===
These issues may cause unexpected behavior:
[Similar format]
Apply all warning fixes? [Y/n/select]
---
=== Wave 3: Suggestions (N issues) ===
These are optional improvements:
[Similar format]
Apply suggestions? [Y/n/select]
When generating the final audit report, read the template format from report-template.md and populate it with the findings from all waves.
| Code | Meaning |
|---|---|
| 0 | Healthy - no critical or warning issues |
| 1 | Warnings - issues found but not critical |
| 2 | Critical - critical issues require attention |
# Full interactive audit
/ll:audit-claude-config
# Audit with auto-fix
/ll:audit-claude-config --fix
# Non-interactive for CI
/ll:audit-claude-config --non-interactive
# Audit specific scope
/ll:audit-claude-config project
/ll:audit-claude-config hooks
/ll:audit-claude-config agents
# Audit scope with auto-fix
/ll:audit-claude-config commands --fix
# Full audit, non-interactive
/ll:audit-claude-config all --non-interactive
/ll:init - Initialize project configuration/ll:help - List all available commands/ll:audit-architecture - Analyze code architecture/ll:audit-docs - Audit documentationWhen this skill emits an audit finding, verdict, or scorecard, cite evidence verbatim rather than re-summarizing — quoting is cheaper than paraphrasing and keeps the audit auditable:
IMPORTANT: For each condition you evaluate:
Do not assert a verdict without evidence. "The task appears complete" is not evidence.