home / skills / athola / claude-night-market / diff-analysis

diff-analysis skill

/plugins/imbue/skills/diff-analysis

This skill analyzes changesets, scores risks, and prepares release notes to guide reviews and prioritization.

npx playbooks add skill athola/claude-night-market --skill diff-analysis

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
3.8 KB
---
name: diff-analysis
description: 'Use this skill for systematic change analysis with risk scoring. Use
  when analyzing specific changesets, assessing risk of changes, preparing release
  notes, categorizing changes by type and impact. Do not use when quick context catchup
  - use catchup instead. DO NOT use when: full PR review - use review-core with pensive
  skills.'
category: analysis-methods
tags:
- changes
- semantic-analysis
- risk-assessment
- categorization
- summaries
dependencies:
- imbue:evidence-logging
tools:
- git
- diff-tools
usage_patterns:
- change-analysis
- risk-assessment
- release-preparation
complexity: intermediate
progressive_loading: true
module_strategy: workflow-based
estimated_tokens: 800
---
## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Activation Patterns](#activation-patterns)
- [4-Step Methodology](#4-step-methodology)
- [Exit Criteria](#exit-criteria)
- [Troubleshooting](#troubleshooting)

# Diff Analysis Methodology

## Overview

Structured method for analyzing changesets: categorize changes, assess risks, generate insights. Works for git diffs, configuration changes, API migrations, schema updates, or document revisions.

## When To Use
- Extracting insights from raw change data
- Categorizing and prioritizing changes before code reviews
- Preparing release notes or changelogs
- Assessing migration scope and risk

## When NOT To Use

- Quick context catchup - use catchup instead
- Full PR review - use review-core with pensive skills

## Activation Patterns
**Trigger Keywords**: diff, changes, release notes, changelog, migration, impact, risk assessment

**Auto-Load When**: Git diffs present, change analysis requested, impact assessment needed.

## Progressive Loading

Load modules based on workflow stage:

### Always Load
- `modules/semantic-categorization.md` for change categorization workflow

### Conditional Loading
- `modules/risk-assessment-framework.md` when risk assessment is needed
- `modules/git-diff-patterns.md` when working with git repositories

### Integration
- Use `sanctum:git-workspace-review` for git data gathering
- Use `imbue:evidence-logging` for capturing analysis evidence
- Use `imbue:structured-output` for formatting final deliverables

## Required TodoWrite Items
1. `diff-analysis:baseline-established`
2. `diff-analysis:changes-categorized`
3. `diff-analysis:risks-assessed`
4. `diff-analysis:summary-prepared`

Mark each item complete as you finish the corresponding step.

## 4-Step Methodology

### Step 1: Establish Baseline (`diff-analysis:baseline-established`)
Define comparison scope: what states are being compared, boundary of analysis, and scale metrics.

For git contexts, load `modules/git-diff-patterns.md`. For other contexts, compare relevant artifacts.

### Step 2: Categorize Changes (`diff-analysis:changes-categorized`)
Group changes by semantic type. Load `modules/semantic-categorization.md` for change categories, semantic categories, and prioritization.

### Step 3: Assess Risks (`diff-analysis:risks-assessed`)
Evaluate impact. Load `modules/risk-assessment-framework.md` for risk indicators, levels, and scoring methodology.

### Step 4: Prepare Summary (`diff-analysis:summary-prepared`)
Synthesize findings: theme, scope with counts, risk level, review focus, dependencies. Format for downstream consumption (PR descriptions, release notes, reviews).

## Exit Criteria
- All TodoWrite items completed with categorized changes and risk assessment
- Downstream workflows have semantic understanding of the changeset
- Summary ready for appropriate consumption (review, release notes, planning)
## Troubleshooting

### Common Issues

**Command not found**
Ensure all dependencies are installed and in PATH

**Permission errors**
Check file permissions and run with appropriate privileges

**Unexpected behavior**
Enable verbose logging with `--verbose` flag

Overview

This skill provides a systematic method for analyzing changesets with semantic categorization and risk scoring. It turns diffs, configuration updates, schema migrations, and document revisions into prioritized findings and a concise summary. The output is tailored for release notes, review focus, and migration planning.

How this skill works

It establishes a clear baseline and comparison scope, then groups changes by semantic type (e.g., behavior, config, API, schema). Next it applies a risk-assessment framework to score impact and likelihood, producing a prioritized list of review targets. Finally it synthesizes a compact summary suitable for PR descriptions, changelogs, or stakeholder briefings.

When to use it

  • Preparing release notes or changelogs from a set of commits or diffs
  • Categorizing and prioritizing changes before a formal code review
  • Assessing migration scope and estimating risk for API or schema changes
  • Extracting structured insights from raw change data for planning or rollout decisions
  • When you need a focused, evidence-backed summary of what changed and why it matters

Best practices

  • Define the comparison scope up front: branches, commits, or artifacts to compare
  • Run semantic categorization before risk scoring to reduce noise and focus effort
  • Annotate findings with evidence links (diff hunks, tests, configs) for fast follow-up
  • Keep outputs concise: one-line themes, counts by category, and 2–3 action items for reviewers
  • Mark the four required todo items as complete to signal exit readiness

Example use cases

  • Generate release notes that summarize features, fixes, and breaking changes with impact levels
  • Prioritize review tasks by highlighting high-risk diffs and suggested test areas
  • Estimate migration effort by counting schema and API changes and flagging risky transformations
  • Produce a concise change summary for stakeholder updates or deployment runbooks
  • Feed structured findings into downstream workflows for test automation or rollout gating

FAQ

Can this skill perform a full PR review?

No. This skill focuses on change analysis and risk scoring. Use a dedicated review skill for full PR reviews.

What inputs does it accept?

Git diffs, patch files, configuration snapshots, API or schema change descriptions, and document revisions are supported.

How are risk scores determined?

Risk is assessed using configurable indicators for impact and likelihood, applied after semantic categorization to produce a prioritized score.