Skip to content
Skills Library
Programming · Analysis

diffdive

/diffdive

Branch analysis and context loading. Analyses the diff between the current branch and trunk (master/main) to get up to speed quickly. Use when switching to an unfamiliar branch, resuming work after time away, onboarding onto a colleague's branch, reviewing a PR, or when you need a situation report on what a branch has changed relative to trunk.

Licence
MIT
Last repository change
04.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 04.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Branch analysis and context loading. Analyses the diff between the current branch and trunk (master/main) to get up to speed quickly. Use when switching to an unfamiliar branch, resuming work after time away, onboarding onto a colleague's branch, reviewing a PR, or when you need a situation report on what a branch has changed relative to trunk.

Original author description

Branch analysis and context loading. Analyses the diff between the current branch and trunk (master/main) to get up to speed quickly. Use when switching to an unfamiliar branch, resuming work after time away, onboarding onto a colleague's branch, reviewing a PR, or when you need a situation report on what a branch has changed relative to trunk.

How it works

  1. Purpose
  2. Relationship to structured development
  3. When to use
  4. Process
  5. Output Format
  6. Constraints
Original SKILL.md headings · 129 lines, 762 words
SKILL.md preview
---
name: diffdive
description: Branch analysis and context loading. Analyses the diff between the current branch and trunk (master/main) to get up to speed quickly. Use when switching to an unfamiliar branch, resuming work after time away, onboarding onto a colleague's branch, reviewing a PR, or when you need a situation report on what a branch has changed relative to trunk.
license: MIT
metadata:
  author: itzcull
---

## Purpose

Get up to speed on a branch by analysing its divergence from trunk. Produces a structured situation report covering what changed, why it likely changed, areas of risk, and open questions.

## Relationship to structured development

Within [structured development](../structured-development/SKILL.md), this skill supplies context for [establishing intent](../structured-development/SKILL.md#1-establish-intent-and-boundaries), [preparing further work](../structured-development/SKILL.md#3-select-and-prepare-the-next-increment), and [reconciling a branch with its original goal](../structured-development/SKILL.md#6-reconcile-and-adapt). It is an orientation activity, not an implementation or verification protocol.

Use the branch, comparison base, available history, and any stated goal. Return the [situation report](#output-format) with evidence-backed changes, likely intent clearly separated from known requirements, and questions that affect the next decision. The enclosing procedure uses that context to choose investigation, implementation, or review work.

A diff cannot establish that requirements were approved, checks passed, or a feature is complete. Keep analysis read-only and return uncertain intent or apparent scope changes to the user rather than inventing requirements or modifying the branch to match an interpretation.

## When to use

- Switching to an unfamiliar branch
- Resuming work on a branch after time away
- Onboarding onto a colleague's branch or PR
- Before a code review to understand the full scope of changes
- When asking "what has this branch done?" or "catch me up"

## Process

### Step 1: Detect current branch

Run `git branch --show-current` to identify the active branch.

If on a detached HEAD, report this and ask the user which branch to analyse.

### Step 2: Determine trunk branch

If the user provided an argument, use that as the trunk branch name.

Otherwise, auto-detect by checking which of these exist (in order of preference):

1. `main`
2. `master`

Verify the chosen trunk branch exists with `git rev-parse --verify <trunk>`. If neither exists, ask the user to specify the trunk branch.

### Step 3: Find the divergence point

Run `git merge-base <trunk> HEAD` to find where this branch diverged from trunk.

### Step 4: Gather context

Collect the following information using git commands:

1. **Commit count**: `git rev-list --count <merge-base>..HEAD`
2. **Commit log**: `git log --oneline --no-decorate <merge-base>..HEAD`
3. **Diff stats**: `git diff --stat <merge-base>..HEAD`
4. **Full diff**: `git diff <merge-base>..HEAD`
5. **Files changed count**: `git diff --name-only <merge-base>..HEAD | wc -l`
6. **Trunk commits since divergence** (optional context): `git rev-list --count <merge-base>..<trunk>`

If the full diff is very large (many files or thousands of lines), prioritise the diff stats and commit log for the high-level summary, then read the full diff in sections grouped by module/directory.

### Step 5: Analyse and present the report

Study the gathered information and produce the structured report described below. Focus on understanding the **intent** behind the changes, not just describing what lines changed.

Look for:

- The overarching goal or feature being built
- Patterns in the changes (new modules, refactoring, bug fixes, test additions)
- Architectural decisions (new dependencies, structural changes, API changes)
- Potential risks (large files changed, missing tests, complex logic)
- Incomplete work (TODOs, commented-out code, partial implementations)

## Output Format

Present the report using this structure:

```
## Diff Dive: [branch-name]

**Branch:** [current branch]
**Trunk:** [trunk branch]
**Divergence point:** [short merge-base hash]
**Commits on branch:** [count]
**Commits on trunk since divergence:** [count]
**Files changed:** [count]

---

### Summary

[2-4 sentence high-level summary of what this branch is doing and why.
Frame it as a narrative: "This branch introduces...", "This branch refactors...", etc.]

### Changes by Area

**[area/module/directory]**
- [What changed and the likely intent behind it]
- [Notable additions, removals, or modifications]

**[area/module/directory]**
- [What changed and the likely intent behind it]

[...repeat for each significant area...]

### Architectural Observations

- [Patterns, design decisions, or structural changes worth noting]
- [New dependencies or tooling changes]
- [API surface changes (new endpoints, changed interfaces, etc.)]

### Risk Areas

- [Files or changes that warrant careful review]
- [Missing test coverage for new functionality]
- [Complex logic that could harbour bugs]
- [Breaking changes or backwards compatibility concerns]

### Open Questions

- [Things that are unclear from the diff alone]
- [Decisions that might need discussion]
- [Incomplete work that may need follow-up]
```

## Constraints

- **Read-only analysis** — do not modify any files, make commits, or change branch state
- **Intent over mechanics** — explain WHY changes were made, not just WHAT lines changed
- **Honest assessment** — flag genuine risks and gaps; do not gloss over problems
- **Proportional detail** — spend more analysis time on complex or risky changes, less on trivial ones
- **Respect scope** — analyse only the diff between trunk and the current branch; do not conflate with unrelated changes

Versions

The database has no other skills named diffdive.

Database snapshot: 13.11.2026 · package version f21fb02324ed (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100sync-branch
    Sync the current feature/PR branch with trunk — fetch latest master/main, rebase by default or merge it in, resolve conflicts, verify, and optionally push. Use when asked to "pull down latest master, resolve conflicts, commit and push", update a stale branch, rebase onto trunk,…
  • 100load-branch-changes
    Load current git branch changes (diff, commits, changed files) into session context. Use when the user invokes /load-branch-changes to review, understand, or focus on the current branch's changes compared to the base branch.
  • 100local-review
    Code review the current PR (or branch diff against main) for bugs, security, and AGENTS.md compliance. MUST use when asked to review code.
  • 90sync-branch
    Quickly sync current branch with main using rebase. Use when you need to pull latest main into your feature branch, before creating MR or after ongoing work. Fetches main, rebases, auto-stashes changes, optionally force-pushes.
  • 100feature-branch-pr-writing
    Use this skill when the user asks to write, draft, create, or improve a PR description for a Shopware core repository PR — AND that PR targets a non-trunk feature branch (not trunk itself). Trigger phrases like "write a PR description", "draft the PR", "what should I put in the…
  • 82git-flow-master
    End-to-end Git operator for any branching strategy. Auto-detects the project's strategy (solo-main, main+integration, enterprise multi-branch, trunk-based, GitFlow, GitHub Flow, GitLab Flow, SDET integration-trunk for chained test-automation suites) from .git config, branches,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.