diff mod
Powers the /diff pane: your session's uncommitted changes shown file by file beside the transcript, refreshed as Claude edits.
Last checked against the official docs: 2026-10-02
| Type | Built into Claude Code |
|---|---|
| Name in /plugin | cc-plugin-diff |
| Source | anthropics/claude-code · mods/diff |
What it does
- Running /diff opens a pane next to the transcript listing every changed file, with each file's hunks underneath. Running it again closes the pane.
- The pane refreshes while Claude edits files and runs shell commands, and it also polls the repository, so a commit or checkout made in another terminal shows up too.
- On a wide enough terminal in the fullscreen layout, the first successful edit of a session opens the pane by itself. Narrow terminals get a hint asking for more width instead.
- Without the fullscreen layout the pane opens inline, showing a few files at a time that you can step through with the keyboard.
How to get it
- Nothing to install: it ships inside Claude Code and is on in interactive terminal sessions.
- To turn it off, disable cc-plugin-diff in /plugin. The /diff command stays and Claude Code's own built-in version answers it.
What you can learn from its code
If you are writing your own mod, this one is a good example of:
- Drawing a pane
- Buttons bound to keyboard actions
- Handling scroll inside a pane
See how to create a mod to get started.
Related mods
- telemetry: Sends the analytics events that Claude Code's built-in mods record. Refuses calls from mods you install.
- Token Weather: Draws a one-line 'weather forecast' of how full your context window is, above the prompt.
- Replay Theater: Adds /replay so you can step through every file edit Claude made in the last turn, one diff at a time.
- subagent-models: Shows which model and effort level each running subagent is using, right in the agents line of the terminal.