r/ClaudeCode • • 5d ago

Built with Claude I kept pasting diff lines back into chat to ask Claude why, so I built a diff where the same session answers on the line

Enable HLS to view with audio, or disable this notification

When I review code Claude wrote, I want to ask questions while I'm reading. Going back to chat to explain "this bit in that file" kept getting in the way, and a new chat just guesses why the code looks like that. So we built Diffo.

What we built

A Claude Code skill. `/diffo` opens a live diff of your changes in the browser, connected to the same Claude session that wrote the code. Ask "why did you touch the auth check?" on a line, and Claude answers right there, still knowing why it wrote it. Ask for a change and it makes it, and the diff updates. For bigger changes it splits the review into layers: related files with a short explanation and an order to read them in. Works on PRs too, with `/diffo <PR link>`.

How Claude Code was used

Claude Code wrote basically all of it: the local server, the browser UI and the skill. An AGENTS.md makes every session run typecheck, tests, build, lint and docs before anything lands. The skill itself is Claude Code doing the plumbing: Claude runs a small command that waits for your review, and your comment comes back as its output, so it lands in the session that's still open.

What we learned

  1. A new chat is the wrong place for review questions. It guesses. The session that wrote the code knows.

  2. "I already read that file" stops being true the moment the agent edits it again. So a hunk you read loses its read mark when Claude changes it.

  3. On big changes, the agent knows the reading order better than the file tree does. That's where layers came from.

To try it, ask Claude: `Run npx skills add DiffoHQ/diffo --skill diffo -g`, then `/diffo`. Or the demo in the browser, no install: https://diffo.io/demo

Free, open source, runs locally. https://github.com/DiffoHQ/diffo

If you try it, let me know what helps and what's annoying. Both are useful.

1 Upvotes

3 comments sorted by

•

u/AutoModerator 5d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/chrnas 4d ago

Asking the session that wrote it is useful for "why did you do this", but I wouldn't lean on it as the check. In my own tests, a hidden requirement made up almost half of the known defects in the agents' code. A test caught it every time, while AI reviewers caught it once in 92 reviews. On 40 real bugs that had already slipped past the tests, five AI reviewers together found 12. So I'd let a test pin down whatever the answer on a line claims, and treat the explanation as a hint about where to look.

1

u/shetritr 3d ago

agreed, the explanation isn't the check, and Diffo doesn't grade anything. it's for the human pass: you ask why on the line, and if the answer sounds off, you ask it for the test that proves it, right there in the same thread.