Audit Claude Code slash commands for quality, compliance, and maintainability.
Audit Claude Code slash commands for quality, compliance, and maintainability. Use it to validate your custom commands or plugin commands before publishing or after making changes.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install claude-code-observability@melodic-softwareAudit Claude Code slash commands for quality, compliance, and maintainability.
Before auditing, initialize the environment:
Get the current UTC date, capture the project root path, ensure the temp directory exists, and clean up stale audit files (unless --recover). The command-development skill provides authoritative validation guidance (auto-loaded when this command runs).
| Argument | Description |
|---|---|
| (none) | Smart mode: audit modified, never-audited, or stale (>90 days) commands |
--force | Audit ALL commands regardless of status |
--plugin-only | Only audit local plugin commands |
--project-only | Only audit project commands (.claude/commands/) |
--global-only | Only audit globally installed plugin commands |
--recover | Recover results from interrupted audit |
command-name | Audit specific command(s) by name |
Detect all command sources in local repo and globally installed plugins.
For local discovery, check marketplace repos, single plugin repos, and .claude/commands/. Track plugin names for deduplication.
For global discovery, check ~/.claude/plugins/ (Unix) or %USERPROFILE%\.claude\plugins\ (Windows). Skip globals with local dev versions.
Parse flags and command names. Read audit logs for each source.
Display mode, sources discovered, deduplication status, and audit queue with batching strategy.
For each command, spawn the command-auditor subagent with source, path, and last audit date. Run in parallel batches of 3-5.
Use progressive persistence: persist results after each batch. Subagents write to .claude/temp/. The main conversation thread collects results and updates audit logs using its Write/Edit tools.
Report total audited by source, results, and details table. Note that global command fixes must be applied manually.
| Category | Points |
|---|---|
| File Structure | 20 |
| YAML Frontmatter | 25 |
| Description Quality | 20 |
| Tool Configuration | 15 |
| Content Quality | 20 |
Thresholds: 85+ = PASS, 70-84 = WARNINGS, <70 = FAIL
All audit results are written to .claude/audit/commands.md.
Use /audit-log commands to view current audit status.
If context collapses mid-audit, use /audit-commands --recover to recover from .claude/temp/ files.
User: /audit-commands
Claude: Discovering command sources...
## Audit Plan
**Mode**: SMART
- Plugin: claude-ecosystem (24 commands)
- Plugin: code-quality (4 commands)
- Deduplicated: claude-ecosystem (global skipped)
**Will audit**: 8 commands in 2 batches
[Spawns command-auditor subagents]
## Audit Complete
| Source | Command | Result | Score |
| --- | --- | --- | --- |
| plugin | scrape-docs | PASS | 100/100 |
User: /audit-commands plugin:scrape-docs
Claude: PASS (Score: 100/100)