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

laodao-upgrade

Skill0 starsChanged 34 days agoApache-2.0View on GitHub

Use when 用户要求升级、更新或重新安装 laodao-skills,或需要把仓库中的 skills 同步配置到 Claude Code 与 Codex。

The file

Files
SKILL.md

Laodao Upgrade

Overview

使用 scripts/upgrade.py 执行可重复的安全升级。脚本负责定位源码仓库、保护本地改动、快进到 origin/main,并调用仓库的 setup.sh 同步 Claude Code 与 Codex。

Workflow

  1. 告知用户该操作会访问 Git 远端,并写入 Claude Code / Codex / Cursor 的用户级 skills 目录。若运行环境要求批准,直接为升级命令申请批准。
  2. 用绝对路径运行(MUST NOT 先 cd 进 skill 目录——Windows 上原生进程的工作目录会锁住该目录,导致 setup.sh 无法替换):

    python3 ~/.claude/skills/laodao-upgrade/scripts/upgrade.py

    Codex / Cursor 侧若装在 ~/.agents/skills:

    python3 ~/.agents/skills/laodao-upgrade/scripts/upgrade.py

    解释器命令是 python 时把上面的 python3 换成 python。

  3. 默认定位失败时,让用户提供源码仓库路径,随后执行:

    python3 ~/.claude/skills/laodao-upgrade/scripts/upgrade.py --repo <laodao-skills-repo>
  4. 保留并向用户展示脚本及 setup.sh 的输出。成功时报告版本、是否拉到新提交,以及 skills 同步结果。

Safety Contract

  • 仓库有未提交或未跟踪改动时停止。报告 git status --short 结果;不要自动 stash、reset、clean、commit 或覆盖。
  • 仅允许 main 快进到 origin/main。分支错误、detached HEAD、历史分叉或命令失败时停止并报告。
  • 找不到源码仓库时停止并请求 --repo;不要自行选择位置 clone。
  • 安装只调用仓库自带 setup.sh。不要绕过其受管标记和同名目录保护逻辑。
  • 不删除仓库外目录;孤儿 skill 的清理由 setup.sh 自己处理。

Failure Handling

情况处理
未提交改动停止,列出改动,等待用户处理
非 main 或历史分叉停止,给出当前状态,不自动切分支或改历史
网络或权限失败保留原错误;按运行环境申请权限后重试同一命令
找不到 Bash提示 Windows 安装 Git for Windows,其他平台确保 bash 在 PATH
同名 skill 未受 laodao 管理尊重 setup.sh 的 skipped 结果,不覆盖

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.