Changelog Watcher
Maintains a watchlist of GitHub repos and npm packages, detects new releases, and produces markdown reports with breaking changes highlighted.
Files
- -
watchlist.json — user config (create from assets/watchlist.example.json) - INLINECODE2 — auto-managed last-seen versions (do not edit)
- INLINECODE3 — main entry point; calls the others
- INLINECODE4 — GitHub releases API
- INLINECODE5 — npm registry
- INLINECODE6 — markdown report generator
For setup, watchlist format, cron scheduling, and rate limit guidance → read references/setup-guide.md.
Skill Directory
CODEBLOCK0
All script paths below are relative to this directory.
Usage
Check for new releases and print report
CODEBLOCK1
Dry-run (check without advancing state)
CODEBLOCK2
First-time setup (set baseline, no output)
CODEBLOCK3
Workflow
- 1. Confirm
watchlist.json exists. If not, guide user to copy from assets/watchlist.example.json and fill it in. - Run
compare_versions.py (with --update-state unless doing a dry-run). - Pipe output to
format_report.py. - Present the markdown report to the user.
- If the user wants to schedule this: provide the cron line from
references/setup-guide.md.
Adding Entries
To add a GitHub repo:
CODEBLOCK4
To add an npm package:
CODEBLOCK5
Append to the watch array in watchlist.json, then run the full pipeline.
Error Handling
- - Rate limited (exit 2): Wait for the retry window; check how many GitHub entries are in the watchlist vs the 60/hr limit.
- Not found (exit 3): Verify the owner/repo or package name in the watchlist.
- Network error: Check connectivity; retry.
- First-run shows zero releases: Expected — first run sets the baseline only.
更新日志监视器
维护GitHub仓库和npm包的监视列表,检测新版本发布,并生成突出显示重大变更的Markdown报告。
文件
- - watchlist.json — 用户配置文件(从assets/watchlist.example.json创建)
- state.json — 自动管理的上次查看版本(请勿编辑)
- scripts/compareversions.py — 主入口点;调用其他脚本
- scripts/checkgithub.py — GitHub发布API
- scripts/checknpm.py — npm注册表
- scripts/formatreport.py — Markdown报告生成器
关于设置、监视列表格式、定时任务调度和速率限制指南 → 请阅读references/setup-guide.md。
技能目录
~/.openclaw/workspace/skills/changelog-watcher/
以下所有脚本路径均相对于此目录。
使用方法
检查新版本并打印报告
bash
python3 scripts/compareversions.py --update-state | python3 scripts/formatreport.py
试运行(检查但不更新状态)
bash
python3 scripts/compareversions.py | python3 scripts/formatreport.py
首次设置(设定基线,无输出)
bash
cp assets/watchlist.example.json watchlist.json
编辑watchlist.json添加你的包
python3 scripts/compare_versions.py --update-state
工作流程
- 1. 确认watchlist.json存在。如果不存在,引导用户从assets/watchlist.example.json复制并填写。
- 运行compareversions.py(除非是试运行,否则加上--update-state参数)。
- 将输出通过管道传递给formatreport.py。
- 向用户展示Markdown报告。
- 如果用户想要设置定时任务:提供references/setup-guide.md中的cron命令行。
添加条目
添加GitHub仓库:
json
{source: github, owner: OWNER, repo: REPO, name: 显示名称}
添加npm包:
json
{source: npm, package: package-name, name: 显示名称}
追加到watchlist.json的watch数组中,然后运行完整流程。
错误处理
- - 速率限制(退出码2): 等待重试窗口;检查监视列表中的GitHub条目数量是否超过每小时60次的限制。
- 未找到(退出码3): 验证监视列表中的所有者/仓库或包名称。
- 网络错误: 检查网络连接;重试。
- 首次运行显示零个版本: 属于正常情况——首次运行仅设置基线。