{
  "markdown": "# 🔍 DiffPilot\n\n**Local AI Code Review Before You Push**\n\n[![.NET 9](https://img.shields.io/badge/.NET-9.0-512BD4?style=for-the-badge&logo=dotnet&logoColor=white)](https://dotnet.microsoft.com/)\n[![VS Code](https://img.shields.io/badge/VS%20Code-1.101+-007ACC?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://marketplace.visualstudio.com/items?itemName=BurakKalafat.diffpilot)\n[![MCP](https://img.shields.io/badge/MCP-Protocol-00ADD8?style=for-the-badge)](https://modelcontextprotocol.io/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE)\n\n---\n\n## 💡 Why DiffPilot?\n\n**Review your code locally before creating a PR.** DiffPilot is an MCP server that lets you:\n\n1. **Self-Review Before PR** - Run AI code review on your local changes after your last commit, before pushing\n2. **Reviewer Workflow** - As a code reviewer, checkout the source branch locally and get AI-assisted review\n3. **Auto Branch Detection** - No need to specify `main` - DiffPilot finds your base branch automatically\n\n> 🔒 **100% Local** - No cloud, no external APIs. Works with Azure DevOps, TFS, air-gapped environments.\n\n---\n\n## 🚀 Quick Start\n\n### Install\n```bash\n# VS Code Marketplace\next install BurakKalafat.diffpilot\n\n# Or NuGet (.NET tool)\ndotnet tool install -g DiffPilot\n```\n\n### Use with GitHub Copilot\n```\n# Review my changes (auto-detects base branch)\n@workspace #review_pr_changes\n\n# Review with focus areas\n@workspace #review_pr_changes focus on security and error handling\n\n# Generate commit message\n@workspace #generate_commit_message\n\n# Scan for secrets before committing\n@workspace #scan_secrets\n```\n\n---\n\n## 🛠️ 9 MCP Tools\n\n### PR Review Tools\n| Tool | Example Prompt |\n|------|----------------|\n| `#get_pr_diff` | \"Show diff between my branch and main\" |\n| `#review_pr_changes` | \"Review my PR for security issues\" |\n| `#generate_pr_title` | \"Generate a conventional PR title\" |\n| `#generate_pr_description` | \"Create PR description with checklist\" |\n\n### Developer Tools\n| Tool | Example Prompt |\n|------|----------------|\n| `#generate_commit_message` | \"Generate commit message for staged changes\" |\n| `#scan_secrets` | \"Check for API keys in my changes\" |\n| `#diff_stats` | \"Show change statistics\" |\n| `#suggest_tests` | \"What tests should I write?\" |\n| `#generate_changelog` | \"Generate changelog from commits\" |\n\n---\n\n## ✨ Key Features\n\n| Feature | Description |\n|---------|-------------|\n| 🔄 **Auto Branch Detection** | Automatically finds `main`, `master`, or `develop` |\n| 🔐 **Secret Scanning** | Detects API keys, passwords, tokens, JWT |\n| 📊 **Diff Statistics** | Lines added/removed, file breakdown by type |\n| 🧪 **Test Suggestions** | Pattern-based test case recommendations |\n| 📝 **Conventional Commits** | Generate `feat:`, `fix:`, `refactor:` messages |\n| 🛡️ **Enterprise Security** | Bank-grade input validation, rate limiting, output sanitization |\n\n---\n\n## 🛡️ Security\n\nDiffPilot implements enterprise-grade security features:\n\n| Security Feature | Description |\n|-----------------|-------------|\n| **Input Validation** | All parameters validated against strict patterns |\n| **Injection Prevention** | Command injection, path traversal protection |\n| **Output Sanitization** | Auto-redacts secrets from tool outputs |\n| **Rate Limiting** | Prevents DoS attacks (120 req/min) |\n| **Secure Errors** | No internal details exposed to clients |\n| **Audit Logging** | Security events logged to stderr |\n\n**Auto-Redacted Patterns:** API keys, AWS credentials, GitHub/Slack tokens, JWTs, passwords, private keys, connection strings.\n\nSee [SECURITY.md](SECURITY.md) for full documentation.\n\n---\n\n## 📋 Use Cases\n\n### 1. Self-Review Before PR\n```\n# After finishing your work, before creating PR:\n@workspace #review_pr_changes\n\n# AI reviews your changes and provides feedback\n# Fix issues locally, then push with confidence\n```\n\n### 2. Code Reviewer Workflow\n```bash\n# Checkout the feature branch locally\ngit checkout feature/user-auth\n\n# Use DiffPilot to review\n@workspace #review_pr_changes focus on security\n\n# Get structured review with AI assistance\n```\n\n### 3. Pre-Commit Secret Check\n```\n@workspace #scan_secrets\n\n# Catches API keys, passwords, tokens before they're committed\n```\n\n---\n\n## ⚙️ Configuration\n\n```json\n{\n  \"diffpilot.defaultBaseBranch\": \"main\",\n  \"diffpilot.prTitleStyle\": \"conventional\",\n  \"diffpilot.commitMessageStyle\": \"conventional\"\n}\n```\n\n---\n\n## 📦 Installation Options\n\n| Method | Command |\n|--------|---------|\n| VS Code | `ext install BurakKalafat.diffpilot` |\n| NuGet | `dotnet tool install -g DiffPilot` |\n| Manual | `git clone` + `dotnet build` |\n\n**Requirements:** .NET 9 SDK, VS Code 1.101+, Git\n\n---\n\n## 📜 Version History\n\n### 1.2.0 (2025-12-09)\n- **Security Hardening** - Bank-grade security features\n  - Input validation (CWE-20)\n  - Command injection prevention (CWE-78)\n  - Path traversal protection (CWE-22)\n  - Output sanitization - auto-redacts secrets (CWE-200)\n  - Rate limiting (CWE-400)\n  - Secure error handling\n- Added SECURITY.md documentation\n- 80 new security unit tests\n\n### 1.1.5 (2025-12-08)\n- Updated README with use cases and `#tool` prompts\n- Highlighted auto branch detection\n\n### 1.1.4 (2025-12-07)\n- Icon refinements\n\n### 1.1.3 (2025-12-07)\n- New extension icon (lens with plus/minus)\n\n### 1.1.2 (2025-12-07)\n- Optimized package size\n\n### 1.1.1 (2025-12-07)\n- Updated extension icon\n\n### 1.1.0 (2025-12-07)\n- Improved tool documentation\n\n### 1.0.9 (2025-12-07)\n- Fixed: Server uses workspace folder for git operations\n\n### 1.0.8 (2025-12-07)\n- Shortened tool descriptions for cleaner UI\n\n### 1.0.7 (2025-12-07)\n- Fixed: Bundled server includes TargetFramework\n\n### 1.0.6 (2025-12-07)\n- Fixed: MCP auto-registration for VS Code 1.101+\n\n### 1.0.5 (2025-12-07)\n- Published to NuGet and MCP Registry\n\n### 1.0.0 (2025-12-06)\n- Initial release with 9 MCP tools\n\n---\n\n## 📄 License\n\nMIT License - [Burak Kalafat](https://github.com/bkalafat)\n\n---\n\n**[GitHub](https://github.com/bkalafat/DiffPilot)** • **[VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=BurakKalafat.diffpilot)** • **[NuGet](https://www.nuget.org/packages/DiffPilot)**\n\n⭐ Star if useful!\n",
  "bytes": 6208,
  "sha": "6be6830c1dc1e21535345f37e9782fd5584f70bd31d8d86c73d2c643c4e69b3f",
  "repo_slug": "bkalafat/diffpilot",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_bkalafat_diffpilot_e6abecd2/readme"
}