返回 Skill 列表
extension
分类: 开发与工程无需 API Key

dev-recap

开发工作回顾助手:扫描本地 Git 仓库,AI 自动生成周报/日报/站会汇报/月度总结,数据全程不出机。 Use this skill when the user asks to generate weekly reports, daily standups, monthly summaries, or work recaps from Git commit history. Trigger on keywords like: 周报、日报、站会、月报、 工作总结、commit 分析、Git 分析、weekly report、daily standup、monthly summary、work recap.

person作者: zhiqiushubgithub

Dev-Recap Skill Guide

环境要求

| 项目 | 要求 | | --- | --- | | 操作系统 | Windows 10/11 | | Python | 3.11+ | | 内存 | ≥ 10 GB (模型加载时) | | 磁盘 | ≥ 15 GB (模型文件 ~7GB) | | 网络 | 首次运行需联网下载模型 |

安装

# 1. 安装依赖
pip install -r requirements.txt

# 2. (可选)创建独立虚拟环境
python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt

依赖清单 (requirements.txt):

  • openvino>=2025.0, openvino-genai>=2025.0 — OpenVINO 推理引擎
  • optimum[openvino], transformers — 模型导出/加载
  • gitpython>=3.1.40 — Git 仓库解析
  • modelscope, huggingface_hub — 模型下载

模型

首次运行会自动下载并导出模型到 models/qwen2.5-7b-instruct-ov/

模型配置见 info.json:

  • 模型: Qwen/Qwen2.5-7B-Instruct
  • 格式: OpenVINO IR INT8
  • 来源: HuggingFace / ModelScope 自动下载 + optimum 导出

手动下载(跳过自动导出,直接放入目录):

python scripts\model_downloader.py

Usage

Generate weekly report from Git repos

scripts\run.ps1 "<repo_path>" [--days 7] [--author "name"] [--template weekly] [--output path]

Examples:

| Intent | Command | | --- | --- | | 生成本周周报 | scripts\run.ps1 "D:\projects\my-app" | | 分析多个仓库 | scripts\run.ps1 "D:\proj1" "D:\proj2" --days 14 | | 生成日报 | scripts\run.ps1 "D:\proj" --template daily | | 按作者过滤 | scripts\run.ps1 "D:\proj" --author "张三" | | 保存到文件 | scripts\run.ps1 "D:\proj" --output "D:\reports\weekly.md" |

Important:

  • scripts\run.ps1 is the only supported interface — do not call other scripts directly.
  • First call downloads models (~7GB); if it times out, retry.
  • All processing is 100% local — no data leaves the machine.

Templates

| Template | 说明 | 推荐天数 | | --- | --- | --- | | weekly | 工作周报 | 7 | | daily | 每日站会汇报 | 1 | | monthly | 月度总结 | 30 |

Interpreting the reply

The output is a structured Markdown document with these sections:

# 工作周报

**周期**: <date range>
**开发者**: <author name>

## 工作概述
<2-3 sentence summary>

## 主要完成事项
1. <feature/bugfix/optimization>
2. <feature/bugfix/optimization>

## 代码变更统计
- 提交次数: <number>
- 文件变更: <number>
- 代码新增: +<number> 行
- 代码删除: -<number> 行

## 技术亮点
<notable technical achievements>

## 待办事项
- [ ] <next week plan>

## 风险与问题
<blockers or risks, or "无">

Architecture

Git Repos ──→ [GitAnalyzer] ──→ Commit Stats ──→ [RecapGenerator] ──→ Weekly Report
              (GitPython)                        (Qwen2.5-7B OV)
  • Git Analysis: GitPython parses commit history, extracts stats
  • LLM: Qwen2.5-7B-Instruct via OpenVINO INT8 (text generation)
  • IPC: Windows Named Pipe (Client/Server pattern)
  • Auto-download: Model downloaded via huggingface_hub / modelscope, exported to OpenVINO IR

Troubleshooting

| 问题 | 解决 | | --- | --- | | 未找到 Python | 安装 Python 3.11+ 或使用 python -m venv venv 创建项目内 venv | | pip install 超时 | 使用国内镜像:pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple | | 模型下载超时 | 手动运行 python scripts\model_downloader.py,网络恢复后重试 | | 服务未就绪 (state=error) | 查看 stderr 日志,通常是模型加载失败或依赖缺失 | | GitPython 报错 | 确保目标目录是有效的 Git 仓库(有 .git 子目录) | | 内存不足 | 关闭其他应用;本项目强制使用 CPU 推理,~8GB 内存即可运行 |

Project Layout

dev-recap/
├── SKILL.md            # 本文件
├── info.json           # 模型 & 运行时配置
├── meta.json           # 元数据(展示用)
├── requirements.txt    # Python 依赖
├── .gitignore
├── scripts/
│   ├── run.ps1         # 唯一入口(PowerShell)
│   ├── client.py       # CLI 客户端(短生命周期)
│   ├── server.py       # LLM 服务端(长生命周期,Named Pipe IPC)
│   ├── git_analyzer.py # Git 仓库分析引擎
│   ├── llm_engine.py   # OpenVINO 推理引擎
│   ├── recap_generator.py  # 报告生成器
│   └── model_downloader.py # 模型自动下载器
└── models/             # 运行时生成(已被 .gitignore 排除)
    └── qwen2.5-7b-instruct-ov/

What this skill does NOT do

  • Does NOT upload any code or commit data to cloud services
  • Does NOT modify Git repositories
  • Does NOT support real-time commit monitoring
  • Does NOT support non-Git version control systems