understand-diff

Analyzes git diffs against a knowledge graph to identify changed components, affected dependencies, and risks.

Updated Aug 26, 2026
One-click install
npx skills add https://github.com/danieliudi/trackforge-os --skill understand-diff-danieliudi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: understand-diff
Source: https://github.com/danieliudi/trackforge-os/tree/main/.cursor/skills/understand-diff
Command: npx skills add https://github.com/danieliudi/trackforge-os --skill understand-diff-danieliudi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When reviewing code changes or pull requests, it is hard to know which components, layers, and downstream dependencies a diff actually touches. This Skill maps changed files onto the project's knowledge graph so you can see the blast radius of a change before merging. ## Core Features & Use Cases - Changed Component Mapping: Matches files from git diff to nodes in the knowledge graph (knowledge-graph.json) to identify exactly what was modified. - Impact Analysis: Follows 1-hop edges (imports, calls, depends_on) to surface upstream callers and downstream dependencies that might break. - Risk Assessment: Uses node complexity, cross-layer edges, and blast radius to highlight what needs careful review. - Dashboard Overlay: Writes a diff-overlay.json file so the understand dashboard can visualize changed and affected components. - Use Case: Before merging a feature branch, run the analysis to discover that a small utility change also affects three services in another architectural layer. ## Quick Start Ask the assistant to analyze the current branch's changes against the knowledge graph and show which components and layers are affected.

Frequently Asked Questions about understand-diff

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

FAQPage Schema
How do I analyze what a git diff affects in my codebase?

Run this Skill on a branch with uncommitted changes or a feature branch. It extracts changed files via git diff, matches them to knowledge graph nodes, and follows import and call edges to list affected components and layers.

How to assess risk of a pull request before merging?

The Skill produces a structured risk assessment based on node complexity values, the number of cross-layer edges, and the blast radius of affected components, highlighting what to review carefully.

What happens if the knowledge graph is out of date?

The Skill compares the graph's stored commit hash against HEAD and checks committed and working-tree diffs. If project files changed since graph generation, it warns you and suggests running /understand to refresh.

Does this work without a knowledge graph file?

No. The Skill requires knowledge-graph.json in the .ua directory (or legacy .understand-anything directory). If it is missing, you are told to run /understand first to generate the graph.

Can I visualize the diff analysis results?

Yes. After analysis, the Skill writes a diff-overlay.json file containing changed and affected node IDs, which the understand dashboard renders as a visual overlay of the change impact.