home / skills / aidotnet / moyucode / git-stats
This skill analyzes Git repository statistics including commits, contributors, and code changes to help you understand project activity and trends.
npx playbooks add skill aidotnet/moyucode --skill git-statsReview the files below or copy the command above to add this skill to your agents.
---
name: git-stats
description: 分析Git仓库统计信息,包括提交、贡献者和代码变更。
metadata:
short-description: Git仓库统计
source:
repository: https://github.com/gitpython-developers/GitPython
license: BSD-3-Clause
---
# Git Stats Tool
## Description
Analyze Git repository statistics including commit history, contributor activity, and code changes.
## Trigger
- `/git-stats` command
- User needs repository analysis
- User wants commit statistics
## Usage
```bash
# Repository overview
python scripts/git_stats.py
# Contributor stats
python scripts/git_stats.py --contributors
# Commit history
python scripts/git_stats.py --commits --since "2024-01-01"
# File changes
python scripts/git_stats.py --files --top 10
```
## Tags
`git`, `stats`, `repository`, `commits`, `analysis`
## Compatibility
- Codex: ✅
- Claude Code: ✅
This skill analyzes Git repository statistics to surface commit patterns, contributor activity, and file-level changes. It provides quick summaries and filters so teams and maintainers can understand history, authorship, and recent code churn. The output helps prioritize reviews, audits, and refactoring based on objective repository metrics.
The tool parses the repository commit log, aggregates metrics by author, date range, and file paths, and computes summaries such as commits per contributor, lines added/removed, and most-changed files. It supports filters for time windows, top-N lists, and toggles for commits, contributors, or file-level stats. Results are presented as concise tables and counts that are easy to integrate into CI reports or local analysis scripts.
Does this analyze remote repositories or only local clones?
It analyzes the Git data available in the local clone. Fetch or clone the remote first to ensure analysis reflects the latest remote state.
Can it distinguish merge commits from regular commits?
Yes. The tool can filter or tag merge commits so you can include or exclude them from summaries.