update
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUpdate
更新
Paths: means the folder containing this SKILL.md, and the plugin folder two levels above it.
${CLAUDE_SKILL_DIR}${CLAUDE_PLUGIN_ROOT}Every question goes in the question box: the AskUserQuestion tool (2-4 options, recommended first). Only in an agent without it, ask numbered questions in text.
U="${CLAUDE_SKILL_DIR}/scripts/update.py"python3py--repo <folder>Never push, never force-push, never delete a branch, never stash or reset the user's uncommitted
work. Pushing to their fork happens only when they ask for it.
路径: 表示包含此 SKILL.md 的文件夹, 表示其上两级的 plugin 文件夹。
${CLAUDE_SKILL_DIR}${CLAUDE_PLUGIN_ROOT}所有问题都要通过 question box 提出:使用 AskUserQuestion 工具(提供 2-4 个选项,并将推荐项放在首位)。只有在不具备该工具的 agent 中,才用文本提出编号问题。
U="${CLAUDE_SKILL_DIR}/scripts/update.py"python3py--repo <folder>绝不能 push、force-push、delete branch,也绝不能 stash 或 reset 用户未提交的工作。
只有用户明确要求时,才能 push 到他们的 fork。
1. Which install
1. 判断安装方式
bash
python3 "$U" where- marketplace: run . It runs
python3 "$U" market, thenclaude plugin marketplace update nextworkforclaude plugin updateandai-editor@nextworkitself. Then tell them to typecreator-teardown@nextwork. If it fails, say the lines it prints instead. Their styles, skills and settings live in their own folder and survive (docs/customise.md). Stop here./reload-plugins - plain clone: say the three fork steps it prints. Stop here.
- a fork, run outside its clone: ask for the folder of their clone, then use .
--repo - fork, upstream missing: ask "Add nextwork-projects/ai-video-editor-cooked as so updates can come from it?" (Yes, add it (Recommended) / No). On yes:
upstream.python3 "$U" add-upstream
bash
python3 "$U" where- marketplace:运行 。它会先执行
python3 "$U" market,随后为claude plugin marketplace update nextwork和ai-editor@nextwork本身执行creator-teardown@nextwork。然后告诉用户输入claude plugin update。如果失败,则转述它打印的内容。他们的 styles、skills 和 settings 位于各自的文件夹中,不会受到影响(docs/customise.md)。到此停止。/reload-plugins - 普通 clone:按其输出告知三个 fork 步骤。到此停止。
- 在 clone 目录之外运行的 fork:询问用户其 clone 所在的文件夹,然后使用 。
--repo - fork 缺少 upstream:询问“是否将 nextwork-projects/ai-video-editor-cooked 添加为 ,以便从中获取更新?”(是,添加(推荐) / 否)。如果用户同意,运行
upstream。python3 "$U" add-upstream
2. Check
2. 检查
bash
python3 "$U" checkTell the user in a few lines: how many new commits, the CHANGELOG lines they bring (plain words, the
ones they would notice), and which of their changed files the update also touches. Then ask
Update now (Recommended) / Not now.
bash
python3 "$U" check用几行告知用户:有多少个 new commits、这些 commits 带来的 CHANGELOG 条目(用直白语言说明用户会注意到的内容),以及此次更新还修改了用户哪些 changed files。然后询问 立即更新(推荐) / 暂不更新。
3. Merge
3. 合并
bash
python3 "$U" merge- Exit 2, uncommitted changes: show what it printed. Ask Commit them as "my changes" (Recommended) / I'll handle it myself. Commit only on a yes, then merge again. Never stash.
- Exit 0: go to step 4.
- Exit 3, conflicts: resolve them file by file. For each file, keep the user's change and take
upstream's fix, and say what you did in one line ("captions.tsx: kept your font, took the new
safe-zone fix"). When the two really clash and the choice is theirs (both changed the same
setting to different values), ask in the question box with each side as an option, theirs first.
Then each file and
git add.git commit --no-edit
The backup branch is ; say its name once.
before-update-<date>bash
python3 "$U" merge- 退出码 2,存在未提交的更改:显示脚本打印的内容。询问 提交为“my changes”(推荐) / 我自己处理。只有用户同意后才提交,然后再次执行 merge。绝不能 stash。
- 退出码 0:进入第 4 步。
- 退出码 3,存在冲突:逐个文件解决冲突。对于每个文件,保留用户的更改并采用 upstream 的修复,然后用一行说明所做操作(“captions.tsx:保留你的字体,采用新的 safe-zone 修复”)。如果双方确实冲突,且应由用户决定(双方都将同一个 setting 改成了不同值),则在 question box 中提问,将双方的方案分别列为选项,并将用户的方案放在首位。然后对每个文件执行 ,再执行
git add。git commit --no-edit
备份 branch 名为 ;只需告知一次该名称。
before-update-<date>4. Verify
4. 验证
bash
python3 "$U" verifyIt runs and . Pass: tell them to type
(and, if they installed from their fork on GitHub, that pushing to it and
brings it there, when they want). Fail: show the failing
checks and ask Fix them (Recommended) / Go back to before the update. Going back:
tests/check_plugins.pytests/demos.sh/reload-plugins/plugin marketplace update nextworkbash
python3 "$U" rollbackIt aborts an unfinished merge or moves the branch back to the backup. No branch is deleted.
bash
python3 "$U" verify它会运行 和 。验证通过时,告诉用户输入 (如果用户通过 GitHub 上的 fork 安装,还要说明:在用户需要时,将更改 push 到该 fork,然后执行 ,即可将更新同步过去)。验证失败时:显示失败的 checks,并询问 修复(推荐) / 返回更新前状态。回退方式如下:
tests/check_plugins.pytests/demos.sh/reload-plugins/plugin marketplace update nextworkbash
python3 "$U" rollback它会中止尚未完成的 merge,或将 branch 移回备份状态。不会删除任何 branch。