gitcode-release-notes
Generate release notes for GitCode repositories from commits (by tag range or since-date), grouped as feat/fix/docs/other, output Markdown for Release pages. 按 tag 区间或日期拉取提交并生成版本发布公告 Markdown。Python 3.7+ standard library only.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/autoxj/gitcode-release-notesGitCode 版本发布公告(Release Notes)
根据 GitCode API 拉取仓库在指定区间内的提交。脚本仅负责获取 commit 与简单过滤;你根据脚本输出的 JSON 总结、归类、润色并生成最终 release note,输出为 Markdown 格式,使阅读清晰、像人写的发布说明。
何时使用
- 用户表达「生成 release notes」「版本发布说明」「从 v1.0 到现在的更新日志」「从某日期到现在的提交记录」等意图。
- 必须在本次对话中提供
--repo owner/repo(必传);可选提供--branch、--from、--to、--since-date。
认证
GITCODE_TOKEN:按以下优先级读取。
| 优先级 | 来源 |
|---|---|
| 1 | 进程环境变量 GITCODE_TOKEN |
| 2 | Windows 用户级环境变量 |
| 3 | Windows 系统级环境变量 |
- Linux/macOS:建议在
~/.bashrc或~/.zshrc中export GITCODE_TOKEN="..."。 - 未配置时:脚本报详细错误,提示到 GitCode 个人访问令牌 创建并设置环境变量。
路径约定
- 技能根目录(
SKILL_ROOT):本 SKILL.md 所在目录。脚本通过__file__定位,不依赖当前工作目录。 - 支持 Linux / macOS / Windows;执行时使用脚本绝对路径。
固化流程
- 解析参数:从用户输入或对话中提取
--repo(必传)、--branch、--from、--to、--since-date。 - 调用脚本(输出 JSON):
python <SKILL_ROOT>/scripts/release_notes.py --repo owner/repo --json [--branch BRANCH] [--from TAG] [--to TAG] [--since-date YYYY-MM-DD]- 必须带
--json:脚本只做拉取与简单过滤,向 stdout 输出 JSON,不生成最终 Markdown。 - 区间三选一:
--since-date(从该日 00:00 上海时间至今)、--from(从某 tag 至今)、或--from+--to(两 tag 之间)。 --branch未传时:脚本依次尝试 master → develop → main,都不存在则报错并提示使用--branch。
- 必须带
- 读取 JSON:从 stdout 解析 JSON。若退出码非 0 或 stderr 有错误信息,向用户展示详细错误并结束。
- 生成最终 release note:
- 根据 JSON 中的
commits做归类(新特性 / 修复 / 文档 / 其他)、总结(每条或每组用简要概括,不要直接贴 commit 原文)、润色(统一语言、合并同类、去掉无信息量项),生成干净、专业、可对外发布的 release note。 - 按 「最终 release note 输出格式」 与 「撰写原则」 写出 Markdown(标题、四小节、每条仅写简要说明;不展示 commit 信息;不展示合并条数/测试/合规等无价值信息)。
- 交付给用户(可保存为文件或粘贴到 GitCode Release)。
- 根据 JSON 中的
- 禁止:不得在未得到脚本 JSON 前猜测或伪造数据;不得将 commit 列表原样当作最终 release note 交付,须经总结与润色后再交付。其余禁止事项见「禁止」一节。
脚本参数
| 参数 | 必填 | 说明 |
|---|---|---|
--repo | 是 | 仓库,格式 owner/repo |
--json | 必带(本技能调用时) | 脚本输出 JSON(仅拉取+简单过滤),由你总结并生成最终 release note |
--branch | 否 | 分支;未传时自动尝试 master → develop → main |
--since-date | 否 | 从该日期 00:00(Asia/Shanghai)至今的提交 |
--from | 否 | 起始 tag(到当前 HEAD 或到 --to) |
--to | 否 | 结束 tag,与 --from 一起表示区间 |
--max-per-category | 否 | 仅在不使用 --json 时生效,每类最多展示条数,默认 10 |
- 区间约定:仅用
--since-date、或仅用--from、或--from+--to。若同时传多种,脚本按--since-date>--from/--to优先级处理。 - 本技能流程下须带
--json(以获取 JSON 供你总结);不带--json时脚本会直接输出 Markdown,不经过本技能总结步骤。
脚本 --json 输出与你的职责
- 脚本:仅获取 commit 与简单过滤(排除空 message、纯 merge),向 stdout 输出 JSON;不做归类、不写总结。
- 你:从 stdout 解析 JSON,根据
commits与stats做归类、简要概括、润色,按「最终 release note 输出格式」与「撰写原则」写出 Markdown;不得原样罗列 commit。
最终 release note 输出格式(须统一遵守)
生成 Markdown 时必须按以下格式;每条条目的简要说明根据 commit 进行归纳。
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-autoxj-gitcode-release-notes": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
deepwiki-ask
通过 DeepWiki MCP 查询仓库信息。支持提问、获取结构、获取文档内容。Query a repository via DeepWiki MCP: ask questions, get structure, get documentation. 用户提供 owner/repo 时触发。
skill-everyday
每天抓取 Clawhub 热门技能,深入分析并生成报告。每次执行获取一个未分析过的热门技能,避免重复。
gitcode-pr-audit
Quality audit for merged GitCode PRs: sample by time range or repo list, check compliance (labels, comments, tests, size, etc.), output table. Use when user asks to 抽检/质量检查 已合入的 PR 规范性、多仓库 PR、或 将结果整理成表格. Multi-repo (owner/repo). Python 3.7+ stdlib only.
gitcode
Fetch and query data from GitCode platform via its REST API: repositories, branches, issues, pull requests, commits, tags, users, organizations, search, webhooks, members, releases and more. 查询 GitCode 上的仓库、分支、议题、PR、提交、标签、用户、组织等数据。Python 3.7+ standard library only.
pr-comment-fix
按 GitCode PR 检视意见修改代码。需 GITCODE_TOKEN。Use when 用户要修改 PR 检视意见。