/audit
This skill executes the content of the .claude/commands/audit.md command file.
Sub-command routing
| Sub-command | Behavior |
|---|---|
| (none) | Unified check: config audit + trend analysis + auto-apply |
config | Config audit only (CLAUDE.md, commands, agents, skills, doc sync) |
quick | Quick check (version / counts only) |
deep | Deep check (includes content analysis) |
fix | Auto-fix detected issues |
baseline | Save current state as baseline |
suggest [area] | Solution recommendations |
trend | Gmail-briefing-based trend analysis + workflow gap analysis + mail deletion |
trend --apply | Trend analysis + auto-apply + commit + mail deletion (full automation) |
--auto-implement | Unified check + auto-implementation (Phase 0-5, Self-Improving Loop) |
ledger | View improvement history (improvement-ledger.json) |
ledger stats | Improvement statistics summary (total proposals / applied / PRs / backlog / revert) |
Unified workflow (default behavior)
When /audit is run alone, it performs config audit and trend analysis in one pass.
code
/audit run
│
├─ [Phase 1] Config audit
│ ├─ CLAUDE.md check (version, command/agent/skill counts)
│ ├─ Command check (frontmatter, required sections)
│ ├─ Agent check (role, expertise, tools)
│ ├─ Skill check (SKILL.md presence, triggers)
│ └─ Doc sync check
│
├─ [Phase 2] Trend analysis + auto-apply
│ ├─ Verify Gmail authentication
│ ├─ Collect briefing mails from Drafts
│ ├─ Analyst agent extracts trends + gap analysis
│ ├─ Print improvement ideas
│ ├─ Auto-apply LOW/MEDIUM complexity proposals + commit
│ └─ Auto-delete briefing mails
│
└─ [Phase 3] Unified result summary
Core rules:
- •Phase 1 always runs
- •Phase 2 is skipped on Gmail auth failure (config audit result only)
- •If no briefing mails, Phase 2 prints "no mail" and proceeds to Phase 3
- •Phase 3 outputs unified config audit + trend results
trend sub-command workflow
code
/audit trend run
│
├─ [1/5] Verify Gmail authentication
├─ [2/5] Collect briefing mails from Drafts (in:draft subject:Claude Code)
├─ [3/5] Analyst agent: trend extraction + current workflow gap analysis
├─ [4/5] Print improvement idea proposals
└─ [5/5] Delete briefing mails after user confirmation
Core rules:
- •Mail deletion requires user confirmation (
--dry-runskips deletion) - •
--savestores results at.claude/research/audit-trend-<date>.md - •
--applyadditionally runs Step 4.5 (auto-apply + commit)
Command file reference
Detailed workflow: .claude/commands/audit.md