difit: Skill for Claude Code

.claude/skills/difit-review/SKILL.md

difit-review is a skill for Claude Code from yoshiko-pg/difit. It costs 64 tokens per session (725 once invoked), scanned A, original, MIT.

A code-review workflow that opens a code difference in difit, a visual diff viewer, with review findings attached as comments. A code difference shows what changed between files, commits, branches, or a pull request.

In plain words
What is it for?
Use it to review branch diffs, commit diffs, or GitHub pull requests and preload findings or code explanations into difit. In this repository, it uses the local development command.
Why use it?
It keeps review explanations next to the exact changed lines, making problems and suggested fixes easier to inspect.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is yoshiko-pg/difit's own configuration. It tells Claude Code how to work on difit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything difit configures →

About the project

difit is a command-line tool that starts a local web server showing Git commit differences in a GitHub-style file-change viewer. Developers use it to inspect and review local diffs or pull requests, with review comments that can also be copied into AI prompts. The catalogue entries connect coding-agent workflows to difit for requesting or performing reviews.

yoshiko-pg/difit · 3,146 stars · on GitHub · yoshiko-pg.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to yoshiko-pg/difit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/yoshiko-pg/difit/main/.claude/skills/difit-review/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/yoshiko-pg/difit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for difit-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/yoshiko-pg/difit/difit-review/github.svg)](https://agentmods.dev/skills/yoshiko-pg/difit/difit-review)
Your own site
<a href="https://agentmods.dev/skills/yoshiko-pg/difit/difit-review"><img src="https://agentmods.dev/badge/skills/yoshiko-pg/difit/difit-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for difit-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/yoshiko-pg/difit/difit-review"><img src="https://agentmods.dev/badge/skills/yoshiko-pg/difit/difit-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 725 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 28 Mar 2026
  • Snyk fail 28 Mar 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00064 $0.00725
Opus 5 $0.00032 $0.00362
Sonnet 5 $0.00013 $0.00145
Haiku 4.5 $0.00006 $0.00072

Measured 10d ago against content hash c2ded1d92802, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

difit-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/difit-review/SKILL.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Difit Review

Overview

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.

In this local repository copy, use pnpm run dev instead of the installed difit command.

Steps

The final command typically looks like this:

pnpm run dev <target> [compare-with] \
  --comment '{"type":"thread","filePath":"src/foobar.ts","position":{"side":"old","line":102},"body":"line 1\nline 2"}' \
  --comment '{"type":"thread","filePath":"src/example.ts","position":{"side":"new","line":{"start":36,"end":39}},"body":"Range comment for L36-L39"}'

The detailed procedure is as follows.

  1. Identify the target diff and review its contents.
  • Inspect the diff specified by the user. This may be a local git revision, a GitHub URL, a patch file, or something similar.
  • Understand the diff normally, inspect surrounding code when needed, and think through the response required by the user's request, whether that is review findings, explanations, or something else.
  • For PR reviews, inspect the PR locally and keep the review result limited to difit output. Do not post comments back to remote GitHub.
  1. Attach the prepared comments and launch difit.
  • pnpm run dev launch options
    • Use pnpm run dev <target> [compare-with] to specify the target diff.
    • Do not insert -- after pnpm run dev in this repository. pnpm run dev -- ... breaks argument parsing here.
    • For uncommitted changes use pnpm run dev ., for working tree changes use pnpm run dev working, and for staged changes use pnpm run dev staging.
    • For stdin input, use a form such as diff -u file1.txt file2.txt | pnpm run dev.
  • Comment arguments
    • Use type: "thread" for each comment.
    • Write comment bodies in the language the user is using.
    • Use position.side: "new" for lines that exist on the target side of the diff.
    • Use position.side: "old" for lines that exist only on the deleted side.
    • Use range comments for issues that span multiple lines.
    • Never copy secrets, tokens, passwords, API keys, private keys, or other credential-like material from the diff into --comment bodies or any command-line arguments.
  • Additional argument for files not yet added to git
    • For uncommitted changes, if you decide files not yet added to git should also appear in the diff, add --include-untracked.

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 55 lines · 64 tokens per session scan A c2ded1d92802

Subscribe to this mod's changes

difit-review is a skill published in the GitHub repository yoshiko-pg/difit (3,146 stars, last pushed 12d ago), licensed MIT. It adds 64 tokens to every session and 725 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.