git-commit-summarizer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Git Commit Summarizer

Git Commit Summarizer

This skill analyzes git commit history for specified users and generates detailed markdown summary reports. It helps track developer contributions, code changes, and project progress over time.
该工具会分析指定用户的Git提交历史,并生成详细的Markdown汇总报告。它有助于跟踪开发者贡献、代码变更以及项目随时间的进展情况。

Capabilities

功能特性

  • User-Specific Analysis: Summarize commits for one or multiple git users
  • Time-Based Filtering: Analyze commits from today or over specified number of days
  • Report Generation: Create detailed markdown reports with commit statistics
  • File Organization: Automatically save reports to
    .claude/git_commit_report/
    directory
  • Multi-User Support: Process multiple users in a single execution
  • 用户专属分析:汇总一个或多个Git用户的提交记录
  • 基于时间的筛选:分析今日或指定天数内的提交记录
  • 报告生成:创建包含提交统计信息的详细Markdown报告
  • 文件管理:自动将报告保存至
    .claude/git_commit_report/
    目录
  • 多用户支持:单次执行即可处理多个用户

Input Requirements

输入要求

The skill requires:
  • Usernames: One or more git usernames (comma-separated)
  • Days: Optional number of days to analyze (defaults to today)
Example Input Format:
@git-commit-summarizer
Usernames: john.doe,jane.smith,alex.wong
Days: 7
该工具需要:
  • 用户名:一个或多个Git用户名(逗号分隔)
  • 天数:可选的分析天数(默认值为今日)
示例输入格式
@git-commit-summarizer
Usernames: john.doe,jane.smith,alex.wong
Days: 7

Output Formats

输出格式

Report Files: Markdown files saved to
[current_repository]/.claude/git_commit_report/
  • Filename format:
    [username]-[date].md
  • Each report includes:
    • User information and analysis period
    • Total commit count
    • Commit details (hash, date, message, files changed)
    • Statistics (commits per day, files per commit)
    • Summary of changes
Console Output: Summary of processing results and report locations
报告文件:Markdown文件保存至
[current_repository]/.claude/git_commit_report/
  • 文件名格式:
    [username]-[date].md
  • 每份报告包含:
    • 用户信息和分析周期
    • 总提交次数
    • 提交详情(哈希值、日期、提交信息、变更文件)
    • 统计数据(每日提交次数、每次提交涉及文件数)
    • 变更汇总
控制台输出:处理结果摘要和报告位置信息

How to Use

使用方式

"Summarize git commits for user 'john.doe' over the last 3 days" "Generate commit reports for 'alice,bob,charlie' for today" "Analyze all commits by 'dev-team' in the last 14 days"
"汇总用户'john.doe'过去3天的Git提交记录" "为'alice,bob,charlie'生成今日的提交报告" "分析'dev-team'过去14天的所有提交记录"

Scripts

脚本说明

  • git_commit_analyzer.py
    : Main module for analyzing git commits and generating reports
  • report_generator.py
    : Creates formatted markdown reports from commit data
  • git_commit_analyzer.py
    :用于分析Git提交记录并生成报告的主模块
  • report_generator.py
    :根据提交数据创建格式化的Markdown报告

Best Practices

最佳实践

  1. Repository Context: Run this skill within a git repository directory
  2. User Names: Use exact git usernames as they appear in commit history
  3. Time Range: Specify days when you need historical analysis (default is today)
  4. Report Location: Reports are saved in
    .claude/git_commit_report/
    for easy access
  5. Multiple Users: Use comma-separated format for analyzing multiple users at once
  1. 仓库上下文:在Git仓库目录内运行该工具
  2. 用户名:使用提交历史中显示的准确Git用户名
  3. 时间范围:当需要历史分析时指定天数(默认是今日)
  4. 报告位置:报告保存于
    .claude/git_commit_report/
    目录,便于访问
  5. 多用户:使用逗号分隔格式可同时分析多个用户

Limitations

局限性

  • Requires git repository with commit history
  • Only analyzes commits from the current repository
  • Usernames must match exactly as in git commit history
  • Time-based filtering uses relative days from current date
  • Cannot analyze commits from remote repositories without local clone
  • 需要带有提交历史的Git仓库
  • 仅分析当前仓库的提交记录
  • 用户名必须与Git提交历史中的完全匹配
  • 基于时间的筛选使用相对于当前日期的天数
  • 若没有本地克隆,无法分析远程仓库的提交记录