Audit Claude Code subagents for quality, compliance with official documentation, and maintainability.
Audit Claude Code subagents for quality, compliance, and maintainability. Run without arguments for smart mode (modified/stale agents only), or use --force to audit all agents.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install claude-code-observability@melodic-softwareAudit Claude Code subagents for quality, compliance with official documentation, 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 subagent-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) agents |
--force | Audit ALL agents regardless of status |
--plugin-only | Only audit local plugin agents |
--project-only | Only audit project agents (.claude/agents/) |
--global-only | Only audit globally installed plugin agents |
--recover | Recover results from interrupted audit |
agent-name | Audit specific agent(s) by name |
Detect all agent sources in local repo and globally installed plugins.
For local discovery, check marketplace repos, single plugin repos, and .claude/agents/. Track plugin names for deduplication.
For global discovery, check ~/.claude/plugins/ (Unix) or %USERPROFILE%\.claude\plugins\ (Windows). Skip globals with local dev versions.
If specific agents named, audit those. If --force, audit all. Otherwise, audit modified/stale agents.
Display mode, sources discovered, deduplication status, and audit queue.
For each agent, spawn the agent-auditor subagent with source, path, and last audit date. Run in parallel batches of 3-5.
Subagents write findings 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 agent fixes must be applied manually.
All audit results are written to .claude/audit/agents.md.
Use /audit-log agents to view current audit status.
If context collapses mid-audit, use /audit-agents --recover to recover from .claude/temp/ JSON files.
User: /audit-agents
Claude: Discovering agent sources...
## Audit Plan
**Mode**: SMART
- Plugin: claude-ecosystem (12 agents)
- Plugin: code-quality (3 agents)
- Deduplicated: claude-ecosystem (global skipped)
**Will audit**: 5 agents
[Spawns agent-auditor subagents]
## Audit Complete
| Source | Agent | Result | Score |
| --- | --- | --- | --- |
| plugin | code-reviewer | PASS | 100/100 |
User: /audit-agents plugin:code-reviewer
Claude: PASS (Score: 100/100)