skill-installer
💡 摘要
该技能用于从官方精选列表或任意 GitHub 仓库安装其他 AI 代理技能到本地技能目录。
🎯 适合人群
🤖 AI 吐槽: “这是一个不能更新或删除软件包的包管理器,堪称数字版的囤积者壁橱。”
该技能会根据用户提供的 GitHub 路径执行网络调用、下载和文件系统写入,引入了依赖混淆、从不受信任仓库执行恶意代码以及通过令牌环境变量泄露密钥的风险。缓解措施:为精选技能在安装前实施校验和验证或签名检查。
name: skill-installer description: Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos). metadata: short-description: Install curated skills from openai/skills or other repos
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. Experimental skills live in https://github.com/openai/skills/tree/main/skills/.experimental and can be installed the same way.
Use the helper scripts based on the task:
- List skills when the user asks what is available, or if the user uses this skill without specifying what to do. Default listing is
.curated, but you can pass--path skills/.experimentalwhen they ask about experimental skills. - 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.
Communication
When listing skills, output approximately as follows, depending on the context of the user's request. If they ask about experimental skills, list from .experimental instead of .curated and label the source accordingly:
"""
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."
Scripts
All of these scripts use network, so when running in the sandbox, request escalation when running them.
scripts/list-skills.py(prints skills list with installed annotations)scripts/list-skills.py --format json- Example (experimental list):
scripts/list-skills.py --path skills/.experimental 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>- Example (experimental skill):
scripts/install-skill-from-github.py --repo openai/skills --path skills/.experimental/<skill-name>
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
--pathvalues install multiple skills in one run, each named from the path basename unless--nameis supplied. - Options:
--ref <ref>(defaultmain),--dest <path>,--method auto|download|git.
Notes
- Curated listing is fetched from
https://github.com/openai/skills/tree/main/skills/.curatedvia 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_TOKENfor 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.
优点
- 简化了技能的发现和安装过程。
- 支持通过身份验证安装私有仓库。
- 可以单条命令安装多个技能。
缺点
- 缺乏更新或卸载等基本包管理功能。
- 严重依赖外部网络和 GitHub 的可用性。
- 手动命名技能可能导致命名空间冲突。
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 openai.
