with one click
weekly-report
根据 git 提交记录生成指定周(默认上周)的中文工作周报,并 commit 到 work-journal 仓库
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
根据 git 提交记录生成指定周(默认上周)的中文工作周报,并 commit 到 work-journal 仓库
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | weekly-report |
| description | 根据 git 提交记录生成指定周(默认上周)的中文工作周报,并 commit 到 work-journal 仓库 |
收集指定周(周一到周日)各 git 仓库的提交记录,生成中文工作周报,写入文件并提交。
用法:/weekly-report [YYYY-MM-DD]
.claude/skills/weekly-report/config.json 的 scanDir 字段读取config.json 的 jiraBaseUrl 字段读取YYYY/MM/YYYY-MM-DD-weekly-report.md,日期取目标周的周日读取 .claude/skills/weekly-report/config.json,取 scanDir 和 jiraBaseUrl 的值。
运行脚本(可选参数透传):
node .claude/skills/weekly-report/calc-dates.js [YYYY-MM-DD]
脚本输出 JSON,例如 {"monday":"2026-03-30","sunday":"2026-04-05"}。
monday 和 sunday 两个值用于后续步骤。检查 <YYYY>/<MM>/<YYYY-MM-DD>-weekly-report.md 是否已存在,若存在则输出"已存在,跳过"并停止。
运行:git config --global user.email
运行:
node .claude/skills/weekly-report/collect-commits.js <周一> <周日> <email>
输出结构:每个有提交的仓库以 === REPO: <name> === 开头,每条 commit 以 --- COMMIT --- 分隔,内容为完整 commit message(subject + body);若该 commit 只有 subject(无 body),额外输出 --- STAT --- 块(变更文件列表)。
用自然语言写一段中文工作周报:
周报,然后空一行,再写正文TO-1234),转为完整 URL:<jiraBaseUrl>/TO-1234(jiraBaseUrl 来自 config.json)本周无提交记录mkdir -p <YYYY>/<MM>
将生成内容(末尾加换行)写入 <YYYY>/<MM>/<YYYY-MM-DD>-weekly-report.md。
git add <YYYY>/<MM>/<YYYY-MM-DD>-weekly-report.md
git commit -m "weekly-report: <YYYY-MM-DD>"
输出周报内容并确认提交成功。