@gao_sean/changelog

view changelog for every software

G@Gao_Sean·latest·↓ 0·updated 2026-04-30·MIT
gitdata

---name: changelogdescription: Show version / release notes / changelog for any GitHub repo, CLI tool, library, or software. Accepts free-form input — repo like "anthropics/claude-code", fuzzy name like "openspec" / "Cypress" / "Next.js", a URL, or nothing (defaults to Claude Code). Triggered by /changelog or user asking "what changed in X" / "XX 的更新日志" / "XX 最近更新了啥".---# ChangelogShow version info and recent release notes for any repo or software the user names.## Input parsingThe user will pass an args string in one of these forms (or nothing):| 输入形式 | 示例 | 处理方式 ||---|---|---|| org/repo | anthropics/claude-code | 直接用 gh release || <fuzzy name> | openspec / cypress / next.js | 先 gh search repos 找最匹配的 || URL | https://github.com/xxx/yyy/releases | 提取 org/repo || 自然语言 | 看看 openspec 的更新日志 / cypress 最近更新了啥 | 提取关键词后模糊搜索 || 空 | (无参数) | 默认 Claude Code |## Steps### 1. 解析输入从 $ARGUMENTS 中提取目标:- 正则匹配 [\w.-]+/[\w.-]+ → 直接 org/repo- 正则匹配 github\.com/([^/]+)/([^/]+) → 从 URL 提取- 否则去除常见中文修饰词("看看"、"的更新"、"最近更新"、"的 changelog"、"日志"),留下关键词- 无输入 → 默认 anthropics/claude-code(并先跑 claude --version 显示当前版本)### 1.5 探测本地已安装版本(关键步骤)只要能从 args 推出一个"工具名",就尝试检测用户本地是否装了它。按优先级顺序尝试(第一个成功就停):bash# 策略 A: 直接 CLI 探测(最快)<tool> --version 2>/dev/null<tool> -v 2>/dev/null<tool> version 2>/dev/null# 策略 B: 通过包管理器npm list -g <tool> --depth=0 2>/dev/null | grep <tool>pnpm list -g <tool> 2>/dev/nullyarn global list 2>/dev/null | grep <tool>pip show <tool> 2>/dev/null | grep Versionuv tool list 2>/dev/null | grep <tool>pipx list 2>/dev/null | grep <tool>brew list --versions <tool> 2>/dev/nullcargo install --list 2>/dev/null | grep <tool>go version -m $(which <tool>) 2>/dev/null# 策略 C: 应用程序 / 编辑器# VS Codecode --version 2>/dev/null# 系统软件(macOS)mdls -name kMDItemVersion "/Applications/<App>.app" 2>/dev/nullsystem_profiler SPApplicationsDataType 2>/dev/null | grep -A1 "<App>"# Homebrew caskbrew list --cask --versions <tool> 2>/dev/null工具名推断:- 从仓库名取 repo 部分(如 Fission-AI/OpenSpecopenspec)- 特殊映射:vercel/next.jsnext, microsoft/vscodecode, python/cpythonpython- 某些工具命令名和仓库名不一致,用常识判断输出格式:- 如果检测到本地版本 → 在最终回答开头醒目位置标出: 📦 你的本地版本:vX.Y.Z 🆕 最新版本:vA.B.C ⚠️ 落后 N 个版本(或 ✅ 已是最新) - 如果检测不到 → 注明"本地未检测到安装"- 如果不是 CLI 工具(纯库 / 应用)→ 跳过这一步### 2. 定位仓库按优先级尝试:(a) 精确匹配 — 如果已是 org/repo 格式:bashgh release list --repo <org/repo> --limit 5(b) 模糊搜索 — 只有关键词时:bashgh search repos <keyword> --limit 5 --sort stars从结果中挑最相关的(通常是 stars 最高 + 名字匹配最严的)。必须向用户说明你选了哪个仓库,并在底部附其他候选。(c) 非 GitHub 软件 — 如果 gh 找不到(如 VS Code / Python / Chrome / macOS):- 用 WebSearch 搜 <软件名> release notes 2026<软件名> changelog- 优先官方源(docs.xxx.com、releases.xxx.com)- WebFetch 获取最新发布页### 3. 获取详细发布说明得到 release 列表后,取最近 3 个详细内容:bashgh release view <tag> --repo <org/repo>或者批量获取:bashfor tag in $(gh release list --repo <org/repo> --limit 3 --json tagName -q '.[].tagName'); do echo "===== $tag =====" gh release view "$tag" --repo <org/repo>done### 4. 用中文呈现按此结构输出(开头先展示本地版本对比,再进正文):markdown# <软件名> 更新日志(<org/repo>)**定位**:<一句话说明这是什么工具>> 📦 **你的本地版本**:vX.Y.Z> 🆕 **最新版本**:vA.B.C> ⚠️ **落后 N 个版本** · 升级命令:`<具体升级命令>`>> (如未安装,写"💤 本地未检测到安装";如已是最新,写"✅ 已是最新")## 🆕 <version> · <date>(最新)**<release title>**### 新增 / New- ...### 改进 / Improved- ...### 修复 / Fixed- ...---## <前一版本> · <date>...---## 演进趋势(可选,如果有 3+ 版本)简短总结节奏和主题。---**官方链接**:- GitHub: https://github.com/<org/repo>- Releases: https://github.com/<org/repo>/releases### 5. 特殊情况处理- 没有 release 的仓库 → 用 gh api repos/<org/repo>/commits --limit 10 取最近提交- monorepo → 识别 tag 前缀(如 vercel/next.jsnext@15.0.0),按子包分组- 商业闭源软件(macOS / Windows / Office)→ 直接 WebSearch 官方发布说明- CLI 本地工具已安装(像 claude 自己)→ 可以先跑 <cmd> --version 显示当前装的版本- gh 未登录 / 网络不通 → 回退用 WebFetch 直接抓 https://github.com/<org/repo>/releases- 没有 gh 命令 → 全部走 WebFetch + WebSearch### 6. 模糊搜索歧义处理如果搜索返回多个匹配(比如"cypress" 能匹配 cypress-io/cypress 和若干 fork):1. 默认选 star 最多 + 名字最短最像的那个2. 在回答开头明确说:"匹配到 cypress-io/cypress,如果你想看别的请指定 org/repo"3. 底部列 2-3 个备选候选## 示例### 用户输入:/changelog openspec→ 识别为模糊名 → gh search repos openspec → 选中 Fission-AI/OpenSpec → 拉最近 3 个 release → 中文汇报。### 用户输入:/changelog vercel/next.js→ 直接 org/repo → 拉 release → 注意 monorepo tag 前缀。### 用户输入:/changelog 看看 Cypress 最近更新了啥→ 剥掉中文修饰词提取"Cypress" → 搜索 → 匹配到 cypress-io/cypress。### 用户输入:/changelog VS Code→ gh 搜不到?→ 找到 microsoft/vscode → 拉 release。### 用户输入:/changelog Python 3.13python/cpython + 过滤 3.13.x 的 tag。### 用户输入:/changelog→ 无参数 → 默认 Claude Code → claude --version + gh release list --repo anthropics/claude-code。## 原则- 用中文呈现,但技术术语保留原文(版本号、功能名)- 简洁但不遗漏关键变更 — 每条 bullet 1 行说清- 标重大变更(breaking change / security)- 区分 New / Improved / Fixed- 别只列最新,至少 2-3 个版本能看出趋势- 主动说明选的是哪个仓库,避免用户以为你选错了

Featured in 1 collections

See how others combine this skill with their stack

No reviews yet

Use it and be the first to leave a review

Version history

v0.0.0-202604290837latest
2026-04-29