# Claude Commit Diff Reviewer MCP for AI Agents AI Agent Connect

> Claude Commit Diff Reviewer checks your git diffs against your original task descriptions. It catches scope creep, identifies unintended code changes, and flags messy patterns like leftover debug statements or TODOs before you commit. It's a specialized guardrail for developers using AI to write code.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_ztCYbdoPzFFyXS4OEFqSubdnqBhKif5YGo0iOlbC/ai-agent-connect
- **Tags:** git, diff, code-review, ai-safety, quality-assurance

## Description

Writing code with an AI agent is fast, but it's easy for the agent to wander off-task. You might ask for a simple logic update, only to find the agent has refactored three unrelated files or left a messy print statement in your production code. This MCP acts as a second pair of eyes that specifically looks for those discrepancies. It breaks down your git diffs into manageable pieces and compares them directly to what you actually asked for. It can tell if a change is exactly what you wanted, a side effect of the main change, or something completely irrelevant. By catching these drifts and spotting unwanted patterns like debug logs or unfinished tasks, it keeps your pull requests clean and your codebase stable. You can find this and thousands of other specialized tools in the Vinkius catalog, where you connect your preferred client once and get instant access to everything.

## Tools

### analyze_diff_relevance
Compares git diffs to your task description to find scope creep. It tells you if the changes are actually what you asked for.

### identify_file_scope
Lists all files modified in a diff. This helps you see the full footprint of the changes.

### summarize_change_distribution
Provides a statistical breakdown of how many lines and files were changed. It helps you gauge the scale of a diff.

## Prompt Examples

**Prompt:** 
```
Does this diff actually match my request to update the user authentication logic?
```

**Response:** 
```
The diff is mostly aligned with your request. 

**Analysis:**
- **Intended Changes:** 4 (Updated `auth.ts` and `user.ts`)
- **Unrelated Changes:** 1 (Modified `config.json` which was not requested)
- **Flagged Patterns:** 0

**Recommendation:** You should revert the change to `config.json` before committing.
```

**Prompt:** 
```
How much of the codebase did these changes touch?
```

**Response:** 
```
The changes are relatively concentrated. 

| Metric | Value |
| :--- | :--- |
| **Files Modified** | 3 |
| **Total Lines Changed** | 28 |
| **Primary Files** | `src/api/`, `src/models/` |

Most of the work happened within the API layer.
```

**Prompt:** 
```
Check this diff for any messy code or debug statements.
```

**Response:** 
```
I found a few issues in the diff:

*   **Debug Statement:** `console.log("DEBUG: user_id=", user.id);` found in `src/auth.ts:42`.
*   **Unfinished Task:** A `// TODO: implement retry logic` was added in `src/client.ts:115`.

I recommend removing the log statement before finalizing this commit.
```

## Capabilities

### Catch scope creep
Compares code changes against your original instructions to see if the agent did too much.

### Spot messy code patterns
Scans diffs for debug statements, TODOs, or other leftover clutter.

### Map change distribution
Shows exactly how many files and lines were touched by a specific set of changes.

### Identify modified files
Lists every file affected by a diff to help you understand the blast radius.

### Classify code hunks
Labels changes as intended, cascading, or unrelated based on your task description.

## Use Cases

### Preventing accidental refactors
You ask an agent to fix a single function, but it rewrites the whole module. Use analyze_diff_relevance to catch this before you commit.

### Cleaning up debug leftovers
An agent leaves a console.log or a temporary print statement in the code. The MCP flags these patterns immediately.

### Verifying small bug fixes
When a tiny fix results in 50 lines of changes, use summarize_change_distribution to see if the impact is disproportionate.

### Auditing AI-heavy PRs
When a teammate uses an agent for a large feature, use identify_file_scope to quickly see which parts of the system were touched.

## Benefits

- Stop scope creep by using analyze_diff_relevance to ensure changes match your intent.
- Keep codebases clean by automatically spotting debug statements and TODOs in diffs.
- Understand the blast radius of changes using identify_file_scope.
- Get a quick sense of change scale with summarize_change_distribution.
- Reduce manual review time by letting your agent classify diff hunks automatically.

## How It Works

The bottom line is you get an automated code reviewer that ensures AI-generated changes stay strictly within the bounds of your request.

1. Connect your AI client to the MCP via Vinkius
2. Provide the git diff and your original task description to your agent
3. Receive a breakdown of change relevance and pattern flags

## Frequently Asked Questions

**How can I use Claude Commit Diff Reviewer to prevent scope creep?**
You can use the relevance analysis tool to compare your git diff against your original task description. This tells you if the agent added changes that weren't part of your initial request.

**Can this MCP find debug statements in my code?**
Yes. The MCP scans your diffs for common unwanted patterns like debug logs, print statements, and TODO comments that often get left behind by AI agents.

**Will this help me review AI-generated pull requests faster?**
Absolutely. It automates the tedious part of code review by classifying changes and summarizing exactly which files were modified, so you don't have to hunt for them.

**Does Claude Commit Diff Reviewer work with other AI clients?**
Yes, as long as your client is MCP-compatible, you can use this to audit your code changes regardless of which specific agent you are using.

**How does it know if a change is 'unrelated' to my task?**
It uses keyword matching and context analysis to compare the specific code hunks in your diff to the instructions you gave your agent, flagging anything that doesn't fit the pattern.

**How does the tool determine if a change is intended?**
The tool uses deterministic keyword matching to compare the content of each diff hunk against the keywords provided in the task description.

**What are 'unrelated changes'?**
Unrelated changes are modifications in the git diff that have no keyword overlap with the original task description, indicating potential scope creep.

**Can I use this with Cursor or Claude Desktop?**
Yes, this MCP server can be connected to Cursor, VS Code, Claude Desktop, Windsurf, and any other MCP-compatible client via Vinkius Edge.