Back to Skills

analyzing-git-sessions

verified

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 GitHub

Marketplace

bitwarden-marketplace

bitwarden/ai-plugins

Plugin

claude-retrospective

Repository
Verified Org

bitwarden/ai-plugins
1stars

plugins/claude-retrospective/skills/analyzing-git-sessions/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
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-sessions

Installation paths:

Claude
.claude/skills/analyzing-git-sessions/
Powered by add-skill CLI

Instructions

# 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

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
6529 chars