vercel-labs / skills
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
vercel-labs / skills
skills The CLI for the open agent skills ecosystem. Supports OpenCode, Claude Code, Codex, Cursor, and 75 more. skills 是开放代理技能生态系统的命令行工具(CLI)。支持 OpenCode、Claude Code、Codex、Cursor 以及其他 75 种以上工具。
Install a Skill npx skills add vercel-labs/agent-skills 安装技能 npx skills add vercel-labs/agent-skills
Use a Skill Without Installing Generate a prompt for one skill, or start a supported coding agent interactively: npx skills use vercel-labs/agent-skills@web-design-guidelines | claude npx skills use vercel-labs/agent-skills —skill web-design-guidelines —agent claude-code 无需安装即可使用技能 为某项技能生成提示词,或以交互方式启动受支持的编码代理: npx skills use vercel-labs/agent-skills@web-design-guidelines | claude npx skills use vercel-labs/agent-skills —skill web-design-guidelines —agent claude-code
skills use resolves sources the same way as skills add, writes the selected skill files to a temporary directory, and prints only the generated prompt to stdout unless —agent is provided. With —agent, it starts one supported agent interactively with the generated prompt. skills use 解析源的方式与 skills add 相同,它会将选定的技能文件写入临时目录,并仅将生成的提示词打印到标准输出(stdout),除非提供了 —agent 参数。使用 —agent 时,它会以生成的提示词交互式地启动一个受支持的代理。
Source Formats
GitHub shorthand (owner/repo)
npx skills add vercel-labs/agent-skills
Full GitHub URL
npx skills add https://github.com/vercel-labs/agent-skills
Direct path to a skill in a repo
npx skills add https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines
GitLab URL
npx skills add https://gitlab.com/org/repo
Azure Repos (Azure DevOps Services or Server)
npx skills add https://dev.azure.com/org/project/_git/repo npx skills add https://dev.azure.com/org/project/_git/repo?path=/skills/web-design&version=GBmain
Any git URL
npx skills add git@github.com:vercel-labs/agent-skills.git
Local path
npx skills add ./my-local-skills 源格式
GitHub 简写 (所有者/仓库)
npx skills add vercel-labs/agent-skills
完整的 GitHub URL
npx skills add https://github.com/vercel-labs/agent-skills
仓库中技能的直接路径
npx skills add https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines
GitLab URL
npx skills add https://gitlab.com/org/repo
Azure Repos (Azure DevOps Services 或 Server)
npx skills add https://dev.azure.com/org/project/_git/repo npx skills add https://dev.azure.com/org/project/_git/repo?path=/skills/web-design&version=GBmain
任意 git URL
npx skills add git@github.com:vercel-labs/agent-skills.git
本地路径
npx skills add ./my-local-skills
Private Repositories Use the same command for public and private repositories. The CLI uses the authentication already configured for the repository URL:
GitHub shorthand or HTTPS (Git credential helper, GitHub CLI, then SSH fallback)
npx skills add acme/private-skills
SSH on GitHub, GitLab, or another Git host
npx skills add git@github.com:acme/private-skills.git npx skills add ssh://git@git.example.com/acme/private-skills.git
HTTPS on any Git host (uses your configured Git credential helper)
npx skills add https://git.example.com/acme/private-skills.git npx skills add https://dev.azure.com/org/project/_git/private-skills 私有仓库 公共仓库和私有仓库使用相同的命令。CLI 会使用已为仓库 URL 配置的身份验证:
GitHub 简写或 HTTPS (Git 凭据助手、GitHub CLI,然后是 SSH 回退)
npx skills add acme/private-skills
GitHub、GitLab 或其他 Git 主机上的 SSH
npx skills add git@github.com:acme/private-skills.git npx skills add ssh://git@git.example.com/acme/private-skills.git
任意 Git 主机上的 HTTPS (使用您配置的 Git 凭据助手)
npx skills add https://git.example.com/acme/private-skills.git npx skills add https://dev.azure.com/org/project/_git/private-skills
For GitHub HTTPS and shorthand sources, skills first uses normal Git credentials. If that fails and GitHub CLI is authenticated, it tries gh repo clone, followed by SSH. It does not execute gh auth token or copy the stored GitHub CLI credential into the Node.js process. 对于 GitHub HTTPS 和简写源,skills 首先使用常规 Git 凭据。如果失败且 GitHub CLI 已通过身份验证,它会尝试 gh repo clone,然后是 SSH。它不会执行 gh auth token,也不会将存储的 GitHub CLI 凭据复制到 Node.js 进程中。
For GitHub tree lookups, skills first tries the API anonymously, then an explicitly supplied environment token, then gh api. GitHub CLI applies its own stored authentication and returns only the API response; the credential is never printed to or read by skills. If API access still fails, update checks fall back to an authenticated Git clone. 对于 GitHub 树查找,skills 首先尝试匿名访问 API,然后是显式提供的环境变量令牌,最后是 gh api。GitHub CLI 应用其自身存储的身份验证并仅返回 API 响应;凭据永远不会被打印或被 skills 读取。如果 API 访问仍然失败,更新检查将回退到经过身份验证的 Git 克隆。
GITHUB_TOKEN or GH_TOKEN can be set explicitly for GitHub API access, including private repository downloads and update checks. They are optional for installs when Git, GitHub CLI, or SSH authentication is already configured. 可以显式设置 GITHUB_TOKEN 或 GH_TOKEN 以用于 GitHub API 访问,包括私有仓库下载和更新检查。当已配置 Git、GitHub CLI 或 SSH 身份验证时,这些令牌对于安装是可选的。
Options Option Description -g, —global Install to user directory instead of project -a, —agent <agents…> Target specific agents (e.g., claude-code, codex). See Supported Agents -s, —skill <skills…> Install specific skills by name (use '' for all skills) -l, —list List available skills without installing —copy Copy files instead of symlinking to agent directories -y, —yes Skip all confirmation prompts —all Install all skills to all agents without prompts 选项 选项 描述 -g, —global 安装到用户目录而非项目目录 -a, —agent <agents…> 指定目标代理(例如 claude-code, codex)。参见“受支持的代理” -s, —skill <skills…> 按名称安装特定技能(使用 '' 表示所有技能) -l, —list 列出可用技能而不进行安装 —copy 复制文件而非创建指向代理目录的符号链接 -y, —yes 跳过所有确认提示 —all 将所有技能安装到所有代理,无需提示
Examples
List skills in a repository
npx skills add vercel-labs/agent-skills —list
Install specific skills
npx skills add vercel-labs/agent-skills —skill frontend-design —skill skill-creator
Install a skill with spaces in the name (must be quoted)
npx skills add owner/repo —skill “Convex Best Practices”
Install to specific agents
npx skills add vercel-labs/agent-skills -a claude-code -a opencode
Non-interactive installation (CI/CD friendly)
npx skills add vercel-labs/agent-skills —skill frontend-design -g -a claude-code -y
Install all skills from a repo to all agents
npx skills add vercel-labs/agent-skills —all
Install all skills to specific agents
npx skills add vercel-labs/agent-skills —skill ’*’ -a claude-code
Install specific skills to all agents
npx skills add vercel-labs/agent-skills —agent ’*’ —skill frontend-design
Install from a direct SKILL.md or archive download URL
npx skills add https://example.com/download/my-skill 示例
列出仓库中的技能
npx skills add vercel-labs/agent-skills —list
安装特定技能
npx skills add vercel-labs/agent-skills —skill frontend-design —skill skill-creator
安装名称中带有空格的技能(必须加引号)
npx skills add owner/repo —skill “Convex Best Practices”
安装到特定代理
npx skills add vercel-labs/agent-skills -a claude-code -a opencode
非交互式安装(对 CI/CD 友好)
npx skills add vercel-labs/agent-skills —skill frontend-design -g -a claude-code -y
将仓库中的所有技能安装到所有代理
npx skills add vercel-labs/agent-skills —all
将所有技能安装到特定代理
npx skills add vercel-labs/agent-skills —skill ’*’ -a claude-code
将特定技能安装到所有代理
npx skills add vercel-labs/agent-skills —agent ’*’ —skill frontend-design
从直接的 SKILL.md 或归档下载 URL 安装
npx skills add https://example.com/download/my-skill
Direct download URLs are tried after well-known discovery. They may point to a single valid SKILL.md file or a .zip, .tar, .tar.gz, or .tgz archive; the URL does not need to include a file extension. Downloads are limited to 10 MiB, extracted content to 25 MiB, and archives to 1000 files by default. Override with SKILLS_DOWNLOAD_MAX_BYTES, SKILLS_EXTRACT_MAX_BYTES, and SKILLS_EXTRACT_MAX_FILES when you trust the source. 直接下载 URL 会在已知发现机制之后尝试。它们可以指向单个有效的 SKILL.md 文件或 .zip、.tar、.tar.gz 或 .tgz 归档文件;URL 不需要包含文件扩展名。默认情况下,下载限制为 10 MiB,解压内容限制为 25 MiB,归档文件限制为 1000 个文件。当您信任源时,可以使用 SKILLS_DOWNLOAD_MAX_BYTES、SKILLS_EXTRACT_MAX_BYTES 和 SKILLS_EXTRACT_MAX_FILES 进行覆盖。
Installation Scope
Scope Flag Location Use Case
Project (default) ./
Installation Methods When installing interactively, you can choose: Method Description Symlink (Recommended) Creates symlinks from each agent to a canonical copy. Single source of truth, easy updates. Copy Creates independent copies for each agent. Use when symlinks aren’t supported. 安装方法 交互式安装时,您可以选择: 方法 描述 符号链接(推荐) 从每个代理创建指向规范副本的符号链接。单一事实来源,易于更新。 复制 为每个代理创建独立副本。在不支持符号链接时使用。
Other Commands
Command Description
npx skills use
skills list List all installed skills. Similar to npm ls.
List project installed skills
npx skills list
List only global skills
npx skills ls -g
Filter by specific agents
npx skills ls -a claude-code -a cursor skills list 列出所有已安装的技能。类似于 npm ls。
列出项目已安装的技能
npx skills list
仅列出全局技能
npx skills ls -g
按特定代理过滤
npx skills ls -a claude-code -a cursor
skills find Search for skills interactively or by keyword.
Interactive search (fzf-style)
npx skills find
Search by keyword
npx skills find typescript
Search across every
skills find 以交互方式或按关键字搜索技能。
交互式搜索 (fzf 风格)
npx skills find
按关键字搜索
npx skills find typescript