install-from-remote-library

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Install From Remote Library

从远程库安装

Goal

目标

Install from a shared library repo without guessing, over-installing, or skipping the preview step.
在不猜测、不超额安装、不跳过预览步骤的前提下,从共享库仓库完成安装。

Invariants

不变原则

  • Always inspect the remote library first with
    install <source> --list
    .
  • Prefer
    --collection
    when the library clearly exposes a starter pack or focused bundle.
  • Always run
    --dry-run
    before the real install.
  • Keep the install small. Do not pull a whole library when the user only needs a narrow slice.
  • 始终先通过
    install <source> --list
    命令查看远程库内容。
  • 当库明确提供入门包或聚焦的功能包时,优先使用
    --collection
    参数。
  • 正式安装前务必执行
    --dry-run
    预览。
  • 保持安装体量最小,当用户仅需要小部分功能时不要拉取整个库的内容。

Workflow

工作流程

  1. Inspect the source library.
bash
npx ai-agent-skills install <owner>/<repo> --list
  1. Choose the smallest fitting target.
  • Prefer
    --collection starter-pack
    or another named collection when it matches the user's need.
  • Use
    --skill <name>
    only when the user needs one specific skill or the library has no useful collection.
  • Do not combine
    --collection
    and
    --skill
    .
  1. Preview the install plan before mutating anything.
bash
npx ai-agent-skills install <owner>/<repo> --collection starter-pack --dry-run -p
or
bash
npx ai-agent-skills install <owner>/<repo> --skill <skill-name> --dry-run -p
  1. If the plan looks right, run the real install with the same scope.
bash
npx ai-agent-skills install <owner>/<repo> --collection starter-pack -p
  1. 查看源库内容。
bash
npx ai-agent-skills install <owner>/<repo> --list
  1. 选择最适配的最小安装目标。
  • --collection starter-pack
    或其他命名集合匹配用户需求时优先选择。
  • 仅当用户需要单个特定技能,或库没有可用集合时,才使用
    --skill <name>
    参数。
  • 不要同时使用
    --collection
    --skill
    参数。
  1. 在改动任何内容前预览安装计划。
bash
npx ai-agent-skills install <owner>/<repo> --collection starter-pack --dry-run -p
bash
npx ai-agent-skills install <owner>/<repo> --skill <skill-name> --dry-run -p
  1. 如果预览计划符合预期,使用相同参数范围执行正式安装。
bash
npx ai-agent-skills install <owner>/<repo> --collection starter-pack -p

Decision Rules

决策规则

  • If the library has a curated collection that already matches the user's stack, use it.
  • If the remote library is empty or the list output is unclear, stop and report that instead of guessing.
  • If the install path throws an
    ERROR
    /
    HINT
    , surface that verbatim and follow the hint before retrying.
  • If the user is exploring a large library, keep them in browse mode first rather than installing immediately.
  • 如果库有和用户技术栈匹配的精选集合,直接使用。
  • 如果远程库为空,或列表输出不清晰,停止操作并上报问题,不要猜测。
  • 如果安装路径抛出
    ERROR
    /
    HINT
    ,原样展示提示内容,遵循提示操作后再重试。
  • 如果用户正在探索大型库,先让用户停留在浏览模式,不要立刻执行安装。

Done

完成后返回

Return:
  • what source library you inspected
  • which collection or skill you chose
  • the dry-run result
  • the exact final install command you used
返回以下内容:
  • 你查看的源库信息
  • 你选择的集合或技能名称
  • 试运行的结果
  • 你使用的最终安装命令的精确内容