perform_code_review
Analyze git code changes using a specified LLM to review staged, HEAD, or branch_diff code. Focus on task-specific improvements, security, performance, or design principles, with customizable model and token limits.
Instructions
Performs a code review using a specified LLM on git changes. Requires being run from the root of a git repository.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
diffBase | No | For 'branch_diff' target, the base branch or commit SHA to compare against (e.g., 'main', 'develop', 'specific-commit-sha'). Required if target is 'branch_diff'. | |
llmProvider | Yes | The LLM provider to use (google, openai, anthropic). | |
maxTokens | No | Maximum number of tokens to use for the LLM response. Defaults to 32000 if not specified. | |
modelName | Yes | The specific model name from the provider (e.g., 'gemini-2.5-pro-preview-05-06', 'o4-mini', 'claude-3-7-sonnet-20250219'). | |
projectContext | No | General context about the project, its architecture, or coding standards. | |
reviewFocus | No | Specific areas or aspects to focus the review on (e.g., 'security vulnerabilities', 'performance optimizations', 'adherence to SOLID principles'). | |
target | Yes | The git target to review (e.g., 'staged', 'HEAD', or 'branch_diff'). | |
taskDescription | Yes | Description of the task/feature/bugfix that led to these code changes. |