agentleFS
laodao-ailaodao-ai/laodao-skills/claude-upgrade/SKILL.md

claude-upgrade

Skill0 starsChanged 33 days agoApache-2.0View on GitHub

绕过官方安装脚本,直接从 downloads.claude.ai 下载并安装 Claude Code 原生二进制(macOS/Linux 装进 versions 目录并重建软链,Windows 原位替换 claude.exe)。当用户说"升级 claude"、"更新 Claude Code"、"claude 官方升级下载失败"、"装指定版本的 claude",或使用 /claude-upgrade 时触发。

The file

Files
SKILL.md

Claude Upgrade

scripts/upgrade.py 完成全部步骤:读 latest 取版本 → 读该版本 manifest.json 取本平台文件名、sha256、大小 → curl 下载(失败自动续传重试)→ 校验 → 安装 → 用新二进制跑 --version 确认。

平台安装方式
macOS / Linux写入 ~/.local/share/claude/versions/<版本号>,chmod 755,~/.local/bin/claude 软链指向它;旧版本文件保留
Windows原位替换 PATH 上的 claude.exe(找不到则 %USERPROFILE%\.local\bin\claude.exe);旧文件改名为 claude.exe.old

Workflow

  1. 在本 skill 目录执行(python 不存在时用 python3):

    python scripts/upgrade.py

    用户要指定版本时加 --version <x.y.z>;只想看有没有新版时加 --check;同版本重装加 --force。

  2. 向用户报告脚本输出里的平台、旧版本 → 新版本。脚本以 升级完成 结尾才算成功。
  3. 提醒用户:当前会话仍在跑旧版本,退出后重开 claude 才是新版本。

失败处理

情况处理
curl 连接失败 / 超时检查 HTTPS_PROXY 是否设置且代理可用;同一命令重跑即可续传
sha256 或大小不符脚本已删掉坏文件;重跑一次,仍不符则把两个校验值报给用户,停止
Windows 找不到 claude.exe询问用户 claude.exe 所在目录;该情况多为 npm 安装,本 skill 只管原生二进制
安装后 --version 不符报告实际输出,不再重试

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.