skill-installer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill 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}:
- skill-1
- skill-2 (already installed)
- ... Which ones would you like installed? """
After installing a skill, tell the user: "Restart Codex to pick up new skills."
列出精选技能时,根据用户请求的上下文,大致按以下格式输出:
"""
来自{repo}的技能:
- skill-1
- skill-2(已安装)
- ... 您想要安装哪些技能? """
安装技能后,告知用户:“重启Codex以加载新技能。”
Scripts
脚本说明
All of these scripts use network, so when running in the sandbox, request escalation when running them.
- (prints curated list with installed annotations)
scripts/list-curated-skills.py scripts/list-curated-skills.py --format jsonscripts/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 jsonscripts/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 (defaults to
$CODEX_HOME/skills/<skill-name>).~/.codex/skills - Multiple values install multiple skills in one run, each named from the path basename unless
--pathis supplied.--name - Options: (default
--ref <ref>),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 via the GitHub API. If it is unavailable, explain the error and exit.
https://github.com/openai/skills/tree/main/skills/.curated - Private GitHub repos can be accessed via existing git credentials or optional /
GITHUB_TOKENfor download.GH_TOKEN - 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
- 精选列表通过GitHub API从获取。如果无法访问,需说明错误并退出。
https://github.com/openai/skills/tree/main/skills/.curated - 私有GitHub仓库可通过现有git凭证或可选的/
GITHUB_TOKEN进行下载访问。GH_TOKEN - Git回退方式首先尝试HTTPS,然后是SSH。
- https://github.com/openai/skills/tree/main/skills/.system路径下的技能是预安装的,无需帮助用户安装这些技能。如果用户询问,只需说明这一点。如果用户坚持,可以下载并覆盖。
- 已安装标记来自目录。
$CODEX_HOME/skills