← 返回 Skills 市场
autoxj

GitCode Repo Daily

作者 do_while_true · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
249
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install gitcode-repo-daily
功能描述
Generate daily operations reports for GitCode repositories with key metrics, AI summaries and Markdown output. 将 GitCode 上配置的仓库运营数据整理成日报输出;支持关键指标统计、AI 摘要与 Ma...
使用说明 (SKILL.md)

GitCode 仓库运营报表(日报)

根据 config 或用户指定的仓库列表,生成运营日报(调 API + 写 DB)。摘要根据报表数据生成后,渲染时自动写入 DB

何时使用

  • 用户表达「生成日报」「仓库运营报表」「今日动态」「整理成日报」等意图。
  • 可选:用户提供仓库链接或 owner/repo、日期;未提供则使用脚本从 config.json 读取的 repos(脚本负责读写 config)。
  • 若用户本次指定了仓库,调用脚本时传入 --repos "owner/repo,...",脚本会用于本次并写入 config,下次未指定时将使用此列表。
  • 若 config 中 repos 为空且用户未指定仓库,则提示:「请本次对话中指定要统计的仓库(将保存为默认),或在 config.json 中配置 repos」。

认证

GITCODE_TOKEN:按以下优先级读取,任一处有值即用。

优先级 来源 适用平台
1 进程环境变量 GITCODE_TOKEN 所有平台
2 Windows 用户级环境变量 Windows
3 Windows 系统级环境变量 Windows
  • Linux / macOS:仅读进程环境变量。建议在 ~/.bashrc~/.zshrc 中添加 export GITCODE_TOKEN="your_token"
  • Windows:进程环境变量 → 用户级 → 系统级。
  • 日报必选(调 API 拉取当日数据)。

路径约定

  • 技能根目录(下称 SKILL_ROOT):本 SKILL.md 所在的目录。脚本通过 __file__ 定位自身,不依赖工作目录
  • 中间文件目录SKILL_ROOT/temp_dir/,脚本自动创建。
  • 执行脚本时,统一使用脚本绝对路径,无需 cd 到特定目录。
  • --report-json--summaries-file 参数的相对路径会自动按 SKILL_ROOT 解析(也可传绝对路径),已有默认值无需每次指定。

固化流程(必须按此执行)

日报

  1. 解析:解析 日期(今日/昨天/YYYY-MM-DD)和 仓库列表(可选)。
  2. 调用脚本:若用户本次指定了仓库,传入 --repos "owner/repo,..."(逗号分隔);否则不传。config 由脚本读写,你无需写入 config。 python \x3CSKILL_ROOT>/scripts/generate_daily_report.py [--date YYYY-MM-DD] [--repos "owner/repo,..."](默认 --type day)。需 GITCODE_TOKEN。
  3. 读取结果:脚本成功时自动写入 SKILL_ROOT/temp_dir/report.json(UTF-8 编码),同时也输出到 stdout。优先从文件读取(避免 Windows 管道编码乱码),若文件不存在再解析 stdout。
  4. 错误:若 status == "error",提示 message 并结束。
  5. 提示用户:若脚本返回或 report.json 中含有 repos_saved: truerepos_saved_message,须用自然语言告知用户:「已保存为默认仓库列表,下次若不指定仓库将使用此列表。」不得向用户提及 config.json、--repos 等实现细节。
  6. 成功
    • 读取 SKILL_ROOT/temp_dir/report.json(脚本已自动写入,无需手动保存)。
    • report.repos 中每个无 fetch_error 的仓,根据 merged_prs_for_ai自行生成该仓今日摘要;再根据各仓摘要生成全局一句话摘要

      摘要要求:1-2 句话,≤100 字,概括该仓当日主要变更方向。示例:「今日合并 3 个 PR,涉及 NPU 调度策略优化和单测补充。」

    • 将各仓摘要与全局摘要写成 SKILL_ROOT/temp_dir/summaries.json(使用 Write 工具),格式如下:
      {
        "period_type": "day",
        "date": "2026-03-10",
        "repos": [
          {"repo": "owner/repo", "summary": "今日合并3个PR,涉及调度优化和单测补充。"}
        ],
        "global": "全局一句话摘要"
      }
      
    • 必须使用脚本渲染模式生成日报 Markdownpython \x3CSKILL_ROOT>/scripts/generate_daily_report.py --render --output \x3C用户指定的 .md 路径> 脚本自动从 temp_dir/report.json 和 temp_dir/summaries.json 读取,渲染时同时自动将摘要写入 DB。同一天多次执行时 DB 自动保留最新结果。报告结构由 resources/daily_report.md 唯一确定,不得自行改写模板结构或跳过渲染。

禁止

  • 禁止在未得到脚本 stdout 输出前猜测或伪造数据。日报只调用 generate 一次。

脚本与路径

  • scripts/generate_daily_report.py(唯一脚本):
    • 生成日报--type day(默认)、[--date YYYY-MM-DD][--repos "owner/repo,..."]。仓库列表:未传 --repos 时从 config.json 读取;传了则用于本次并写入 config(下次未指定时使用)。结果自动写入 temp_dir/report.json。stdout 仅输出简短状态(文件路径),必须从文件读取完整数据
    • 渲染报表--render --output \x3CPATH> [--template \x3CPATH>]。日报使用 resources/daily_report.md 模板。渲染时自动将 summaries.json 中的摘要保存到 DB
    • 单独保存摘要(可选):--save-summaries,仅在不渲染但需写 DB 时使用。
  • resources/daily_report.md:日报的固定模板,不得擅自改动。
  • 配置:config.json 由脚本读写(无需写入);存储:resources/report.db
  • 脚本通过 __file__ 定位技能根目录,不依赖工作目录,Windows / Linux / macOS 均可使用绝对路径执行。

示例(供无歧义执行)

以下 \x3CS> 代表 \x3CSKILL_ROOT>/scripts/generate_daily_report.py,执行时替换为脚本绝对路径。

用户意图 命令
生成今日日报 python \x3CS>
生成 3 月 8 日日报 python \x3CS> --date 2026-03-08
指定仓库生成日报(并保存为默认) python \x3CS> --repos "owner/repo,owner2/repo2"
渲染报表到文件(同时自动保存摘要到 DB) python \x3CS> --render --output 报告路径.md

报表内容结构(由模板唯一确定)

日报 必须 通过 --render 使用 resources/daily_report.md 模板生成,以保证输出格式一致。结构:标题(含 emoji)→ 一、仓库概览(整体指标表 + 全局一句话摘要)→ 二、分仓详情(含可点击 Issue/PR 链接、合并 PR 列表、热门 Issue 明细、该仓小结)→ 三、行动建议(基于数据自动识别的关注事项)。

参考

  • 设计、config、DB 表、报表 Schema:README.md

历史版本

v1.0.0 (2026-03-11)

  • 🎉 初始版本发布
  • 📅 支持日报与摘要
安全使用建议
This skill appears to do what it says: it will run the included Python script, contact api.gitcode.com using the provided GITCODE_TOKEN, and write report JSON, summaries, and a local SQLite DB (resources/report.db) plus update config.json when you save repos. Before installing/using: (1) ensure the GITCODE_TOKEN you provide has only the minimal scope needed for reading repo/PR/issue data; (2) be aware the skill will persist config.json and report.db in the skill directory; (3) if running on Windows, the script may query user/machine environment variables via PowerShell to locate the token — review that behavior if you have policies about environment access; (4) if you need stricter isolation, run the script in a controlled environment or inspect the included script yourself. Overall, nothing in the package appears disproportionate or unrelated to generating GitCode reports.
功能分析
Type: OpenClaw Skill Name: gitcode-repo-daily Version: 1.0.0 The skill bundle is a legitimate tool for generating GitCode repository operation reports. It uses the official GitCode API to collect metrics and stores historical data in a local SQLite database (report.db) for trend analysis. The Python script (generate_daily_report.py) relies solely on the standard library and includes robust logic for credential retrieval (including Windows environment variables via PowerShell), API pagination, and Markdown rendering. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
能力评估
Purpose & Capability
Name/description (generate daily reports for GitCode repos) align with requested credential (GITCODE_TOKEN), included Python script, templates, and DB usage. The script calls only the GitCode API (api.gitcode.com) and performs metrics, rendering, and local storage as described.
Instruction Scope
SKILL.md instructs the agent to run the included script, read/write config.json, create/read temp_dir/report.json and summaries.json, and write summaries into a local SQLite DB during rendering. These actions are within the stated purpose but are persistent (config.json and resources/report.db are modified). The SKILL.md also instructs hiding implementation details from the user (UI behavior), which is a non-security but noteworthy detail.
Install Mechanism
No install spec; instruction-only plus an included Python script. No network downloads or package installs are performed by the skill itself, minimizing installation risk.
Credentials
Only GITCODE_TOKEN is declared/used. The script checks process env and, on Windows, user/machine environment variables via PowerShell to locate the token — which is consistent with authentication needs. No unrelated credentials or secrets are requested.
Persistence & Privilege
The skill persists data locally: it may write config.json (repos list), temp_dir/report.json, summaries.json, and resources/report.db (SQLite). This file and DB writing is documented and proportional to the functionality, but is persistent on disk and will modify files within the skill directory.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install gitcode-repo-daily
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /gitcode-repo-daily 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
gitcode-repo-daily v1.0.0 - 🎉 初始版本发布 - 📅 支持自动生成 GitCode 仓库日报、统计关键指标 - 🤖 AI 自动生成分仓和全局摘要
元数据
Slug gitcode-repo-daily
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

GitCode Repo Daily 是什么?

Generate daily operations reports for GitCode repositories with key metrics, AI summaries and Markdown output. 将 GitCode 上配置的仓库运营数据整理成日报输出;支持关键指标统计、AI 摘要与 Ma... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 249 次。

如何安装 GitCode Repo Daily?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install gitcode-repo-daily」即可一键安装,无需额外配置。

GitCode Repo Daily 是免费的吗?

是的,GitCode Repo Daily 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

GitCode Repo Daily 支持哪些平台?

GitCode Repo Daily 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 GitCode Repo Daily?

由 do_while_true(@autoxj)开发并维护,当前版本 v1.0.0。

💬 留言讨论