update-installed-skills

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Update Installed Skills

更新已安装的Skill

Goal

目标

Keep installed skills current without breaking the agent's workflow or silently overwriting local customizations.
保持已安装的Skill为最新版本,同时不破坏Agent的工作流,也不会静默覆盖本地自定义内容。

Guardrails

防护规则

  • Always use
    --dry-run
    before running a real update.
  • Check what is currently installed before updating:
    npx ai-agent-skills list --installed
    .
  • Never update all skills at once in production without reviewing the dry-run output.
  • Use
    --format json
    to capture structured update results for logging.
  • 执行实际更新前务必使用
    --dry-run
    参数。
  • 更新前检查当前已安装的内容:
    npx ai-agent-skills list --installed
  • 未查看试运行输出的情况下,切勿在生产环境一次性更新所有Skill。
  • 使用
    --format json
    参数捕获结构化的更新结果以便记录日志。

Workflow

工作流程

  1. List currently installed skills.
bash
npx ai-agent-skills list --installed --format json --fields name
  1. Check for available updates.
bash
npx ai-agent-skills check
  1. Dry-run the update.
bash
npx ai-agent-skills sync <skill-name> --dry-run
  1. Apply the update after reviewing.
bash
npx ai-agent-skills sync <skill-name>
  1. For bulk updates, review each skill's dry-run output.
bash
npx ai-agent-skills sync --all --dry-run
  1. 列出当前已安装的Skill。
bash
npx ai-agent-skills list --installed --format json --fields name
  1. 检查可用更新。
bash
npx ai-agent-skills check
  1. 试运行更新。
bash
npx ai-agent-skills sync <skill-name> --dry-run
  1. 核对无误后应用更新。
bash
npx ai-agent-skills sync <skill-name>
  1. 如需批量更新,请逐一查看每个Skill的试运行输出。
bash
npx ai-agent-skills sync --all --dry-run

Gotchas

注意事项

  • Skills installed from GitHub will attempt a fresh clone during sync. If the upstream repo is gone, the update will fail gracefully.
  • Manually edited SKILL.md files will be overwritten by sync. Back up customizations before syncing.
  • The
    check
    command makes network requests to verify upstream sources. It may be slow or fail if sources are unreachable.
  • 从GitHub安装的Skill在同步时会尝试全新克隆。如果上游仓库已不存在,更新会友好报错退出,不会造成其他影响。
  • 手动编辑过的SKILL.md文件会被同步操作覆盖,同步前请备份自定义内容。
  • check
    命令会发起网络请求验证上游源,如果源无法访问,命令可能运行缓慢或执行失败。