/claude-retrospective:analyzing-git-sessionsfrom claude-retrospective
Analyzes git commits and changes within a timeframe or commit range, providing structured summaries for code review, retrospectives, work logs, or session documentation.
Ships in claude-retrospective. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generate structured analysis of git activity for specified timeframe or commit range, including commit history, file changes, statistics, and optional diffs.
Accept from user:
Determine range type:
Validate git repository:
git rev-parse --git-dir
Check range has commits:
git log <range> --oneline | head -1
If empty, inform user and exit.
# Get all commits in range
git log <range> --oneline --no-decorate
# Get detailed commit info
git log <range> --format="%h|%an|%ar|%s" --no-decorate
# Count commits
git log <range> --oneline | wc -l
Store commit data for summary.
Overall change statistics:
# Summary stats (insertions/deletions by file)
git diff <start>..<end> --stat
# Numeric stats for parsing
git diff <start>..<end> --numstat
# Count total changes
git diff <start>..<end> --shortstat
Author breakdown (if multiple authors):
git shortlog <start>..<end> -sn
File categorization:
Prioritization rules:
build.gradle.kts, AndroidManifest.xml, module configsExtract key file list:
# Files changed with line counts
git diff <start>..<end> --numstat | sort -rn -k1 -k2
Limit to top 10 files by default to avoid context overflow.
Concise mode: No diffs, stats only
Detailed mode: Diffs for top 3-5 key files
git diff <start>..<end> -- path/to/key/file.kt
Code Review mode: Diffs for all modified files, grouped by module
# Group by directory
git diff <start>..<end> --name-only | cut -d'/' -f1-2 | sort -u
# Generate diffs per module
for module in modules; do
git diff <start>..<end> -- $module/
done
Context overflow protection:
Format based on depth:
## Git Session Summary
**Range**: <start-commit> to <end-commit> (<timeframe>)
**Commits**: X commits by Y author(s)
**Files Changed**: A modified, B added, C deleted
**Net Changes**: +X -Y lines
### Commits
- abc123 Commit message 1
- def456 Commit message 2
...
### Top Files Changed
1. path/to/file1.kt (+50 -20)
2. path/to/file2.kt (+30 -15)
...
Includes:
## Code Review Summary
### Overview
- **PR Title**: [Suggested from commit messages]
- **Changes**: X files across Y modules
- **Scope**: [Inferred from changed files]
### Commits
[Formatted commit list suitable for PR description]
### Changes by Module
**Module: app**
- file1.kt: Description of changes
- file2.kt: Description of changes
**Module: core**
...
### Key Changes
[Diffs for significant modifications]
### Test Coverage
- Test files modified: X
- New tests added: ~Y
path/to/file.ktPresent in clear tables:
| Metric | Count |
| ------------- | ----- |
| Commits | 15 |
| Files Changed | 23 |
| Insertions | +450 |
| Deletions | -180 |
### path/to/file.ktMonitor diff sizes:
Progressive disclosure:
Fallback for large sessions: "This session modified 45 files with 5000+ line changes. Showing concise summary. Request specific files or modules for detailed diffs."
Don't:
Do:
A good git session analysis should:
See contexts/example-outputs.md for detailed examples of concise summaries and code review formats.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bitwarden/ai-plugins --plugin claude-retrospective3 skills in this plugin
/extracting-session-dataLocates, lists, filters, and extracts structured data from Claude Code native session logs. Supports both single and multiple session analysis./retrospectingPerforms comprehensive analysis of Claude Code sessions, examining git history, conversation logs, code changes, and gathering user feedback to generate actionable retrospective reports with insights for continuous improvement.Other plugins' skills for the same job