update-skills-docs

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Update Skills Docs

更新技能文档

On load: immediately run the analysis below. No preamble.
加载后:立即执行以下分析。无需开场白。

Step 1: Find the sync point

步骤1:找到同步点

bash
git rev-parse skills-sync
If the tag does not exist, create it at the last commit that touched
skills/skills/
:
bash
BOOTSTRAP=$(git log --oneline -- skills/skills/ | head -1 | awk '{print $1}')
git tag -a skills-sync $BOOTSTRAP -m "skills synced $(date -I)"
git push skills skills-sync
bash
git rev-parse skills-sync
如果该标签不存在,则在最后一次修改
skills/skills/
的提交处创建它:
bash
BOOTSTRAP=$(git log --oneline -- skills/skills/ | head -1 | awk '{print $1}')
git tag -a skills-sync $BOOTSTRAP -m "skills synced $(date -I)"
git push skills skills-sync

Step 2: Check if already synced

步骤2:检查是否已同步

bash
git log skills-sync..HEAD --oneline
If this produces no output, the tag is already at HEAD. Report "Skills docs are up to date." and stop — do not proceed.
bash
git log skills-sync..HEAD --oneline
如果此命令无输出,说明标签已位于HEAD位置。报告“技能文档已更新至最新状态。”并停止操作——无需继续。

Step 3: Get doc-relevant commits

步骤3:获取与文档相关的提交

bash
git log skills-sync..HEAD --name-only --oneline
Filter the changed files to doc-relevant paths only. Ignore all others.
bash
git log skills-sync..HEAD --name-only --oneline
筛选变更文件,仅保留与文档相关的路径。忽略所有其他路径。

Doc-relevant path prefixes

与文档相关的路径前缀

Path prefixSkill
elements/packages/api/src/resources/
editframe-api
elements/packages/cli/src/commands/
editframe-cli
elements/packages/vite-plugin/src/index.ts
vite-plugin
elements/packages/elements/src/elements/
composition
elements/packages/elements/src/gui/
editor-gui
elements/packages/react/src/gui/
editor-gui
elements/packages/react/src/hooks/
composition
路径前缀技能
elements/packages/api/src/resources/
editframe-api
elements/packages/cli/src/commands/
editframe-cli
elements/packages/vite-plugin/src/index.ts
vite-plugin
elements/packages/elements/src/elements/
composition
elements/packages/elements/src/gui/
editor-gui
elements/packages/react/src/gui/
editor-gui
elements/packages/react/src/hooks/
composition

Exclusion patterns (skip these files entirely)

排除规则(完全跳过这些文件)

  • *.browsertest.ts
    ,
    *.test.ts
  • Any path under
    src/preview/
    ,
    src/transcoding/
    ,
    src/canvas/
    ,
    src/profiling/
  • Commit subjects matching
    ^Bump version
  • Lock files, snapshot files, formatter-only commits (subject starts with
    style:
    or
    format:
    )
  • *.browsertest.ts
    ,
    *.test.ts
  • src/preview/
    src/transcoding/
    src/canvas/
    src/profiling/
    下的所有路径
  • 提交主题匹配
    ^Bump version
    的提交
  • 锁文件、快照文件、仅格式化代码的提交(主题以
    style:
    format:
    开头)

Step 4: Read the diffs

步骤4:读取差异内容

For each matched file in a relevant commit:
bash
git show <hash> -- <file>
Look specifically for:
  • New
    @property
    or
    @attribute
    decorators added to elements
  • Removed properties/attributes
  • Changed default values
  • New exported functions, hooks, or types
  • Changed function signatures or event detail shapes
  • New or removed API endpoint paths in the vite plugin
  • New fields on API payload types (
    z.object(...)
    in resources files)
对于每个相关提交中的匹配文件:
bash
git show <hash> -- <file>
重点关注:
  • 元素新增的
    @property
    @attribute
    装饰器
  • 已移除的属性/特性
  • 已更改的默认值
  • 新增的导出函数、钩子或类型
  • 已更改的函数签名或事件详情结构
  • vite插件中新增或移除的API端点路径
  • API负载类型中新增的字段(资源文件中的
    z.object(...)

Step 5: Read the corresponding skill doc

步骤5:读取对应的技能文档

Match the changed file to a skill using the table above, then find the relevant reference file in
skills/skills/<skill>/references/
. Read it with the Read tool.
使用上述表格将变更文件与技能匹配,然后在
skills/skills/<skill>/references/
中找到相关的参考文件,使用Read工具读取。

Step 6: Identify discrepancies

步骤6:识别不一致之处

For each matched commit + skill doc pair, identify:
  1. Facts in the doc that are now wrong (stale endpoint paths, removed attributes, changed event shapes)
  2. New API surface not documented (new attributes, new fields, new hooks)
  3. Behavior changes that contradict existing doc prose
Present a numbered list of specific changes before implementing if there are more than 3 items. For 1-3 items, implement immediately.
对于每个匹配的提交+技能文档对,识别:
  1. 文档中已失效的信息(过时的端点路径、已移除的属性、已更改的事件结构)
  2. 未记录的新API内容(新增属性、新增字段、新增钩子)
  3. 与现有文档描述矛盾的行为变更
如果不一致项超过3个,请在执行更新前列出具体变更的编号列表。若为1-3项,则立即执行更新。

Step 7: Implement updates

步骤7:执行更新

Edit the skill doc files directly. Keep changes minimal and factual — update the specific attribute, endpoint, type, or behavior description. Do not restructure docs.
直接编辑技能文档文件。保持变更最小且符合事实——仅更新特定属性、端点、类型或行为描述。不要重构文档结构。

Step 8: Advance the tag

步骤8:更新标签

After all updates are complete:
bash
git tag -f -a skills-sync HEAD -m "skills synced $(date -I)"
git push skills skills-sync
Then sync internal skills to agent directories and push skills docs:
bash
npm run skills:sync
./scripts/push-skills
Then commit:
bash
git add .skills/ skills/skills/ .claude/skills/ .cursor/skills/ .opencode/skills/
git commit -m "sync skills docs to HEAD"
完成所有更新后:
bash
git tag -f -a skills-sync HEAD -m "skills synced $(date -I)"
git push skills skills-sync
然后将内部技能同步到agent目录并推送技能文档:
bash
npm run skills:sync
./scripts/push-skills
接着提交:
bash
git add .skills/ skills/skills/ .claude/skills/ .cursor/skills/ .opencode/skills/
git commit -m "sync skills docs to HEAD"

Bootstrap note

引导说明

The
skills-sync
tag lives in the monorepo and is pushed to the
skills
remote. The monorepo has no
origin
remote — use
git push skills skills-sync
not
git push origin skills-sync
.
skills-sync
标签位于单体仓库中,并推送到
skills
远程仓库。该单体仓库没有
origin
远程仓库——请使用
git push skills skills-sync
而非
git push origin skills-sync