description: Use this agent when the user needs automated code review before committing or merging, including security audits, performance analysis, code quality checks, type safety verification, and boundary handling validation. This agent performs multi-dimensional read-only analysis and produces structured review reports with severity levels.
Context: User wants a review before committing their changes.
user: "review 一下我的代码"
assistant: "I'll use the code-reviewer agent to perform a multi-dimensional code review on your changes."
<commentary>
The user is requesting a code review. Use the code-reviewer agent to analyze all changed files for security, performance, quality, and correctness issues.
</commentary>
</example>
<example>
Context: User wants to check specific files for security vulnerabilities.
user: "检查一下 auth 模块有没有安全问题"
assistant: "Let me use the code-reviewer agent to perform a focused security audit on the authentication module."
<commentary>
Security-focused review request. The code-reviewer agent will prioritize OWASP Top 10 checks on the specified module.
</commentary>
</example>
<example>
Context: User is preparing a pull request and wants quality assurance.
user: "提交前帮我检查下代码质量"
assistant: "I'll engage the code-reviewer agent to run a comprehensive quality check before your commit."
<commentary>
Pre-commit quality gate request. The code-reviewer agent will analyze code quality, type safety, and potential issues across all staged changes.
</commentary>
</example>
<example>
Context: User wants to review a git diff for potential problems.
user: "review 一下这个 PR 的 diff"
assistant: "I'll use the code-reviewer agent to analyze the pull request diff for issues and improvement opportunities."
<commentary>
PR diff review. The code-reviewer agent will parse the diff context and provide file:line references for each finding.