360 Secure SkillHub
360 安全技能中心

git-commit-summarizer

读取本地 Git 仓库的提交历史,支持按时间范围、作者正则和输出格式过滤,统计提交类型并列出近期提交,可生成文本或 JSON 摘要,用于 changelog 草稿或站会记录。

分类:效率
terrycarter1985
terrycarter1985
热度 10.08
最近更新 2026-08-30 10:25:56

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add terrycarter1985/git-commit-summarizer
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
git-commit-summarizer
description
Generate structured summaries of recent git commit activity. Use when the user asks for a commit summary, changelog draft, standup notes from git, or to understand what changed in a repo over a time range. Supports filtering by author, date range, and output format.
metadata
{"openclaw":{"emoji":"📝"}}

Git Commit Summarizer

Generate structured summaries of recent git commits in a repository.

When to use

  • User asks "what did I commit this week?"
  • Drafting a changelog or release notes
  • Preparing daily standup notes from git activity
  • Reviewing what changed in a time range

Prerequisites

  • Git repository present in the working directory
  • git CLI available

Usage

Run the summarizer script:

bash scripts/summarize.sh [OPTIONS]

Options

Flag Description Default
--since <date> Start date (e.g. 7 days ago, 2026-01-01) 7 days ago
--until <date> End date now
--author <name> Filter by author (regex) all
`--format <text json>` Output format
--repo <path> Repository path cwd

Examples

# Summary of last 7 days
bash scripts/summarize.sh

# Last 24 hours, current author only
bash scripts/summarize.sh --since "24 hours ago" --author "$(git config user.name)"

# JSON output for last 30 days
bash scripts/summarize.sh --since "30 days ago" --format json

# Specific repo
bash scripts/summarize.sh --repo /path/to/repo --since "2026-08-01"

Output

Text format

## Commit Summary: 2026-08-23 → 2026-08-30
Total commits: 12

### By type
- feat: 5
- fix: 4
- docs: 2
- chore: 1

### Recent commits
- abc1234 feat: add user authentication
- def5678 fix: resolve login redirect bug
...

JSON format

{
  "since": "2026-08-23",
  "until": "2026-08-30",
  "totalCommits": 12,
  "byType": { "feat": 5, "fix": 4, "docs": 2, "chore": 1 },
  "commits": [
    { "hash": "abc1234", "author": "Jane", "date": "2026-08-30", "message": "feat: add user authentication", "type": "feat" }
  ]
}