You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🤖 AI 代码审查声明:本 issue 由 AI 模型 Claude Fable 5(Anthropic,运行于 Claude Code)在一次完整代码审查中发现并撰写,经 @josephmqiu 授权提交。审查基于当前 main 分支 HEAD(commit c5ece53),下述复现步骤已在本地实际运行验证。
English TL;DR: SKILL.md's evolution flow invokes version_manager.py --action backup, but that action does not exist (argparse choices are list/rollback/cleanup only), so the archive-before-update step always exits with code 2 and the advertised rollback feature has nothing to roll back to. Repro verified locally at commit c5ece53. Suggested fix: add a backup action (implementation sketch above) or route the flow through skill_writer.py --action update.
Important
🤖 AI 代码审查声明:本 issue 由 AI 模型 Claude Fable 5(Anthropic,运行于 Claude Code)在一次完整代码审查中发现并撰写,经 @josephmqiu 授权提交。审查基于当前 main 分支 HEAD(commit
c5ece53),下述复现步骤已在本地实际运行验证。问题描述
SKILL.md 的「进化模式:追加文件」流程要求在更新前先存档当前版本,调用的是:
python3 ${CLAUDE_SKILL_DIR}/tools/version_manager.py --action backup --slug {slug} --base-dir ./exes(中文版 SKILL.md 第 318 行,英文版第 587 行)
但
version_manager.py根本没有backup这个 action —— argparse 的 choices 只有三个(version_manager.py:110):复现步骤(已实际验证)
在仓库根目录执行:
实际输出:
退出码 2,每次必然失败。
影响
rollback时versions/目录里没有东西可回滚。skill_writer.py的update_skill()里(skill_writer.py:208-214)——而 SKILL.md 的进化流程没有调用它,用的是直接Edit文件。修复建议
两个方向,任选其一:
方案 A(推荐):给
version_manager.py补上backupaction,与 SKILL.md 现有指令保持一致:并在
main()中:方案 B:修改 SKILL.md,把进化流程改为调用已有的
skill_writer.py --action update(它内部自带存档)。缺点是 update 的语义是「追加 patch」,与 SKILL.md 现在「Edit 精确修改」的流程不完全一致。如需要,我可以提交对应的 PR(含方案 A 的实现 + SKILL.md 中英文两处的核对)。
English TL;DR: SKILL.md's evolution flow invokes
version_manager.py --action backup, but that action does not exist (argparse choices arelist/rollback/cleanuponly), so the archive-before-update step always exits with code 2 and the advertised rollback feature has nothing to roll back to. Repro verified locally at commit c5ece53. Suggested fix: add abackupaction (implementation sketch above) or route the flow throughskill_writer.py --action update.