git-explain-diff

Explains all uncommitted working tree changes grouped by behavioral impact.

Updated Dec 18, 2025
One-click install
npx skills add https://github.com/l0lxl0lw/dotfiles --skill git-explain-diff-l0lxl0lw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-explain-diff
Source: https://github.com/l0lxl0lw/dotfiles/tree/main/ai/shared/skills/git/git-explain-diff
Command: npx skills add https://github.com/l0lxl0lw/dotfiles --skill git-explain-diff-l0lxl0lw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? When you return to a branch after days away or an agent edits many files, it is hard to know exactly what is sitting uncommitted in your working tree. This Skill reads the actual staged, unstaged, and untracked changes and explains what will behave differently, so you can decide whether the work is finished and ready to commit. ## Core Features & Use Cases - Complete worktree collection: A script gathers staged diffs, unstaged diffs, untracked file contents, hidden assume-unchanged paths, and submodule pointers in one call, so nothing is silently missed. - Behavior-first explanation: Changes are grouped by what they do rather than by file path, each carried down to an observable consequence such as a different return value, query, or rendered output. - Completeness checking: For every changed signature, name, or config key, callers are grepped and checked against the diff to surface half-shipped changes, plus accidental content like debug prints and leftover .only tests. - Use Case: You come back to a feature branch after the weekend and ask what is uncommitted; the Skill produces a structured report covering scope, intent, behavioral changes, call-flow deltas, loose ends, and commit coherence. ## Quick Start Ask the assistant to explain everything uncommitted in my working tree before I commit it.

Frequently Asked Questions about git-explain-diff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I explain uncommitted changes in git before committing?

Run the collect-worktree script to gather staged diffs, unstaged diffs, and untracked file contents in one call, then group the changes by behavioral impact. Each change is carried down to an observable consequence such as a different return value or query.

Why does git diff not show my new files?

git diff only compares tracked content, so brand-new untracked files are invisible to it. Use git ls-files --others --exclude-standard or git status --untracked-files=all alongside the diff to see new files, which are often the entire point of a change.

How do I check if a changed function signature breaks callers?

Grep the repository for every caller of the changed symbol and compare each call site against the diff. A caller that does not appear in the diff was not updated, meaning the change is half-shipped and will fail at runtime or in CI.

Does this skill commit or modify anything in my repository?

No, it is strictly read-only. It creates no files, commits nothing, and never stages or stashes; committing is delegated to a separate git-commit skill.

When should I use git-explain-branch instead of explaining the working tree?

Use the branch comparison skill when you want to explain everything on a branch relative to the default branch. The working tree explanation covers only uncommitted changes: staged, unstaged, and untracked content.