update-github-skills 是一个面向 Codex、Claude Code 等 Agent 的 Skill,用来盘点、检查并安全更新本地安装的 GitHub 来源 skills。它适合你同时使用插件市场、Git clone + cp、curl 一键脚本等多种安装方式后,需要统一管理第三方 skill 更新的场景。
English documentation: README.en.md
- 扫描本地 skill 目录,生成 inventory 清单。
- 自动识别直接 Git clone 安装的 skill。
- 通过
skill-sources.json管理手动复制、zip/curl 下载来源的 skill。 - dry-run 检查远端更新,不直接覆盖本地文件。
- 用户确认后更新,并在更新前自动备份。
- 同时支持 Codex、Claude Code、通用
.agentsskill 目录。
- 你安装了很多 GitHub 作者维护的 skills,希望定期检查更新。
- 有些 skills 是
cp -R手动部署的,已经没有.git信息。 - 你希望在更新前看到哪些文件会变化。
- 你希望更新失败时能保留本地备份。
本仓库核心是普通 Agent Skill,不是 MCP server。它不会出现在 MCP 面板,也不需要 /mcp list 验证。仓库同时提供 .codex-plugin/plugin.json,用于 Codex 插件市场识别和在线安装。
如果未来仓库新增 MCP server,再添加 mcp-server 标签;当前建议 GitHub Topics 使用:
codex-skillclaude-code-skillagent-skillskills-updatergithub-skills
- Python 3.9+:运行 updater 脚本。
- Git:检查或更新 GitHub/Git 来源 skill。
- 网络访问 GitHub:一键安装和远端更新检查需要。
curltarbash或兼容 POSIX shell
macOS 首次安装如果遇到权限问题,可先确认终端有访问用户目录的权限,并使用全局安装目录 ~/.codex/skills/ 或项目局部安装目录 ./.codex/skills/。
- Windows PowerShell 5+ 或 PowerShell 7+
- Git for Windows
- Python 3,并确保
python或py可用
如果 PowerShell 阻止脚本运行,可使用临时执行权限:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypasscurl -fsSL https://raw.githubusercontent.com/wentAInx/update-github-skills/main/install.sh | bash安装到 Claude Code:
curl -fsSL https://raw.githubusercontent.com/wentAInx/update-github-skills/main/install.sh | bash -s -- --agent claude安装到当前项目局部目录:
curl -fsSL https://raw.githubusercontent.com/wentAInx/update-github-skills/main/install.sh | bash -s -- --scope local自定义 GitHub 分支或 fork:
curl -fsSL https://raw.githubusercontent.com/wentAInx/update-github-skills/main/install.sh | bash -s -- --repo wentAInx/update-github-skills --ref mainpowershell -NoProfile -ExecutionPolicy Bypass -Command "iwr -UseBasicParsing https://raw.githubusercontent.com/wentAInx/update-github-skills/main/install.ps1 | iex"安装到 Claude Code:
iwr -UseBasicParsing https://raw.githubusercontent.com/wentAInx/update-github-skills/main/install.ps1 -OutFile install.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Agent claude安装到当前项目局部目录:
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1 -Scope localgit clone https://github.com/wentAInx/update-github-skills.git
cd update-github-skills
bash install.sh --agent codex也可以手动复制 skill 目录:
mkdir -p ~/.codex/skills
cp -R skills/update-github-skills ~/.codex/skills/update-github-skillsClaude Code:
mkdir -p ~/.claude/skills
cp -R skills/update-github-skills ~/.claude/skills/update-github-skills项目局部安装:
mkdir -p ./.codex/skills
cp -R skills/update-github-skills ./.codex/skills/update-github-skillsgit clone https://github.com/wentAInx/update-github-skills.git
cd update-github-skills
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Agent codex手动复制到 Codex:
New-Item -ItemType Directory -Force "$env:USERPROFILE\.codex\skills" | Out-Null
Copy-Item -Recurse -Force .\skills\update-github-skills "$env:USERPROFILE\.codex\skills\update-github-skills"Windows cmd:
mkdir "%USERPROFILE%\.codex\skills"
xcopy /E /I /Y skills\update-github-skills "%USERPROFILE%\.codex\skills\update-github-skills"在 Codex 中添加个人 marketplace:
/plugin marketplace add wentAInx/update-github-skills
安装最新版本:
/plugin install update-github-skills@latest
安装固定版本:
/plugin install update-github-skills@0.1.0
说明:本项目是 Skill 型插件,不是 MCP 插件。安装后请在 skills/插件列表中查看,不要用 /mcp list 验证。
| 模式 | 目录 | 适合谁 |
|---|---|---|
| 全局安装 | ~/.codex/skills/、~/.claude/skills/、%USERPROFILE%\.codex\skills\ |
希望所有项目都能使用 |
| 项目局部安装 | 当前项目的 ./.codex/skills/ 或 ./.claude/skills/ |
希望只在当前仓库启用 |
安装后,在 Codex 或 Claude Code 中尝试:
$update-github-skills 帮我盘点当前本地 skills 的来源
$update-github-skills 检查 ~/.codex/skills 里哪些 GitHub skill 有更新,先不要更新
$update-github-skills 根据 ~/.codex/skill-sources.json dry-run 检查手动复制安装的 skills
也可以直接运行脚本:
python3 ~/.codex/skills/update-github-skills/scripts/github_skill_updater.py inventory --json
python3 ~/.codex/skills/update-github-skills/scripts/github_skill_updater.py check --manifest ~/.codex/skill-sources.json --json对于 curl、zip 下载、手动 cp 安装的 skill,本地目录里通常没有 .git。这时创建 ~/.codex/skill-sources.json:
{
"skills": {
"some-skill": {
"repo": "https://github.com/owner/repo.git",
"ref": "main",
"subdir": "skills/some-skill"
}
}
}然后运行:
python3 ~/.codex/skills/update-github-skills/scripts/github_skill_updater.py check --manifest ~/.codex/skill-sources.json --jsonmacOS/Linux 先确认安装脚本可执行:
chmod +x install.sh如果用户目录受限,改用项目局部安装:
bash install.sh --scope local使用临时执行权限,不改变系统长期策略:
powershell -NoProfile -ExecutionPolicy Bypass -File .\install.ps1确认命令可用:
python3 --version
git --versionWindows 可尝试:
py --version
git --version检查 GitHub 网络连接,或改用 git clone 后本地安装:
git clone https://github.com/wentAInx/update-github-skills.git
cd update-github-skills
bash install.sh这表示该 skill 没有 .git,也没有 manifest 记录。请在 ~/.codex/skill-sources.json 中补充 repo/ref/subdir。
这是正常的。本项目不是 MCP server,不会出现在 MCP 面板。请在 Agent 的 skills 或插件列表中查看。
直接 Git 安装的 skill 有本地未提交修改。先备份或提交你的改动,再重新检查更新。
重新运行安装命令即可。安装脚本会把旧版本移动到带时间戳的 .backup 目录。
cd update-github-skills
git pull --ff-only
bash install.sh --agent codexWindows:
git pull --ff-only
powershell -ExecutionPolicy Bypass -File .\install.ps1 -Agent codex/plugin install update-github-skills@latest