Skip to content

claude-commands/command-explain-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

command-explain-diff

A Claude Code slash command for explaining changes between commits, branches, or files.

Installation

# Clone to your preferred location
git clone git@github.com:claude-commands/command-explain-diff.git <clone-path>/command-explain-diff

# Symlink (use full path to cloned repo)
ln -s <clone-path>/command-explain-diff/explain-diff.md ~/.claude/commands/explain-diff.md

Usage

/explain-diff                      # Explain uncommitted changes
/explain-diff HEAD~3..HEAD         # Explain last 3 commits
/explain-diff main..feature        # Explain branch differences
/explain-diff src/api/users.ts     # Explain changes to specific file

What it does

  1. Gets diff between specified references
  2. Categorizes changes (feature, bugfix, refactor, etc.)
  3. Explains the purpose of each change
  4. Summarizes overall impact
  5. Highlights potential issues

Output Format

# Diff Explanation: main..feature-auth

## Summary
This branch adds user authentication with JWT tokens.

## Statistics
- Files changed: 12
- Insertions: +450
- Commits: 5

## Changes by Category

### New Features
**src/auth/login.ts** (+120 lines)
Added login endpoint that validates credentials and generates JWT.

### Potential Issues
1. JWT secret should be at least 256 bits
2. No refresh token rotation implemented

Change Categories

Category Description
Feature New functions, classes, files
Bug fix Error handling, edge cases
Refactor Renamed, restructured code
Test Test files, assertions
Config Package.json, configs

Requirements

  • Git
  • Claude Code with Opus 4.5 model access

Updates

cd <clone-path>/command-explain-diff && git pull

About

Explain changes between commits, branches, or files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published