Display Name
/fan-out-audit
Category
Slash-Commands
Sub-Category
Slash-Commands: Code Analysis & Testing
Primary Link
https://github.com/lachiejames/fan-out-audit
Author Name
lachiejames
Author Link
https://github.com/lachiejames
License
MIT
Other License
No response
Description
Slash command that fans out parallel agents across a codebase, each reading 5-8 files and writing structured findings to its own markdown file. Scales to any repo size (agent count adjusts automatically). A second wave of agents detects cross-cutting patterns across slices. Includes two real example audits (tropes violations across 809 files, type-safety improvements across 1,834 files) with full output.
Validate Claims
Install the command (cp fan-out-audit.md .claude/commands/) and run /fan-out-audit find refactoring opportunities on any repo. Phase 1 agents will write individual findings files to audits/refactoring-opportunities/phase1/, each with specific file paths and line numbers. You can verify the output by opening any phase1 file and checking the cited line numbers against the actual source files. Alternatively, browse the two example audits included in the repo (examples/tropes-violations/ and examples/type-safety-improvements/) to see real output without running anything.
Specific Task(s)
Run the command against a codebase to audit for a specific concern (e.g., long functions, duplicated logic, type safety issues). The command pre-filters files, groups them into slices, shows a plan for confirmation, then launches parallel agents that each write findings to their own file. Verify that output files appear in your editor as agents complete, and that findings cite specific file paths and line numbers.
Specific Prompt(s)
/fan-out-audit help me find opportunities for type-safety improvements in my codebase, such as
- leveraging client sdk types instead of defining our own custom types (e.g. for linear/sdk, googleapis, slack/web-api, etc)
- avoiding type-casting
- finding eslint rules and tsconfig changes that enforce a higher standard for typescript
- avoiding "any" or "unknown" types
- avoiding weakening to Record<string,...> types instead of keeping objects as constants, or keying by a stricter type
- de-duping types
Additional Comments
The repo includes two complete example audits with all output files (220 files from a tropes/copy audit, 250+ files from a type-safety audit) so reviewers can browse real results without running anything. The command is a single markdown file with no dependencies, no hooks, no scripts, and no network requests beyond the standard Anthropic API calls that Claude Code makes. Lessons learned from building it (including the Explore vs general-purpose agent type gotcha and anti-shortcut guardrails for the orchestrator) are documented in the README.
Recommendation Checklist
Display Name
/fan-out-audit
Category
Slash-Commands
Sub-Category
Slash-Commands: Code Analysis & Testing
Primary Link
https://github.com/lachiejames/fan-out-audit
Author Name
lachiejames
Author Link
https://github.com/lachiejames
License
MIT
Other License
No response
Description
Slash command that fans out parallel agents across a codebase, each reading 5-8 files and writing structured findings to its own markdown file. Scales to any repo size (agent count adjusts automatically). A second wave of agents detects cross-cutting patterns across slices. Includes two real example audits (tropes violations across 809 files, type-safety improvements across 1,834 files) with full output.
Validate Claims
Install the command (
cp fan-out-audit.md .claude/commands/) and run/fan-out-audit find refactoring opportunitieson any repo. Phase 1 agents will write individual findings files toaudits/refactoring-opportunities/phase1/, each with specific file paths and line numbers. You can verify the output by opening any phase1 file and checking the cited line numbers against the actual source files. Alternatively, browse the two example audits included in the repo (examples/tropes-violations/ and examples/type-safety-improvements/) to see real output without running anything.Specific Task(s)
Run the command against a codebase to audit for a specific concern (e.g., long functions, duplicated logic, type safety issues). The command pre-filters files, groups them into slices, shows a plan for confirmation, then launches parallel agents that each write findings to their own file. Verify that output files appear in your editor as agents complete, and that findings cite specific file paths and line numbers.
Specific Prompt(s)
/fan-out-audit help me find opportunities for type-safety improvements in my codebase, such as
Additional Comments
The repo includes two complete example audits with all output files (220 files from a tropes/copy audit, 250+ files from a type-safety audit) so reviewers can browse real results without running anything. The command is a single markdown file with no dependencies, no hooks, no scripts, and no network requests beyond the standard Anthropic API calls that Claude Code makes. Lessons learned from building it (including the Explore vs general-purpose agent type gotcha and anti-shortcut guardrails for the orchestrator) are documented in the README.
Recommendation Checklist