skill-installer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Installer

技能安装工具

Helps install skills. By default these are from https://github.com/openai/skills/tree/main/skills/.curated, but users can also provide other locations.
Use the helper scripts based on the task:
  • List curated skills when the user asks what is available, or if the user uses this skill without specifying what to do.
  • Install from the curated list when the user provides a skill name.
  • Install from another repo when the user provides a GitHub repo/path (including private repos).
Install skills with the helper scripts.
根据任务使用对应的助手脚本:
  • 当用户询问有哪些可用技能,或者用户未指定操作就使用此技能时,列出精选技能。
  • 当用户提供技能名称时,从精选列表中安装。
  • 当用户提供GitHub仓库/路径(包括私有仓库)时,从该仓库安装技能。
使用助手脚本安装技能。

Communication

沟通规范

When listing curated skills, output approximately as follows, depending on the context of the user's request: """ Skills from {repo}:
  1. skill-1
  2. skill-2 (already installed)
  3. ... Which ones would you like installed? """
After installing a skill, tell the user: "Restart Codex to pick up new skills."
列出精选技能时,根据用户请求的上下文,大致按以下格式输出: """ 来自{repo}的技能:
  1. skill-1
  2. skill-2(已安装)
  3. ... 您想要安装哪些技能? """
安装技能后,告知用户:“重启Codex以加载新技能。”

Scripts

脚本说明

All of these scripts use network, so when running in the sandbox, request escalation when running them.
  • scripts/list-curated-skills.py
    (prints curated list with installed annotations)
  • scripts/list-curated-skills.py --format json
  • scripts/install-skill-from-github.py --repo <owner>/<repo> --path <path/to/skill> [<path/to/skill> ...]
  • scripts/install-skill-from-github.py --url https://github.com/<owner>/<repo>/tree/<ref>/<path>
所有这些脚本都需要联网,因此在沙箱环境中运行时,需要请求权限提升。
  • scripts/list-curated-skills.py
    (打印带有已安装标记的精选列表)
  • scripts/list-curated-skills.py --format json
  • scripts/install-skill-from-github.py --repo <owner>/<repo> --path <path/to/skill> [<path/to/skill> ...]
  • scripts/install-skill-from-github.py --url https://github.com/<owner>/<repo>/tree/<ref>/<path>

Behavior and Options

行为与选项

  • Defaults to direct download for public GitHub repos.
  • If download fails with auth/permission errors, falls back to git sparse checkout.
  • Aborts if the destination skill directory already exists.
  • Installs into
    $CODEX_HOME/skills/<skill-name>
    (defaults to
    ~/.codex/skills
    ).
  • Multiple
    --path
    values install multiple skills in one run, each named from the path basename unless
    --name
    is supplied.
  • Options:
    --ref <ref>
    (default
    main
    ),
    --dest <path>
    ,
    --method auto|download|git
    .
  • 对于公开GitHub仓库,默认使用直接下载方式。
  • 如果下载因权限/认证错误失败,则回退到git稀疏检出方式。
  • 如果目标技能目录已存在,则终止操作。
  • 安装到
    $CODEX_HOME/skills/<skill-name>
    目录(默认路径为
    ~/.codex/skills
    )。
  • 多个
    --path
    参数可在一次运行中安装多个技能,每个技能默认以路径的基名称命名,除非指定了
    --name
    参数。
  • 选项:
    --ref <ref>
    (默认值为
    main
    ),
    --dest <path>
    --method auto|download|git

Notes

注意事项

  • Curated listing is fetched from
    https://github.com/openai/skills/tree/main/skills/.curated
    via the GitHub API. If it is unavailable, explain the error and exit.
  • Private GitHub repos can be accessed via existing git credentials or optional
    GITHUB_TOKEN
    /
    GH_TOKEN
    for download.
  • Git fallback tries HTTPS first, then SSH.
  • The skills at https://github.com/openai/skills/tree/main/skills/.system are preinstalled, so no need to help users install those. If they ask, just explain this. If they insist, you can download and overwrite.
  • Installed annotations come from
    $CODEX_HOME/skills
    .