Analyzes git commits and changes within a timeframe or commit range, providing structured summaries for code review, retrospectives, work logs, or session documentation.
View on GitHubbitwarden/ai-plugins
claude-retrospective
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/bitwarden/ai-plugins/blob/main/plugins/claude-retrospective/skills/analyzing-git-sessions/SKILL.md -a claude-code --skill analyzing-git-sessionsInstallation paths:
.claude/skills/analyzing-git-sessions/# Analyzing Git Sessions ## Core Responsibility Generate structured analysis of git activity for specified timeframe or commit range, including commit history, file changes, statistics, and optional diffs. ## Inputs Accept from user: - **Time range**: "last 2 hours", "since 10am", "today", "since 2025-10-23 14:00" - **Commit range**: "abc123..def456", "HEAD~5..HEAD", "feature-branch..main" - **Optional filters**: Specific paths, authors, or file types - **Output depth**: Concise (default), Detailed, or Code Review format ## Working Process ### Step 1: Parse and Validate Input 1. **Determine range type**: - Time-based: Parse relative or absolute time - Commit-based: Validate commit references exist - Branch-based: Resolve branch names to commits 2. **Validate git repository**: ```bash git rev-parse --git-dir ``` 3. **Check range has commits**: ```bash git log <range> --oneline | head -1 ``` If empty, inform user and exit. ### Step 2: Extract Commit History ```bash # 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. ### Step 3: Generate Statistics **Overall change statistics**: ```bash # 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): ```bash git shortlog <start>..<end> -sn ``` **File categorization**: - Identify new files (show in status "A") - Identify deleted files (show in status "D") - Identify renamed files (show in status "R") - Modified files with change magnitude ### Step 4: Identify Key Files for Detailed Analysis **Prioritization rules**: 1. **Large changes** (>100 lines modified): Always include 2. **New files**: Include (especi