
Analyzing Git Sessions
- 74 installs
- 129 repo stars
- Updated August 4, 2026
- bitwarden/ai-plugins
Analyzing Git Sessions is a Claude skill that summarizes git commits, file changes, and statistics within a timeframe or commit range for review, retrospectives, or documentation.
About
This skill analyzes git commits and changes within a timeframe or commit range and produces a structured summary. It extracts commit history, generates insertion/deletion statistics, categorizes new and deleted files, and optionally shows selective diffs at Concise, Detailed, or Code Review depth. A developer uses it for code review prep, retrospectives, work logs, or session documentation.
- Summarizes commits, file changes, and stats for a timeframe or commit range
- Three output depths: Concise, Detailed, and Code Review format
- Context-budget protection limits diffs on large sessions
Analyzing Git Sessions by the numbers
- 74 all-time installs (skills.sh)
- Ranked #260 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
analyzing-git-sessions capabilities & compatibility
- Capabilities
- git analysis · code review
- Works with
- github
- Use cases
- code review · documentation
What analyzing-git-sessions says it does
Generate structured analysis of git activity for specified timeframe or commit range, including commit history, file changes, statistics, and optional diffs.
npx skills add https://github.com/bitwarden/ai-plugins --skill analyzing-git-sessionsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 74 |
|---|---|
| repo stars | ★ 129 |
| Last updated | August 4, 2026 |
| Repository | bitwarden/ai-plugins ↗ |
What it does
Generate a structured summary of git commits and diffs over a timeframe or commit range.
Who is it for?
Developers who want a structured summary of what changed across a set of commits for review or a work log.
Skip if: Deep line-by-line security review or per-comment PR feedback.
When should I use this skill?
You want a structured summary of git activity over a timeframe or commit range for review or retrospective.
What you get
A structured summary of commits, stats, key files, and optional selective diffs is produced at the chosen depth.
- Structured git session summary
- Commit list with statistics and selective diffs
By the numbers
- 3 output depths (Concise, Detailed, Code Review)
- Limits to top 10 files by default
Files
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:
git rev-parse --git-dir3. Check range has commits:
git log <range> --oneline | head -1If empty, inform user and exit.
Step 2: Extract Commit History
# 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 -lStore commit data for summary.
Step 3: Generate Statistics
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> --shortstatAuthor breakdown (if multiple authors):
git shortlog <start>..<end> -snFile 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 (especially if >50 lines) 3. Deleted files: Note but don't diff 4. Architecture files: build.gradle.kts, AndroidManifest.xml, module configs 5. Test files: Flag separately for test coverage assessment
Extract key file list:
# Files changed with line counts
git diff <start>..<end> --numstat | sort -rn -k1 -k2Limit to top 10 files by default to avoid context overflow.
Step 5: Generate Selective Diffs (Based on Depth)
Concise mode: No diffs, stats only
Detailed mode: Diffs for top 3-5 key files
git diff <start>..<end> -- path/to/key/file.ktCode 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/
doneContext overflow protection:
- If >10 files changed significantly, limit to top 5 diffs
- Warn user: "Showing top 5 files by change size. Request specific files for full diffs."
Step 6: Present Structured Summary
Format based on depth:
Concise Summary
## 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)
...Detailed Summary
Includes:
- Full commit list with authors and timestamps
- Complete file list with change stats
- Author breakdown
- Top 3-5 diffs for review
Code Review Format
## 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: ~YOutput Guidelines
Commit Messages
- Show short hash (7 chars)
- Show first line of commit message only
- Truncate long messages to 80 chars
- Group by author if multiple contributors
File Paths
- Use relative paths from repo root
- Format as code:
path/to/file.kt - Include line change magnitude: (+X -Y)
- Highlight file type (source, test, config)
Statistics
Present in clear tables:
| Metric | Count |
| ------------- | ----- |
| Commits | 15 |
| Files Changed | 23 |
| Insertions | +450 |
| Deletions | -180 |Diffs
- Include file path as header:
### path/to/file.kt - Use code blocks with syntax highlighting
- Show context lines (git default: 3 lines before/after)
- Truncate very large diffs (>200 lines) with summary
Context Budget Management
Monitor diff sizes:
- Small session (<10 files, <500 lines): Safe for detailed mode
- Medium session (10-30 files, 500-2000 lines): Use selective diffs
- Large session (>30 files, >2000 lines): Concise mode with warnings
Progressive disclosure:
1. Always start with concise summary 2. Ask user: "Would you like detailed diffs for specific files?" 3. Generate diffs on demand rather than upfront
Fallback for large sessions: "This session modified 45 files with 5000+ line changes. Showing concise summary. Request specific files or modules for detailed diffs."
Anti-Patterns to Avoid
Don't:
- Generate diffs for all files in large sessions (context overflow)
- Include full diffs without asking (waste context on unneeded details)
- Ignore file types (treat test changes same as source changes)
- Lose context on what user wants to know
- Use generic summaries ("modified 10 files") without specifics
Do:
- Ask user what level of detail they need
- Prioritize key files by change magnitude
- Categorize files (source, test, config, docs)
- Provide actionable summaries
- Offer to drill down on specific files
Success Criteria
A good git session analysis should:
1. Inform: User understands scope of changes at a glance 2. Focus: Highlights most significant changes first 3. Actionable: Provides paths and diffs for deeper review 4. Efficient: Doesn't waste context on unnecessary details 5. Adaptable: Adjusts depth based on session size and user needs
Example Outputs
See contexts/example-outputs.md for detailed examples of concise summaries and code review formats.
Example Outputs
Example 1: Concise (Small Session)
## Git Session Summary
**Range**: 2025-10-23 14:00 to 16:30 (2.5 hours)
**Commits**: 5 commits
**Files Changed**: 7 modified, 2 added
**Net Changes**: +180 -45 lines
### Commits
- 3be876a Add session logging hooks
- 60d00cf Format file paths and code references
- 9a0bd0b Remove line references from SKILL.md
- dec2ed7 Add CODEOWNERS for Claude files
- b7fb072 Add reviewing-changes skill
### Top Files Changed
1. `.claude/skills/retrospecting/SKILL.md` (+85 -30)
2. `.claude/skills/reviewing-changes/SKILL.md` (+120 -0) [NEW]
3. `.claude/hooks/prompt-submit.sh` (+25 -10)Example 2: Code Review Format
## Code Review Summary
### Overview
- **Suggested PR Title**: "Add retrospective skill with session logging"
- **Changes**: 9 files across 2 areas (skills, hooks)
- **Scope**: New skill creation + infrastructure improvements
### Commits (3)
- Add comprehensive retrospective skill with analysis framework
- Implement session logging hooks for skill consumption
- Add code review skill for PR validation
### Changes by Area
**Skills** (6 files):
- `.claude/skills/retrospecting/SKILL.md`: New skill definition
- `.claude/skills/retrospecting/contexts/session-analytics.md`: Analysis framework
- `.claude/skills/reviewing-changes/SKILL.md`: New code review skill
**Infrastructure** (3 files):
- `.claude/hooks/prompt-submit.sh`: Add logging on session events
- `.claude/CODEOWNERS`: Add ownership for Claude config files
- `docs/ARCHITECTURE.md`: Document skill system
### Test Coverage
- No test files modified
- Consider: Unit tests for log parsing logic
[Key diffs would follow...]Analyzing Git Sessions
Analyzes git commits and changes within a timeframe or commit range, providing structured summaries for various use cases.
What It Does
This skill analyzes git repository activity and produces structured summaries including:
- Commit history with messages and authors
- File change statistics (additions, deletions, modifications)
- Identification of key files by change magnitude
- Optional code diffs for review
- Multiple output formats for different use cases
When to Use
Use this skill when you need to:
- Review your work: "What did I accomplish in the last 2 hours?"
- Prepare code reviews: Generate PR descriptions and identify review focus areas
- Write standups: "What did I work on yesterday?"
- Document sessions: Capture work done during a coding session
- Analyze branches: "What changes are in my feature branch?"
- Track activity: Weekly or monthly contribution summaries
How to Use
Natural Language Invocations
Time-based analysis:
- "Analyze my git changes from the last 2 hours"
- "Show me what I committed today"
- "Summarize my work since 10am"
- "What changed in the last hour?"
Commit range analysis:
- "Show me changes between abc123 and def456"
- "Analyze commits from HEAD~5 to HEAD"
- "Compare feature-branch to main"
With specific focus:
- "Show me authentication module changes from today"
- "What test files did I modify this week?"
- "Analyze changes in the app directory since yesterday"
Output format requests:
- "Generate a code review summary for my last 3 commits"
- "Give me a concise summary of today's work"
- "Show detailed diffs for my morning commits"
Direct Skill Invocation
/skill analyzing-git-sessionsThe skill will prompt you for:
1. Time range or commit range 2. Optional path filters 3. Desired output depth (concise/detailed/code review)
Output Formats
1. Concise Summary (Default)
Best for: Quick overview, standup reports, work logs
Includes:
- Commit count and authors
- Files changed summary (added/modified/deleted)
- Net line changes
- Top 5-10 files by change size
- Commit messages
Example:
Git Session Summary
Range: 2 hours ago to now
Commits: 8
Files Changed: 12 modified, 2 added
Net Changes: +340 -120 lines
Top Files:
1. AuthViewModel.kt (+85 -30)
2. LoginScreen.kt (+60 -15)
...2. Detailed Summary
Best for: Session documentation, deeper review
Includes everything from Concise, plus:
- Full file list with statistics
- Author breakdown
- Diffs for top 3-5 files
- File categorization (source, test, config)
3. Code Review Format
Best for: PR preparation, team reviews
Includes:
- Suggested PR title (from commits)
- Changes grouped by module/directory
- Scope summary
- Test coverage assessment
- Formatted commits suitable for PR description
- Key diffs organized by module
Configuration Options
Output Depth
Control level of detail:
- Concise: Stats and commit list only (~500-1000 tokens)
- Detailed: Stats + top file diffs (~2000-5000 tokens)
- Code Review: Comprehensive with module grouping (~3000-8000 tokens)
The skill automatically suggests appropriate depth based on session size.
Path Filters
Narrow analysis to specific paths:
- "Analyze changes in app/src/main/kotlin/auth/"
- "Show only test file changes"
- "Focus on gradle files"
Author Filters
For multi-contributor analysis:
- "Show only my commits from today"
- "What did the team change this week?"
Use Cases
1. Daily Standup Preparation
Request: "Summarize my git changes from yesterday"
Result: Concise list of commits and key files for standup discussion
2. Code Review Preparation
Request: "Generate code review summary for feature-auth-biometrics branch"
Result: PR-ready description with:
- What changed and why
- Files organized by module
- Test coverage notes
- Suggested review focus areas
3. Session Documentation
Request: "Detailed analysis of my work in the last 3 hours"
Result: Comprehensive summary for retrospective or work log:
- What was accomplished
- Which files were touched
- Magnitude of changes
- Key code diffs
4. Weekly Activity Summary
Request: "Show me all my commits from the last 7 days"
Result: Week-at-a-glance view of your contributions
5. Branch Comparison
Request: "Compare feature-branch to main"
Result: What's in the feature branch that's not in main
- Commits to be merged
- Files that will change
- Potential conflicts
6. Retrospective Git Data
Request: (Called by retrospecting skill during analysis)
Result: Git metrics for retrospective:
- Session scope (commit count, file count)
- Change velocity
- Areas of focus (which modules touched)
Tips for Best Results
Be Specific About Timeframe
Good:
- "Last 2 hours"
- "Since 2025-10-23 14:00"
- "Today from 9am to 5pm"
Less specific (still works, but may need clarification):
- "Recent changes" → skill will ask "how recent?"
- "My work" → skill will ask "from when?"
Request Appropriate Depth
For quick checks: "Give me a concise summary" For thorough review: "Detailed analysis with diffs" For PR prep: "Code review format"
The skill will recommend depth based on session size, but you can override.
Use Filters for Large Sessions
If you worked on multiple areas:
- "Show only authentication changes from today"
- "Analyze ViewModel changes in the last week"
This keeps output focused and context-efficient.
Output Examples
Example 1: Quick Work Log
Input: "What did I work on this morning?"
Output:
Git Session Summary (9:00am - 12:00pm)
Commits: 6
Files: 9 modified, 1 added
Changes: +220 -65 lines
Commits:
- Add biometric authentication support
- Refactor LoginViewModel state handling
- Update authentication tests
- Fix credential manager integration
- Add error handling for biometric failures
- Update documentation
Key Files:
1. BiometricAuthManager.kt (+85 -15)
2. LoginViewModel.kt (+60 -25)
3. AuthenticationTests.kt (+45 -20)Example 2: Code Review Ready
Input: "Generate PR summary for my feature branch"
Output:
Pull Request Summary
Title: Add Biometric Authentication Support
Overview:
- 12 commits over 3 days
- 15 files changed across 3 modules
- Adds biometric authentication flow with fallback
Commits:
1. Implement BiometricAuthManager for authentication
2. Add biometric prompt UI components
3. Integrate with CredentialManager API
...
Changes by Module:
app (8 files):
- BiometricAuthManager.kt: Core biometric logic
- LoginScreen.kt: UI integration
- AuthViewModel.kt: State management
core (4 files):
- CredentialProvider.kt: Credential management
- SecurityUtils.kt: Security helpers
tests (3 files):
- BiometricAuthTests.kt: Unit tests
- LoginFlowTests.kt: Integration tests
Test Coverage:
✓ 2 new test files added
✓ 45 new test cases
⚠ Consider: Error handling edge cases
[Diffs for key files would follow]Integration with Other Skills
This skill integrates with several workflows and can be invoked standalone or as part of other processes:
Retrospecting Skill
- Invoked during Step 2 (Gather Data - Git Analysis)
- Provides commit history and change stats for retrospective analysis
Code Review Preparation
- Generate PR descriptions
- Identify review focus areas
- Highlight test coverage changes
Daily Standup Reports
- "What did I work on yesterday?"
- Quick summary of activity
Work Log Generation
- Weekly/monthly activity summaries
- Contribution tracking
Performance Notes
Context Efficiency
- Concise mode: ~500-1K tokens (very efficient)
- Detailed mode: ~2-5K tokens (moderate)
- Code Review mode: ~3-8K tokens (comprehensive)
For large sessions (>30 files), the skill automatically uses concise mode to prevent context overflow.
Speed
- Git commands are fast (typically <1 second)
- Analysis and formatting: 5-10 seconds
- Total time: Usually <30 seconds
Limitations
Cannot:
- Analyze uncommitted changes (use
git statusorgit diffdirectly) - Access remote branches not fetched locally
- Interpret semantic meaning of changes (shows what changed, not why)
- Generate commits or modify git history
Works best with:
- Clean commit history with meaningful messages
- Commits pushed regularly (not one giant commit)
- Reasonable session sizes (<100 files changed)
Troubleshooting
"No commits found in range"
- Check your time syntax: "since 2 hours ago" not "2 hours"
- Verify commits exist:
git log --since="your timeframe" - Try absolute time: "since 2025-10-23 10:00"
"Too many files changed, showing summary only"
- This is context protection (>30 files)
- Request specific paths: "Show only app/ changes"
- Use concise mode explicitly
- Split analysis into multiple focused queries
"Commit range invalid"
- Check commit hashes exist:
git log abc123 - Use correct range syntax:
start..end(two dots) - Ensure branch names are correct
Output seems incomplete
- Specify "detailed" mode explicitly
- Check if session size triggered automatic concise mode
- Request specific files: "Show diffs for MainActivity.kt"
Version History
v1.0 (2025-10-23):
- Initial release
- Support for time ranges and commit ranges
- Three output formats (concise, detailed, code review)
- Context-aware depth selection
- Integration with retrospecting skill
Feedback
Found an issue or want a feature?
- Update
.claude/skills/analyzing-git-sessions/SKILL.md - Modify this README for documentation improvements
- Suggest new output formats or filters
---
Maintained By: @team-ai-sme Related Skills: retrospecting, reviewing-changes
Related skills
FAQ
What ranges can it analyze?
Time ranges like 'last 2 hours', commit ranges like HEAD~5..HEAD, or branch comparisons.
How does it avoid context overflow on large sessions?
It limits to the top files by change size and switches to concise mode with warnings for large sessions.