SuperAPI AI Directory

git-weekly-report-cn

General & other

View repository

Updated 10-16 06:52

About this skill

Git Weekly/Daily Report Generation

Overview

Extract Git commit logs and generate a structured daily or weekly report. The output organizes recent work into completed items, in-progress items, important items, plans, and risks/blockers, and supports summarization by time range, author, and repository dimensions, making it easy to reuse in standups, daily reports, weekly reports, or project summaries.

When to Use

Use this skill when the user has the following needs:

  • Generate a weekly or daily report from Git commit records
  • Summarize yesterday's or today's Git activity
  • Summarize recent Git activity across one or more repositories
  • Review work completed within a certain time period
  • Organize commit history into a categorized report
  • Prepare a daily standup summary from commit records

Do Not Use

This skill should not be used in the following scenarios:

  • Code review of specific changes (use code-reviewer instead)
  • Viewing detailed information about a single commit
  • Git operations other than extracting logs (branches, merges, etc.)
  • Report generation unrelated to Git

Usage Instructions

  1. Determine the date range and report type:
    • Daily report: When the user says "yesterday", "today", or "daily report" — default --since is yesterday,--until is today
    • Weekly report: When the user says "this week", "current week", or "weekly report" — default --since is this Monday,--until is today
    • Other cases: default to the last 7 days. Accept user customization.
  2. Determine the author filter. Use it if the user specifies one; default: all authors.
  3. Determine the repository path. Default: the current working directory. If the user mentions multiple projects, collect all paths.
  4. Run the script:
python3 scripts/git_weekly_report.py --since <YYYY-MM-DD> --until <YYYY-MM-DD> [--author <名称>] [--repo <路径1> <路径2> ...]
  1. Read the JSON output. The script provides structured commit data grouped by repository.
  2. Use weekly-report-format.md as a categorization guide to classify commits by type.
  3. Use weekly-report-template.md as the output structure to generate the final weekly report.
  4. "Next week's plan" and "risks/blockers" sections: confirm with the user whether there is anything to add, as this information cannot be derived from Git logs. Daily reports do not include these sections by default unless the user requests them.
  5. Present the final Markdown weekly report. Save it to a file if the user needs it.

Script Usage

# 默认:最近 7 天,当前目录
python3 scripts/git_weekly_report.py

# 指定日期范围
python3 scripts/git_weekly_report.py --since 2026-04-21 --until 2026-04-28

# 指定作者
python3 scripts/git_weekly_report.py --since 2026-04-21 --author "Yang"

# 多个仓库
python3 scripts/git_weekly_report.py --since 2026-04-21 --repo /path/to/project-a /path/to/project-b

# 保存输出到文件
python3 scripts/git_weekly_report.py --since 2026-04-21 --output /tmp/weekly.json

# 包含 merge 提交
python3 scripts/git_weekly_report.py --since 2026-04-21 --merges

JSON Output Structure

The script outputs JSON with the following structure:

  • date_range: { since, until } — the queried date range
  • author_filter: string or null — the applied author filter
  • repositories: { path, name, commit_count, commits } array
  • total_commits: total number of commits across all repositories

Each commit contains:hash、short_hash、author、date、subject、body、refs。

Weekly Report Generation

When a single repository has more than 50 commits, summarize by category rather than listing them one by one. Always keep the short_hash for traceability.

"Work in progress" section: watch for the following signals: WIP, TODO, temporary solutions, unmerged feature branches.

"Important items" section: identify: breaking changes, security fixes, major feature launches, and commits involving critical paths.