Git Daily/Weekly Report Generation
Overview
Extract Git commit logs and generate structured daily or weekly reports. The output organizes recent work into completed items, in-progress items, key items, plans, and risks/blockers, and supports aggregation 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 users have the following needs:
- Generate weekly or daily reports from Git commit records
- Summarize yesterday's or today's Git activities
- Aggregate recent Git activities from one or more repositories
- Review work completed within a specific time period
- Organize commit history into categorized reports
- Prepare daily standup summaries from commit records
When Not to Use
Do not use this skill in the following scenarios:
- Code review for specific changes (use code-reviewer instead)
- View detailed information of a single commit
- Extract Git operations other than logs (branching, merging, etc.)
- Generate reports unrelated to Git
Usage Instructions
- Determine the date range and report type:
- Daily Report: When the user says "yesterday", "today", or "daily report" — default is yesterday, is today
- Weekly Report: When the user says "this week", "current week", or "weekly report" — default is Monday of this week, is today
- Other cases: Default to the last 7 days. Custom ranges from users are accepted.
- Determine author filtering. Use the specified author if provided; default: all authors.
- Determine repository paths. Default: current working directory. Collect all paths if the user mentions multiple projects.
- Run the script:
bash
python3 scripts/git_weekly_report.py --since <YYYY-MM-DD> --until <YYYY-MM-DD> [--author <Name>] [--repo <Path1> <Path2> ...]
- Read the JSON output. The script provides structured commit data grouped by repository.
- Use weekly-report-format.md as a classification guide to categorize commits by type.
- Use weekly-report-template.md as the output structure to generate the final weekly report.
- "Next Week's Plan" and "Risks & Blockers" sections: Confirm with the user whether there is additional content to supplement, as this information cannot be derived from Git logs. Daily reports do not include these sections by default unless requested by the user.
- Present the final Markdown weekly report. Save to a file if the user requires it.
Script Usage
bash
# Default: last 7 days, current directory
python3 scripts/git_weekly_report.py
# Specify date range
python3 scripts/git_weekly_report.py --since 2026-04-21 --until 2026-04-28
# Specify author
python3 scripts/git_weekly_report.py --since 2026-04-21 --author "Yang"
# Multiple repositories
python3 scripts/git_weekly_report.py --since 2026-04-21 --repo /path/to/project-a /path/to/project-b
# Save output to file
python3 scripts/git_weekly_report.py --since 2026-04-21 --output /tmp/weekly.json
# Include merge commits
python3 scripts/git_weekly_report.py --since 2026-04-21 --merges
JSON Output Structure
The script outputs JSON with the following structure:
- : — Query date range
- : string or null — Applied author filter
- : Array of
{ path, name, commit_count, commits }
- : Total number of commits across all repositories
Each commit includes:
,
,
,
,
,
,
.
Weekly Report Generation
When the number of commits in a single repository exceeds 50, summarize by category instead of listing each one individually. Always retain the short_hash for traceability.
For the "In-Progress Work" section, watch for signals like WIP, TODO, temporary solutions, and unmerged feature branches.
For the "Key Items" section, identify: breaking changes, security fixes, major feature launches, and commits involving critical paths.