Back to list日本語

/activity-report

When to use

Generate a cross-repository activity report from the GitHub API — collect commits, issues, and PRs across all your repos and summarize them per repository. Handy for daily logs and weekly or monthly retrospectives.

/activity-report detail graphic recording

Activity Report スキル

GitHub API を使って、ユーザーの全リポジトリの活動(コミット・Issue・PR)を収集し、リポジトリ別にサマリーを生成する。

いつ使うか

収集手順

Step 1: 期間の決定

ユーザーの発話から期間を推定する。明示がなければ「今日」(JST基準)。

発話例期間
今日の活動当日 00:00 JST 〜 now
今週今週月曜 00:00 JST 〜 now
今月当月1日 00:00 JST 〜 now
最近 / ここ数日直近7日

JST → UTC 変換: JST 00:00 = 前日 15:00 UTC

Step 2: データ収集スクリプトの実行

バンドルされた scripts/collect_activity.py を使ってデータを一括収集する。 このスクリプトは gh CLI を使い、Events API + Commits API からリポジトリ別のコミット・Issue・PRを JSON で出力する。

python3 <skill-dir>/scripts/collect_activity.py <username> <since_utc> [until_utc]

例(今日の活動):

python3 <skill-dir>/scripts/collect_activity.py <your-github-username> 2026-03-25T15:00:00Z

例(今週の活動):

python3 <skill-dir>/scripts/collect_activity.py <your-github-username> 2026-03-22T15:00:00Z 2026-03-26T15:00:00Z

出力は以下の JSON 構造:

{
  "period": {"since": "...", "until": "..."},
  "repos": [
    {"repo": "name", "commit_count": 10, "commits": ["msg1", "msg2"]},
    ...
  ],
  "issues": [{"repo": "...", "action": "opened", "number": 1, "title": "..."}],
  "pull_requests": [...],
  "total_commits": 28
}

リポジトリはコミット数の降順でソートされ、Co-Authored-By / Merge コミットは自動除外される。

Step 3: サマリー生成

JSON 出力をもとに、リポジトリ別に以下の形式でまとめる:

### {repo名}({コミット数} commits)
- コミット内容のサマリー(個別列挙ではなく、作業の流れとして要約)
- Issue/PR があれば記載

### {repo名}({コミット数} commits)
- ...

サマリー作成のポイント: