difit CLI

A CLI that opens a local git diff in the browser like GitHub's Files changed tab; comments copy out as prompts for an agent

  • 3,273 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • Starts a local web server holding your code; with --host 0.0.0.0 the diff is reachable from the network
  • In --pr mode it calls gh with your GitHub authorization and reads the patch and review discussions
  • The difit-review skill runs git commands and reads project code; the agent writes the comments itself
All reasons and checks

yoshiko-pg/difit

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/difit

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Starts a local web server holding your code; with --host 0.0.0.0 the diff is reachable from the network
  • In --pr mode it calls gh with your GitHub authorization and reads the patch and review discussions
  • The difit-review skill runs git commands and reads project code; the agent writes the comments itself

This is third-party code. Review the repository files before installing.

What it does

difit starts a web server on your machine and shows the diff of a commit, a branch or all uncommitted edits in the browser in the familiar GitHub layout. To give an agent feedback, select a line or range, write a comment and press "Copy Prompt": the clipboard gets the file path with line numbers and your text. The diff can come from git, from a pull request by URL (difit runs gh pr diff and pulls in unresolved review threads) or from stdin. Two agent skills, difit and difit-review, let the agent open a diff for your review itself or place its own findings directly in the difit window. Generated files such as lock files, minified scripts and protobuf code are collapsed by default.

Who it is for. For developers who check Claude Code or Codex edits before committing and want to read a diff the GitHub way without sending code to the cloud.

Good fit when

  • An agent finished a task and you want to read every uncommitted edit with difit . in a comfortable view rather than in the terminal
  • You need to send line-specific feedback back to an agent: a comment copies as a ready prompt with the path and range
  • You want to review someone else's pull request locally with difit --pr and the PR URL, unresolved discussions included
  • You want the agent to place its own review findings in the difit window: that is what the difit-review skill does
  • The diff comes from another tool: pipe it to stdin, for example git diff --merge-base main feature | difit

Not a fit when

  • You want an ordinary review of the edits in the agent's reply: the difit skills activate only on explicit request, and for asks like "review these changes" the agent answers as usual
  • You need comments in the pull request on GitHub itself: difit keeps comments in the browser and publishes nothing to the remote repository
  • You work on a server with no browser: difit opens a browser interface, and network access needs you to bind the host yourself via --host
  • You want a terminal diff viewer: other tools cover that, difit shows a web interface

Example request

Open my uncommitted changes in difit, I will look through them and leave comments

Limitations

Requires Node.js 21 or newer and a git repository with commits. The --pr mode needs GitHub CLI (gh), signed in via gh auth login or a GH_TOKEN variable. Comments are stored in the browser's localStorage per commit, so they disappear if you change browsers or clear data. The --context flag is unavailable with --pr and with stdin. Untracked files need the --include-untracked flag, which works only with the . and working arguments.

How to disable. Stop the server with Ctrl+C or, if you started it with --background, end the process whose pid the JSON output gave. `npm uninstall -g difit` removes the global install. Delete the skills from the project's skills directory or the global one where they sit.

FAQ

How do I open an agent's uncommitted changes in difit?

Run difit . in the repository root. The . argument covers both staged and unstaged edits. difit staged shows only the index and difit working only the working files. The default address is 127.0.0.1:4966, and if the port is busy difit takes the next one.

How do I install the difit skills in Claude Code or Codex?

Run npx skills add yoshiko-pg/difit. Two skills install: difit asks you for a review in the viewer window, and difit-review shows the agent's own findings there. Both activate only when you explicitly name difit.

How do I review a GitHub pull request in difit?

Run difit --pr https://github.com/owner/repo/pull/123. difit fetches the patch through gh pr diff --patch and loads unresolved review threads as starting comments. For Enterprise Server, first sign in with gh auth login --hostname and your server's address.

How do I send feedback from difit back to the agent?

Each comment has a "Copy Prompt" button and the whole review has "Copy All Prompt". The clipboard gets the file path with a line number or a range like L42-L48 and your text. If the agent launched difit itself through the skill, the feedback returns on stdout when the server closes.

How is difit different from viewing a diff in an IDE or on GitHub?

It works locally on changes not yet pushed and turns comments into prompts for the agent at once. On GitHub you would first have to push the branch and open a pull request.

Discussion

No questions or reviews yet.

CLI tools

A terminal diff viewer: all files in one stream, and an agent with the hunk-review skill walks through the changes and leaves line comments

CLIExtended access9.7KRepository stars

A code-review CLI and plugin for agents: reads a git diff and writes line-level comments with context

CLIExtended access48KRepository stars

Crit opens a coding agent's plans, diffs and running apps in a browser: click a line, leave a comment and the agent receives it

CLIExtended access1.2KRepository stars

A herdr plugin: the agent's code diff in a terminal pane beside the chat, line comments and notes sent back to Claude Code, Codex or OpenCode

CLIExtended access928Repository stars

A CLI and three skills that work through review-bot comments on a PR: assess findings, fix code, reply and wait for checks

SkillBroad access306Repository stars
Editors’ pick

Indexes a codebase into a knowledge graph and gives the agent call chains, change blast radius and code search over MCP

MCP serverExtended access48KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialRepository starsMain difference
difit (this entry)no3,273
Hunkno9,657a diff viewer in the terminal, while difit opens a web interface in the browser
Plannotatorno9,570annotations for agent plans and diffs through Claude Code hooks, while difit works with any diff from git, a PR or stdin
PR Lensno2,199builds diagrams and an overview of a pull request, while difit shows the diff itself with prompt comments

README in short

The README opens with three ways to start: npx difit without installing, a global npm install, and npx skills add for agents. It then covers modes: a single commit, two commits or branches, the special arguments ., staged and working, a pull request via --pr and a diff from stdin. A flag table sets the port (4966 by default), host, context, background mode and clearing comments. After that come comments and the prompt format, syntax highlighting for dozens of languages, and the rules for auto-collapsing deleted and generated files. The end has sections on development, architecture and requirements.

README badge

Original SKILL.md

---
name: difit
description: Ask the user for a code review by opening the changes in difit, a local diff viewer. Explicit opt-in only — use when the user names difit, asks to open or show the diff in the viewer, or has a standing instruction to request reviews through difit after changes. Do not use it for ordinary requests to review code, diffs, commits, branches, or pull requests.
---

# Difit

## When to Use This Skill

difit opens an external browser UI and starts a long-running local server, so launching it must be explicit opt-in:

- Use this skill only when the user explicitly names difit, asks to open or show the diff in a viewer, or has a standing instruction (for example in project docs or agent configuration) to request reviews through difit after code changes.
- Do NOT use it for ordinary review requests such as "review these changes", "use the reviewer agent", "find problems in this diff", or "review this PR/commit/branch". Answer those through your normal response channel.
- When a request is ambiguous, prefer the non-difit path.

## Overview

This skill requests a code review from the user using difit.
Before running commands, choose `<difit-command>` using the following rule:

- If `command -v difit` succeeds, use `difit`.
- Otherwise, use `npx difit`.
- If falling back to `npx difit` would require network access in a sandboxed environment without network permission, request escalated permissions and user approval before running it.

If the user leaves review comments, they are printed to stdout when the chosen difit command exits.
When review comments are returned, continue work and address them.
If the server is shut down without comments, treat it as "no review comments were provided." Restarting it is unnecessary.
Manual verification of whether the page launched correctly is also unnecessary.

## Commands

- Review uncommitted changes before commit: `<difit-command> .`
- Review the HEAD commit: `<difit-command>`
- Review staging area changes: `<difit-command> staged`
- Review unstaged changes only: `<difit-command> working`

Basic Usage:

```bash
<difit-command> <target>                    # View single commit diff. ex: difit 6f4a9b7
<difit-command> <target> [compare-with]     # Compare two commits/branches. ex: difit feature main
```

## Optional Startup Comments

If there is something you want to tell the user when difit opens, attach it as startup comments with `--comment`.

Report a problem

Foxx AIdifit
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.