Skip to content

Commit ad97069

Browse files
committed
update README.md
1 parent ad93986 commit ad97069

1 file changed

Lines changed: 40 additions & 3 deletions

File tree

README.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ the file, the conversation, and why it made the change.
2121
npx -y askdiff install-skill
2222

2323
# 2. From any Claude Code session
24-
/askdiff
24+
/askdiff # working-tree changes
25+
/askdiff last commit # HEAD~1..HEAD
26+
/askdiff main vs feature/x # main…HEAD (PR-style)
2527
```
2628

2729
That's it. No API key, no global install, no config. The browser opens
28-
to a syntax-highlighted diff of your working tree; comments stream
29-
back as the model thinks.
30+
to a syntax-highlighted diff; comments stream back as the model thinks.
3031

3132
## Why askdiff?
3233

@@ -51,6 +52,10 @@ So your question becomes a real turn in the running session's transcript:
5152
## Features
5253

5354
<table>
55+
<tr>
56+
<td><a href="#diff-selection">Diff selection</a></td>
57+
<td>Describe which diff to review in plain English — working tree, last commit, branch comparisons, arbitrary refs.</td>
58+
</tr>
5459
<tr>
5560
<td><a href="#inline-comments">Inline comments</a></td>
5661
<td>Click the <code>+</code> gutter button to comment on any line. Drag to comment on a range.</td>
@@ -65,6 +70,38 @@ So your question becomes a real turn in the running session's transcript:
6570
</tr>
6671
</table>
6772

73+
### Diff selection
74+
75+
Anything after `/askdiff` is a description — Claude figures out the
76+
right `git diff` invocation, writes the result to a temp file, and
77+
points the server at it. Some examples:
78+
79+
| You type | What you'll review |
80+
|---|---|
81+
| `/askdiff David's latest commit where he removed the xmpp integration` | Author + content combined — Claude filters `git log --author=David` then narrows by `-S"xmpp"` |
82+
| `/askdiff` | working-tree changes (uncommitted + untracked) |
83+
| `/askdiff last commit` | `HEAD~1..HEAD` |
84+
| `/askdiff last 3 commits` | `HEAD~3..HEAD` |
85+
| `/askdiff the 5th latest commit` | the single commit at `HEAD~4` |
86+
| `/askdiff main vs feature/x` | `main…HEAD` (three-dot, PR-style) |
87+
| `/askdiff abc123 vs def456` | `abc123..def456` |
88+
| `/askdiff staged` | `git diff --cached` |
89+
| `/askdiff the commit where I added the favicon` | Claude searches commit messages, diff content, or file history to find it |
90+
91+
Defaults when ambiguous:
92+
- "branch X against branch Y" between named refs ⇒ three-dot (PR semantics).
93+
- Two arbitrary commits ⇒ two-dot (literal tree diff).
94+
- "Nth latest commit" ⇒ that single commit's changes.
95+
96+
The TopBar shows what diff you're reviewing as a small label
97+
(e.g. `Working tree`, `HEAD~1..HEAD`, `main…feature/x`).
98+
99+
**Re-invoking refreshes.** Run `/askdiff` again from the same session
100+
and the previous server is killed, the diff is recomputed, and the
101+
existing browser tab auto-reconnects on the same port. For working-tree
102+
diffs, an amber banner appears if any reviewed file has been edited
103+
since the diff was captured, prompting you to re-run `/askdiff`.
104+
68105
### Inline comments
69106

70107
Hover any line in the diff. A `+` button appears in the gutter.

0 commit comments

Comments
 (0)