Skip to content

Askdiff

Ask your AI questions about its own code changes — from a Git diff viewer.

Install

$npx -y askdiff install-skill
Claude Code
claude mcp add askdiff -- npx -y askdiff install-skill
Cursor / Claude Desktop (mcp.json)
{
  "mcpServers": {
    "askdiff": {
      "command": "npx",
      "args": [
        "-y",
        "askdiff",
        "install-skill"
      ]
    }
  }
}

Install command taken from the project's README or registry entry. Always review code before running it.

askdiff

Treat your AI as a coworker — ask questions about its changes in the same session that wrote the code.

/askdiff from inside any Claude Code session opens a GitHub-style diff viewer in your browser. Hover a line, click +, type a question. The answer streams back inline — and because each ask resumes the same Claude Code session that wrote the code, the model already remembers the file, the conversation, and why it made the change.

Asking about a past commit's diff in the session that wrote it.

Why askdiff?

Developers often prompt AIs to write the code, then, if the diff becomes large enough, open draft GitHub PRs in order to review it better. Then, if there are any questions, take the diff back to the terminal, ask questions about it, and repeat.

Askdiff simplifies this process by combining the diff viewer and the Q&A interface into one seamless experience, directly integrated with the very same Claude Code session that wrote the code. It makes you treat the model truly as a coworker who already knows the entire context and the reasoning behind every single line of the diff.

Quickstart

1. One-time skill install (project-scoped — installs into <git-root>/.claude/):

cd /path/to/your/project
npx -y askdiff install-skill

# Or, install user-level (available from any project):
npx -y askdiff install-skill --global

2. From a Claude Code session in that project:

/askdiff                                                                # working-tree changes
/askdiff David's latest commit where he removed the xmpp integration    # author + content search
/askdiff last commit attached to the session where we discussed auth    # send asks to a different past session

That's it. No API key, no config. The browser opens to a syntax-highlighted diff; comments stream back as the model thinks.

Use cases

Review a past commit in the session that wrote it

The hero demo above shows this case: /askdiff with a natural-language description of the diff and session finds the right git invocation, captures the output, and points the server at it. Asks flow into that past session, so the model already wrote (or investigated) the code you're asking about — even if you're currently in a different session.

Review code as you're writing it

/askdiff with no description shows the working tree diff — all uncommitted changes. Best used in the same session that made the changes, so it holds the full context of the edits.

How it works

Each ask spawns the claude CLI with --resume <your-session-id>. So your question becomes a real turn in the running session's transcript:

  • No diff sent to the model. The resumed session already has the full context that wrote the code; the prompt is just your question.
  • No Anthropic API key needed. askdiff doesn't talk to the API — it shells out to the claude CLI you've already auth'd via subscription or API key.
  • Auto-cleanup. The server self-exits after 5 minutes of inactivity — close the browser tab and forget about it.

Usage

Diff selection

Anything after /askdiff is a description — Claude figures out the right git diff invocation, writes the result to a temp file, and points the server at it. Some examples:

Similar plugs

Open-source AI job search agent and job finder: scan job boards, score each job 1-5 against your CV before you apply, tailor an ATS-friendly resume and cover letter, get…

Editorial diagram design for Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, and Pi. 44 diagram types. Self-contained HTML + SVG. No shadows. No Mermaid slop.

Secure, fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in…

Persistent file-based planning for AI coding agents and long-running tasks. Crash-proof markdown plans, session recovery after /clear and compaction, per-turn re-injection…

Explore related