English · 한국어
Leave private notes on a GitHub pull request diff, and have an AI agent answer them in place.
Nothing is posted to GitHub. Notes live on your machine only — nobody else sees them, even on the same PR.
On the page you also get a changed-files tree with each file's risk and note count, cards badged by kind
(question / request / memo) and by whether they are answered, and ⌥J / ⌥K to jump between notes.
Rendered from the demo page with sample code — real reviews happen on private repositories.
⓪ the agent fills in a one-line summary per file
│
▼
[GitHub PR · Files changed] under each filename: why this file is worth looking at
│ ① click the gutter button → write a question
▼
[extension] ──②──▶ local daemon ──▶ ~/.diffmate/<owner>__<repo>/<pr>.json
▲ │ ▲
│ ④ the answer appears in place ▼ │ ③ ask your agent to answer
└────────────────────────── [AI agent] ─┘
①~④ repeat. Follow-ups stack on the same card.
Reviewing AI-written code from a diff alone is hard: you cannot tell which file matters and why. Writing it up in the PR description does not help either — by the time you are reading code, that text is far above the fold.
So the explanation moves next to the diff. And the direction flips: instead of the agent pushing context, the person who does not know asks, and the one who knows answers. Only the reader knows what they are missing.
git clone https://github.com/chaeeun037/diffmate.git
cd diffmate
npm start # local daemon on 127.0.0.1:7777Then in Chrome: chrome://extensions → enable Developer mode → Load unpacked → pick extension/.
Node 18+. No dependencies.
Update — git pull, then hit the reload button on diffmate in chrome://extensions.
Leave a note — hover a diff line; a button appears left of the line number. Click and type.
⌘Enterto save,Escto cancel- Three kinds:
question(answer only),request(change the code),memo(agent leaves it alone). Each card shows its kind, and questions and requests also showanswered/unanswered - Clicking the logo in a file's summary banner creates a file-level note that is not tied to any line
⌥J/⌥Kjump to the next / previous note (ignored while typing)
See the whole PR at once — a changed-files tree sits above the file list, with each file's risk
(● high · ◐ mid · ○ low) and note count. Click a file to jump to it.
Get answers — ask your agent to answer the notes. It reads and writes through the CLI:
node cli/notes.mjs list # which PRs have unanswered notes
node cli/notes.mjs list <owner/repo> <pr> # full notes as JSON
node cli/notes.mjs stale <owner/repo> <pr> # which summaries a later commit made stale
echo 'answer' | node cli/notes.mjs answer <owner/repo> <pr> <noteId>
echo 'follow-up'| node cli/notes.mjs reply <owner/repo> <pr> <noteId>Fill file summaries — right after opening a PR, so the reviewer sees them first:
echo '{
"src/pages/_document.tsx": {
"summary": "Inline beacon injected into every page. If the path check on the first line is wrong, every page fires the log.",
"risk": "high", "order": 1
}
}' | node cli/notes.mjs summarize <owner/repo> <pr>How to write those summaries is a discipline of its own — see the skill below.
A ready-made skill lives in this repo. Copy it where Claude Code looks for skills:
cp -r skill/diffmate ~/.claude/skills/ # English
cp -r skill/ko/diffmate ~/.claude/skills/ # KoreanThen set DIFFMATE to your checkout inside the skill, and ask your agent to
"fill in the file summaries" after opening a PR, or "answer my notes" while reviewing.
~/.diffmate/
<owner>__<repo>/
<pr>.json
One file per PR, holding both the file summaries (files) and the notes (notes).
A note is anchored by line number plus a hash of that line's content, so it follows the code when a new commit shifts it.
When it cannot be found, it is not dropped — it surfaces as an "orphan note" at the top of the page.
- Built for unified diff view. Split view is not handled yet.
- The script loads on any github.com page but stays idle until you reach a pull request's changes view — GitHub is a single-page app, so it cannot be injected on arrival.
- It rides on GitHub's
Files changedDOM, so a redesign can break it. If buttons stop appearing, the[diffmate]console logs say where it lost track. - A collapsed file (marked
Viewed) has no diff lines on the page. Its notes are not hidden — they expand under the filename instead. - Two tabs on the same PR: last write wins.
- Korean README
- Agent skill — how the agent writes summaries and answers
- Design notes — structure and the reasoning behind it (Korean)
This repo is developed with AI assistance (Claude Code), reviewed by the maintainer — most of the code, docs and commit messages started as drafts from an agent, and every change was read, tested and kept or rewritten by a person.
Contributions made with AI tools are welcome too. Please mention it in your pull request — an
Assisted-by: trailer is the convention this repo follows — and make sure you can explain every
line you submit.
MIT
Issues in Korean or English are both welcome.
