difit

MH4GF's avatarfrom MH4GF

Git diff viewer with web UI and AI prompt generation. Use when "difit" is mentioned, or when reviewing diffs/PRs with AI-friendly output.

⭐2stars🔀0forks📁View on GitHub🕐Updated Jan 4, 2026

When & Why to Use This Skill

Difit is a powerful Git diff viewer designed to streamline the code review process by providing a visual web-based interface and automated AI prompt generation. It bridges the gap between local development and AI-assisted analysis, allowing developers to transform raw git diffs into structured, AI-friendly prompts for high-quality feedback on code changes, logic improvements, and bug detection.

Use Cases

  • Case 1: Visualizing complex local changes in a web UI before committing code to ensure clarity and accuracy.
  • Case 2: Generating optimized prompts for AI models like Claude to perform automated, deep-dive code reviews on specific Git commits or staged changes.
  • Case 3: Comparing feature branches against the main branch to identify potential regressions and architectural inconsistencies during the PR preparation phase.
  • Case 4: Adding interactive review comments within a visual diff tool to organize thoughts before sharing feedback with a team or an AI assistant.
namedifit
descriptionGit diff viewer with web UI and AI prompt generation. Use when "difit" is mentioned, or when reviewing diffs/PRs with AI-friendly output.

difit

Web-based Git diff viewer with AI prompt generation. https://github.com/yoshiko-pg/difit

Commands

# Uncommitted changes
git diff | bunx difit

# Staged changes
git diff --staged | bunx difit

# Specific commit
git show <commit-hash> | bunx difit

# Compare branches
git diff main..feature | bunx difit

# Latest commit
git show HEAD | bunx difit

Usage in Claude Code

Run with run_in_background: true to keep the server running:

git diff | bunx difit  # run_in_background: true

Workflow

  1. Pipe git diff to bunx difit (background)
  2. Browser opens with diff view
  3. Click lines to add review comments
  4. Copy AI prompt with "Copy Prompt" button
  5. Paste prompt to AI for code review feedback