# Analyze Diff

> Explains branch changes at implementation level with detailed code analysis. Traces processing flow with actual source code quotations for understanding committed changes. Use when this capability is needed.

- Skill: `tomevault-io/analyze-diff` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/analyze-diff`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/analyze-diff/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/analyze-diff

---


# /analyze-diff

Explains branch changes at implementation level with detailed code analysis.

## Progress Checklist

```
- [ ] Step 1: Gather inputs
- [ ] Step 2: Resolve paths
- [ ] Step 3: Collect diff
- [ ] Step 4: Invoke diff-analyzer agent
- [ ] Step 5: Write report
- [ ] Step 6: Report summary in Japanese
```

## Steps

1. Gather inputs:
   - TARGET: Branch or commit range to analyze
   - TICKET_ID: Target ticket for output
   - If not provided, use AskUserQuestion to clarify these

2. Resolve paths:
   - TICKET_PATH = `find $TICKETS_DIR -type d -name "$TICKET_ID"` (first match)
   - OUTPUT_PATH = TICKET_PATH (used in Step 5 for report output)

3. Collect diff:
   - Execute `git diff $TARGET` → raw_diff
   - Execute `git diff $TARGET --stat` → file_stats
   - Read modified files for context → CHANGED_FILES

4. Invoke diff-analyzer agent via Task tool:
```
DIFF_DATA:
  raw_diff: {raw_diff from Step 3}
  target: {TARGET from Step 1}
  file_stats: {file_stats from Step 3}

CHANGED_FILES: {modified files with content from Step 3}
LANGUAGE: "ja"
```

If ANALYSIS_ERROR=true → display ERROR_MESSAGE, END
Otherwise → ANALYSIS_RESULT = agent output

5. Write report to OUTPUT_PATH as diff-navigator-report.md:
   - Include ANALYSIS_RESULT
   - Report body in Japanese, file paths in English

6. Report summary in Japanese

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/sato-dev1234) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

