brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: /diff shows what Claude changed without leaving Claude Code

Claude
~/tips/tip-claude-diff-command

/diff

Opens a view of the uncommitted changes in your working tree, including Claude's edits.

After a few rounds of edits you want to see what actually changed before you say “looks good”. Switching to another terminal for git diff breaks the flow.

/diff

This shows the changes in your working tree: the edits Claude made so far plus anything else you haven’t committed. In fullscreen rendering it opens as a panel next to the conversation that stays open and updates while you work. In the classic renderer it’s a dialog above the prompt that you close when you’re done.

Besides the working-tree view, you can look at the edits of each turn. That helps when you want to know which prompt caused which change.

A detail worth knowing: those per-turn views come from Claude’s file edit tools, not from git. If Claude changed a file through a shell command, like sed or a code generator, that change only shows up in the working-tree view. Submodules appear as one entry, and only when the commit they point to changes.

In my view it makes a good last step before you ask Claude to commit. It is quicker than reading the edit messages scrolled up in the transcript, and it shows files that changed for other reasons, like a formatter or a lockfile, that you might not want in the commit.

Further reading: Review changes with /diff

More Claude tips /recap /focus /skill-doctor /autocompact 500k claude purge ~/work/my-repo --dry-run All Claude tips (83) All topics

Link