Use when code needs cleanup, dead code removal, complexity reduction, or quality improvement, with "all" for project-wide audit
Dispatch the simplifier agent to cleanup dead code, reduce complexity, and improve code quality. Focuses on Go, JavaScript/TypeScript, Python, and Rust codebases.
/simplifierScans recent changes for cleanup opportunities.
Task tool with subagent_type="simplifier"
prompt: "Review recent code changes for dead code, complexity, and quality issues.
Identify modified files, find cleanup opportunities, suggest simplifications."
/simplifier <scope>Analyzes only the specified scope (file, module, function).
Task tool with subagent_type="simplifier"
prompt: "Review and simplify code in: [scope]
Focus only on this area. Find dead code, reduce complexity, improve quality."
Scope examples:
/simplifier src/handlers - simplify handlers module/simplifier utils/parser.ts - simplify specific file/simplifier internal/service - simplify Go service package/simplifier UserService - simplify specific class/service/simplifier allPerform a planned, modular code quality audit covering the entire repository.
Task tool with subagent_type="simplifier"
prompt: "Perform comprehensive code quality audit of the entire repository.
Create a TodoWrite plan with one item per module or package, then process sequentially.
Consult references/comprehensive-mode.md for the quality aspect checklist and execution flow.
Do not skip any area. Continue until ALL areas are reviewed."
For the quality aspect checklist and example plan, consult references/comprehensive-mode.md.
After adding a feature:
/simplifier
β Reviews recent changes, suggests cleanup
Simplify specific module:
/simplifier src/services/payment
β Focuses only on payment service
Simplify a complex function:
/simplifier processOrder
β Analyzes and simplifies the function
Full project audit:
/simplifier all
β Creates plan, systematically reviews every module
| Language | Key Checks |
|---|---|
| Go | Unchecked errors, empty interface abuse, defer in loops, context propagation |
| JS/TS | any abuse, unused hooks deps, mixed async patterns, optional chaining opportunities |
| Python | Mutable defaults, broad exceptions, unused imports |
| Rust | Unwrap in production paths, needless clones, owned parameters for read-only use, verbose matching |
Language-specific pattern references are available for deeper analysis. When dispatching the simplifier agent, detect the primary language(s) in scope and include the relevant reference content in your dispatch prompt:
| Scope Language | Reference File |
|---|---|
| Go | references/go-patterns.md |
| JavaScript / TypeScript | references/js-ts-patterns.md |
| Python | references/python-patterns.md |
| Rust | references/rust-patterns.md |
Dispatch instruction: Read the relevant reference file(s) and append their content to the agent prompt under a "## Language-Specific Patterns" heading. If the scope contains multiple languages, include all applicable references. If the language is unknown or mixed, include all four.