Audit codebase sections against configurable code standards using parallel specialist agents. Use when checking code quality, enforcing standards, or running periodic health checks on the codebase.
From zenflownpx claudepluginhub brewpirate/zen-flow --plugin zenflowThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Audit codebase sections against configurable standards using parallel specialist agents. Each section gets reviewed by the right type of agent against the relevant standards. Produces a structured report with file:line findings.
Announce at start: "I'm using the zenflow:audit skill to audit the codebase."
Modes:
/zenflow:audit changed) — only audit files modified in the current branch vs mainWhen invoked with changed, only audit files that have been modified:
git diff --name-only main...HEAD
dir paths)This is fast enough for pre-merge checks and CI. Use full mode for periodic comprehensive audits.
Audit config is read from the agents array in .claude/zen.local.md:
---
project:
language: typescript
framework: nextjs
agents:
- domain: api-routes
dir: packages/server/src/server/routes/
glob: "*.ts"
agent: Backend Architect
rules:
- error-handling
- async-patterns
- domain: frontend
dir: packages/frontend/src/components/
glob: "**/*.tsx"
agent: Frontend Developer
rules:
- react-patterns
---
| Field | Description |
|---|---|
domain | Section label in the audit report |
dir | Directory to audit |
glob | File pattern (default: **/*) |
agent | Agent type to dispatch |
rules | Rule names — resolved to .claude/rules/{name}.md |
If no agents array exists in zen.local.md, run zenflow:init first:
"No zen config found. Run
/zenflow:initto scan the codebase and generate config automatically."
.claude/zen.local.mdagents array from frontmatter/zenflow:init and stopLaunch one subagent per section in parallel via the Agent tool:
Each auditor receives:
Auditor instructions:
You are auditing {section.name} against these standards:
{standards text}
Files to audit:
{file list}
For each file, check compliance with every standard. Report:
## Findings
### {filename}:{line}
- **Standard:** {which standard is violated}
- **Severity:** Critical | Important | Minor
- **Issue:** {what's wrong}
- **Fix:** {how to fix it}
### Summary
- Files audited: N
- Findings: N (Critical: N, Important: N, Minor: N)
- Clean files: N
Agent type selection:
agent field from the matching agents entryagent is set, glob .claude/agents/*.md and ~/.claude/agents/*.md, read each file's name and description, match by section domain and file types, fall back to general-purpose"[N] sections are using auto-selected agents. Run
/zenflow:initto generate agent assignments, or specifyagentin your zen.local.md config."
After all auditors complete:
## Audit Report
**Sections audited:** 4
**Files audited:** 47
**Total findings:** 12 (Critical: 1, Important: 5, Minor: 6)
### Critical
1. [packages/server/src/server/routes/api.ts:45] — Missing error boundary...
### Important
...
### Minor
...
### Clean Sections
- Type Schemas (14 files) — no findings
After presenting the report, ask the user:
Question: "How should we handle the findings?"
Options:
If fixing: dispatch subagents to fix findings, then run zenflow:check-work.
For recurring audits, suggest the user set up a cron job:
/loop 24h /zenflow:audit