skills/generate-changelog/SKILL.md
根据当前项目 package.json 版本与 Git 提交记录生成中文版本日志。用于用户提出"生成版本日志""生成 changelog""发布新版本并生成更新记录"等请求时,自动读取当前版本号、定位上一版本、汇总版本区间 commit,并更新 changelogs/cn.json(新增版本、生成中文 summary、按类型归类变更)。
npx skillsauth add hellodigua/chatlab generate-changelogInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
按以下流程更新 changelogs/cn.json。
在执行任何 changelog 相关操作前,必须先完成以下预检。任意一项失败则立即停止,报告错误并提示用户修复后再重试。
运行全量类型检查(同时覆盖 Web 与 Node/Electron 主进程):
pnpm run type-check:all
[预检 ✓] 类型检查通过,继续下一步。[预检 ✗] 类型检查失败,请修复后重新执行 generate-changelog。运行桌面端完整构建(electron-vite build),验证 Rollup 打包不会因模块导出缺失等问题而报错:
pnpm run build:desktop
[预检 ✓] 构建检查通过,继续下一步。[预检 ✗] 构建失败,请修复后重新执行 generate-changelog。说明:
type-check:all覆盖导出缺失、类型错误等静态问题;build:desktop覆盖 Rollup 打包层面的模块解析问题(如本次漏写 re-export 导致的报错),两者互补。
两项全部通过后输出:
[预检完成] 类型检查 ✓ 构建检查 ✓,开始生成 changelog...
package.json 中的 version 作为 currentVersion。changelogs/cn.json,确认是否已存在 currentVersion。previousVersion:
currentVersion 已存在于 changelog:取它的下一条记录版本号。currentVersion 不存在于 changelog:取第一条记录版本号。previousVersion,报错并停止。优先按以下规则确定区间:
v{currentVersion}:使用 v{previousVersion}..v{currentVersion}。v{currentVersion}:使用 v{previousVersion}..HEAD。v{previousVersion} 不存在:回退为从首个提交到 HEAD,并在结果中明确标注"缺少上一版本 tag,采用全量范围"。使用命令:
git log --no-merges --pretty=format:'%h%x09%s' <RANGE>
必要时读取正文:
git show -s --format='%B' <commit>
将 commit 按以下类型归类到 changes[].type:
featfixrefactorperfstyledocstestbuildcichorerevertother(无法识别前缀时)归类规则:
feat:, fix(scope):)。other。端标记规则:
【桌面端】:仅 Electron 桌面端可见或仅影响桌面端。【CLI Web】:仅通过 CLI 启动的 Web UI 可见或仅影响 Web 模式。【CLI】:仅命令行、npm 包、CLI 启动/发布链路相关。【MCP】:仅 MCP Server、MCP 设置或 MCP 工具集相关。summary 可概括提及端名,但不使用前缀格式。type 下的 items 排序:先放不带端前缀的通用/跨端变更,再放带端前缀的专属变更;专属变更内部按影响范围和用户可感知程度排序。为本版本生成 1 句中文 summary:
目标文件:changelogs/cn.json
更新规则:
version: currentVersiondate: 当前日期(YYYY-MM-DD)summary: 新生成摘要changes: 分类后的数组(每个元素为 { "type": string, "items": string[] })npx prettier --write changelogs/cn.json
JSON.stringify(..., null, 2) 的最小格式保证,并在输出中明确提示"未执行 Prettier 格式化"。写入后执行以下检查:
version 无重复。changes 中每个 items 至少 1 条。feat / fix)。若自检失败,修复后再输出结果。
补充检查:
changelogs/cn.json 已经过 Prettier(若可用)。自检通过并输出结果后,必须询问用户:
"changelog 已生成完毕。是否继续执行 sync-changelog 技能,将本版本日志同步为多语言版本并提交?"
../sync-changelog/SKILL.md。需要查看项目格式细节时,读取:
references/changelog-format.mdscripts/extract_commits_for_changelog.shscripts/format_changelog.shdevelopment
Convert unsupported local chat exports into validated ChatLab JSONL or JSON by inspecting their structure, writing and running a local Node.js or Python converter, and verifying record counts before import. Use when ChatLab cannot recognize a CSV, HTML, TXT, XML, SQLite/database, vendor-specific JSON/JSONL, archive, or other chat export format, or when a user asks an agent to adapt an unknown chat format for ChatLab.
development
将 ChatLab 暂不支持的本地聊天导出转换为经过验证的 ChatLab JSONL 或 JSON:分析源文件结构,编写并运行本地 Node.js 或 Python 转换脚本,并在导入前核对记录数量。当 ChatLab 无法识别 CSV、HTML、TXT、XML、SQLite/数据库、厂商自定义 JSON/JSONL、压缩包等聊天导出,或用户要求 Agent 适配未知聊天格式时使用。
tools
Safely preview and import local chat export files into ChatLab through the chatlab CLI. Use when a user asks an external agent to import, re-import, or incrementally update ChatLab from a local QQ, WeChat, Telegram, WhatsApp, LINE, Discord, Instagram, Google Chat, ChatLab JSON/JSONL, or other supported chat export.
tools
通过 chatlab CLI 安全预览并将本地聊天导出文件导入 ChatLab。当用户要求外部 Agent 从本地 QQ、微信、Telegram、WhatsApp、LINE、Discord、Instagram、Google Chat、ChatLab JSON/JSONL 或其他受支持的聊天导出文件执行首次导入、重新导入或增量更新时使用。