Context Diff — Git skill for Claude Code
git diff for the Claude Code context window.
How to install Context Diff
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open yubinkim444/context-diff and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Context Diff does
git diff for the Claude Code context window. See which tool call ate 40k tokens and why your session auto-compacted.
Alternatives in Git
- Get Commit Details — git show --name-status [COMMIT_ID] git diff [COMMIT_ID]^ [COMMIT_ID] 1.3k ★
- Agent Flow — Real-time visualization of Claude Code agent orchestration — see your agents think, branch, and coordinate as 668 ★
- GitCommit — You are a commit message generator 250 ★
README
context-diff
**`git diff` for your Claude Code context window.** See exactly which tool call ate 40k tokens, which turn evicted the cache, and how close you are to hitting the 200k ceiling.
[](https://pypi.org/project/context-diff/) []() []()
Why
Your Claude Code session keeps hitting "auto-compact triggered." You suspect some tool result is huge — but which? Was it the 80-file `find`, the `Read` on the giant log, or the third agent you spawned in parallel?
`context-diff` reads your session JSONL (Claude Code records every turn locally) and renders a turn-by-turn token waterfall: input tokens, cache reads, deltas, which tool calls fired, and the top-N biggest jumps.
You go from "my context is full and I don't know why" to "Turn 14's `Grep` returned 38k tokens — I should have piped it through `head`" in 2 seconds.
Install
pip install context-diff
# or
uvx context-diff --auto
Zero dependencies. Pure Python ≥3.10.
Use
# Auto-pick the most recently modified session
context-diff --auto
# Or point at a specific session
context-diff ~/.claude/projects/-Users-you-proj/abc-def.jsonl
# Show top 10 biggest turns
context-diff --auto --top 10
# Machine-readable
context-diff --auto --json | jq '.[] | select(.delta_input > 10000)'
Example output
Turn Kind Δ tokens in cache_r Label
─────────────────────────────────────────────────────────────────
1 user — — — user: fix the auth bug in /login
2 assistant 1.2k 1.2k — ⬆ Read, Grep
3 tool_result — — — ↳ tool_result × 2 (8,420 chars)
4 assistant 2.1k 850 1.2k ⬆ Edit
5 tool_result — — — ↳ tool_result × 1 (320 char
Related Skills
Kuma:Init
🐻 Kuma Init — Initialize session context, lean brief (<500 tokens), and branch tracking
Load Branch Changes
Load current branch changes (diff, commits, files) into session context.
Canopy
Ship faster with parallel Claude Code sessions — one native macOS window, git worktrees, sandboxes, auto-resum
Autocommit
Toggle auto git commits on/off for this project. Run without args to see status, or with "on"/"off" to set.
Review All Day
Time-window diff review sweep — scan every commit in a configurable merge-window-aligned span, classify each d
Overnight
Unattended overnight work block — time-aware merge mode keyed on the merge window; runs /keel:ship over the qu
Related Agents
Context Engine
Context window management — tracks tool call count, auto-detects when context fills up, triggers state save +
Session Context
Loads a single FullStory session's event transcript into an isolated context window and answers a specific tas
Tp Session Restorer
PROACTIVELY use this as the FIRST step after /clear, compaction, or a fresh window when a recent session_snaps