A Claude Code slash command for git repository statistics and insights.
# Clone to your preferred location
git clone git@github.com:claude-commands/command-git-stats.git <clone-path>/command-git-stats
# Symlink (use full path to cloned repo)
ln -s <clone-path>/command-git-stats/git-stats.md ~/.claude/commands/git-stats.md/git-stats # Full repository statistics
/git-stats --author # Contributor statistics
/git-stats --files # File change statistics
/git-stats --period=30d # Stats for last 30 days
/git-stats --compare=main..dev # Compare branches
- Analyzes commit history and patterns
- Calculates contributor metrics
- Identifies code hotspots and churn
- Generates visual activity summaries
- Highlights trends and recommendations
- Repository overview (commits, branches, tags)
- Commit activity by day/hour
- Contributor leaderboard
- File change hotspots
- Code churn analysis
- Branch health
- Merge statistics
Repository Overview
| Metric | Value |
| ------------ | ------ |
| Total Commits| 1,234 |
| Contributors | 15 |
| Branches | 23 |
Contributor Statistics
| Author | Commits | Lines+ | % |
| ------ | ------- | ------ | - |
| @john | 456 | 45,230 | 37% |
| @jane | 312 | 32,100 | 25% |
| Option | Description |
|---|---|
--author |
Focus on contributor stats |
--files |
Focus on file change stats |
--period |
Time period (7d, 30d, 90d) |
--compare |
Compare two refs |
--format |
Output format |
- Git
- Claude Code with Opus 4.5 model access
cd <clone-path>/command-git-stats && git pull