difit
Git diff viewer with web UI and AI prompt generation. Use when "difit" is mentioned, or when reviewing diffs/PRs with AI-friendly output.
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.
| name | difit |
|---|---|
| description | Git 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
- Pipe git diff to
bunx difit(background) - Browser opens with diff view
- Click lines to add review comments
- Copy AI prompt with "Copy Prompt" button
- Paste prompt to AI for code review feedback