agentleFS
shdra06shdra06/ai-mind-map/skills/git-diff/SKILL.md

git-diff

Skill3 starsChanged 25 days agoMITView on GitHub

Export exact Git differences between two commits or between working code and the branch's push destination, with a local diff viewer and no model API calls. Use for repository comparisons and inspecting changes without loading full patches into chat.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Exact Git diff viewer

Use native Git through AI Mind Map's CLI. No AST index, embeddings, external service, or LLM is needed to generate or view the patch. Loading this skill, returning tool output, or asking an LLM to analyze the diff still consumes tokens. Never promise zero total chat tokens.

# Any two commits, branches, or tags: direct tree comparison, not merge-base comparison.
ai-mind-map diff HEAD~2 HEAD

# Current staged + unstaged code and non-ignored untracked files versus a commit.
ai-mind-map diff HEAD

# Current code versus the configured push destination, refreshed from its remote.
ai-mind-map diff --fetch

# Explicit GitHub remote branch, refreshed before comparing.
ai-mind-map diff origin/main --fetch

The default base is Git's @{push}, not an assumed main branch or pull upstream. It is the configured remote branch's known state, not a historical record of which commit this machine last pushed. Without --fetch, comparisons use cached local refs and must be described that way. Fetch failures are errors, not an empty diff. If a branch has no usable push target, require an explicit base instead of guessing.

Commands return only metadata, counts, and absolute artifact paths. Open viewerPath for the human and link patchPath when useful. Do not load the full patch into model context unless the user requests analysis; read only relevant hunks then. The viewer is self-contained and makes no network requests.

Source checkout: use node dist/cli.js diff ... after npm run build. Options: --project <repo> and --output <directory>. Each export creates a new comparison folder with changes.patch, index.html, and comparison.json. It does not overwrite prior exports. The default .mindmap/diffs cache is excluded from untracked comparisons. Prefer an ignored output location to avoid including previous custom exports in later comparisons.

Native patches include binary changes, deletions, renames, and new non-ignored files. Ignored files are excluded; submodules use Git's recorded state. Working files are read live, so concurrent edits are not an atomic snapshot. --fetch updates remote-tracking refs; it does not pull, merge, push, stage, or rewrite working files. Preserve the exact patch; summaries and the HTML rendering are not substitutes for its bytes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.