review_git_diff
Analyze git code changes automatically using AI to identify issues and provide structured findings with confidence scores for staged, unstaged, or branch comparisons.
Instructions
Review code changes from git automatically.
This tool combines git diff retrieval with AI-powered code review. It automatically:
Retrieves the diff from git based on the target
Analyzes the changes for issues
Returns structured findings with confidence scores
Target Options:
'staged' (default): Review staged changes (git diff --staged)
'unstaged': Review unstaged working directory changes
'head': Review all uncommitted changes (staged + unstaged)
'': Review changes compared to a branch (e.g., 'main')
'': Review a specific commit
Example usage:
Review staged changes: { "target": "staged" }
Review against main: { "target": "main" }
Review a commit: { "target": "abc1234" }
Review feature branch: { "target": "feature/login", "base": "main" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Target to review: 'staged', 'unstaged', 'head', branch name, or commit hash. Default: 'staged' | staged |
| base | No | Base reference for branch comparisons (e.g., main, develop) | |
| include_patterns | No | File patterns to include in review (glob patterns) | |
| options | No | Review options (same as review_changes tool) |