skills

命令行工具

vercel-labs/skills

用于发现、安装和管理 AI 编程代理技能的命令行工具。

项目简介

开放代理技能生态的命令行工具,支持 Claude Code、Codex、Cursor、OpenCode 等众多 AI 代理。可从 GitHub、GitLab、Git 地址、本地路径或直接下载链接安装技能,支持软链接或复制方式,并提供搜索、更新、移除、列表及创建技能模板等命令。

README 预览

# skills\n\nThe CLI for the open agent skills ecosystem.\n\n\nSupports **OpenCode**, **Claude Code**, **Codex**, **Cursor**, and [75 more](#supported-agents).\n\n\n[](https://skills.sh/vercel-labs/skills)\n\n## Install a Skill\n\n```bash\nnpx skills add vercel-labs/agent-skills\n```\n\n## Use a Skill Without Installing\n\nGenerate a prompt for one skill, or start a supported coding agent interactively:\n\n```bash\nnpx skills use vercel-labs/agent-skills@web-design-guidelines | claude\nnpx skills use vercel-labs/agent-skills --skill web-design-guidelines --agent claude-code\n```\n\n`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.\n\n### Source Formats\n\n```bash\n# GitHub shorthand (owner/repo)\nnpx skills add vercel-labs/agent-skills\n\n# Full GitHub URL\nnpx skills add https://github.com/vercel-labs/agent-skills\n\n# Direct path to a skill in a repo\nnpx skills add https://github.com/vercel-labs/agent-skills/tree/main/skills/web-design-guidelines\n\n# GitLab URL\nnpx skills add https://gitlab.com/org/repo\n\n# Any git URL\nnpx skills add git@github.com:vercel-labs/agent-skills.git\n\n# Local path\nnpx skills add ./my-local-skills\n```\n\n### Private Repositories\n\nUse the same command for public and private repositories. The CLI uses the authentication already configured for the repository URL:\n\n```bash\n# GitHub shorthand or HTTPS (Git credential helper, GitHub CLI, then SSH fallback)\nnpx skills add acme/private-skills\n\n# SSH on GitHub, GitLab, or another Git host\nnpx skills add git@github.com:acme/private-skills.git\nnpx skills add ssh://git@git.example.com/acme/private-skills.git\n\n# HTTPS on any Git host (uses your configured Git credential helper)\nnpx skills add https://git.example.com/acme/private-skills.git\n```\n\nFor G

常见问题 (2)

故障排除
如何修复 'skills update' 因 'Multiple current paths match' 警告而跳过技能的问题?

skills CLI 中的一个已知 bug(已在 1.5.26 至 1.7.0 版本中确认):在 resolveSkillLocations 中,歧义检查(candidates.length > 1)会先于验证 skills-lock.json 中存储的规范路径(lockSkills[name].skillPath)在上游是否仍然存在而执行。当仓库在多个目录中包含同一个 skill(例如同时存在 skills/<name>/SKILL.md 和 .openclaw/skills/<name>/SKILL.md),或通过已提交的符号链接暴露出重复项(例如 .claude/skills -> ../skills)时,就会触发该 bug。在修复(PR #2231)发布之前,可采用以下变通方法:1)为已安装的 CLI 打补丁 —— 在 dist/cli.mjs 中,先检查锁定的路径,仅当其在上游已不存在时才标记歧义:const normalizedLockedPath = normalizeSkillPath(lockedPath); if (discoveredPaths.has(normalizedLockedPath)) { resolvedPaths.set(name, normalizedLockedPath); continue; },然后再判断 candidates.length > 1(推入 ambiguousSkills),接着判断 candidates.length === 1(进行解析),否则视为已删除。2)在上游仓库中移除重复项:删除多余的镜像副本或已提交的符号链接,使每个 skill 恰好只解析到一个路径 —— 克隆后可用 find -L . -name SKILL.md 进行验证。3)如果两者都无法控制,则在带补丁的版本发布之前,暂时跳过更新该来源。

来源 Issue #2227
故障排除
为什么我更新了 SKILL.md 之后,skills.sh 的技能页面仍然显示旧内容?我该如何强制重新索引?

skills.sh 会缓存已索引的快照,并不会在每次安装时重新获取。观察到的行为:在已存储快照约两小时内进行的安装不会刷新该快照,但数天后进行的一次启用遥测的安装确实会触发从当前默认分支重新生成快照(页面和 https://skills.sh/api/download/<owner>/<repo>/<skill> 会在约 10 分钟内更新)。修复/变通方法:1)等待直至距离上次快照已明显超过约 2 小时的缓存窗口期。2)运行一次启用遥测的安装:npx skills@latest add <owner>/<repo> --skill=<skill-name>。3)在 api/download URL 和公开的技能页面验证更新后的快照。无需维护者采取任何操作,也无需手动请求重新索引。注意事项:/tele/audit 安全分析不会在重新生成快照时重新运行,因此审计页面可能仍显示旧快照的分析结果。

来源 Issue #2529