npx skills add ...
npx skills add yoshiko-pg/difit --skill difit-review
Review a specific diff (branch, commit, or GitHub PR) and show the findings as comments inside difit, the local diff viewer. Explicit opt-in only — use when the user explicitly names difit, asks to open or annotate the review in the difit viewer, or invokes this skill by name. For ordinary requests to review code, diffs, commits, branches, or pull requests, review normally and respond in the conversation without launching difit.
npx skills add yoshiko-pg/difit --skill difit-review
difit opens an external browser UI and starts a long-running local server, so launching it must be explicit opt-in:
This skill launches a requested git diff in a viewer that is easy for humans to read. At the same time, the agent can attach arbitrary comments via the --comment option.
This comment mechanism is well suited for code review findings and code explanations.
Before running commands, choose <difit-command> using the following rule:
command -v difit succeeds, use difit.npx difit.npx difit would require network access in a sandboxed environment without network permission, request escalated permissions and user approval before running it.The final command typically looks like this:
The detailed procedure is as follows.
<difit-command> comment add --port <port> '<json>' (same JSON shape as --comment) and let the open page pick them up.--keep-alive or --background (a detached keep-alive server that prints JSON connection info such as {"port":4966,"url":"http://localhost:4966","pid":123} without auto-opening a browser), then use comment add / comment get --port <port> for later rounds.<difit-command> <target> [compare-with] to specify the target diff.<difit-command> ., for working tree changes use <difit-command> working, and for staged changes use <difit-command> staged.diff -u file1.txt file2.txt | <difit-command>.type: "thread" for each comment.position.side: "new" for lines that exist on the target side of the diff.position.side: "old" for lines that exist only on the deleted side.--comment bodies or any command-line arguments.--include-untracked.