npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aithe/skills-cli

v1.0.0

Published

AI Agent 技能管理工具 - 创建、上传、安装和分发技能,基于 Git 仓库存储分发技能(支持研发云)

Readme

@aithe/skills-cli

AI Agent 技能管理工具 - 创建、上传、安装和分发技能,基于 Git 仓库存储分发技能(支持研发云)。


一、快速开始

1.1 安装验证

# 方式一:npm 安装(推荐)
npm install -g @aithe/skills-cli

# 方式二:指定版本安装
npm install -g @aithe/[email protected]

# 验证安装是否成功。如果报找不到 sk 命令,尝试下常见问题1的方案
sk --version

# 帮助命令
sk --help          # 查看主命令帮助
sk -h              # 同上(短参数)
sk install --help  # 查看 install 命令帮助
sk install -h      # 同上

1.2 常用指令组合

完整开发流程:

# 1. 开发技能
sk init my-skill          # 初始化技能
# 编辑 .skills/my-skill/SKILL.md
sk validate               # 验证技能格式

# 2. 在 my-skill 目录下发布技能到远程仓库
sk publish [email protected]:your-name/your-skills-repo.git

# 3. 其他人添加市场并安装
sk market add [email protected]:your-name/your-skills-repo.git  # 添加市场
sk search my-skill        # 搜索技能
sk install my-skill       # 安装技能

# 4. 升级技能
sk update                 # 更新所有技能
sk update my-skill        # 更新指定技能

指定目录示例:

# 发布指定目录下的技能
sk publish [email protected]:user/repo.git --dir ./my-skills

# 安装仓库中所有技能到指定目录
sk install [email protected]:user/repo.git --target ~/my-skills

# 从市场安装指定技能到指定目录
sk install skill-name --target ~/my-skills

# 安装指定仓库的指定技能到指定目录
sk install [email protected]:user/repo.git --skill skill-name --target ./custom-dir

二、指令总结

| 分类 | 命令 | 说明 | |------|------|------| | 开发 | sk init <name> | 初始化新技能 | | | sk validate [path] | 验证技能格式 | | 发布 | sk publish <repo-url> | 发布技能到远程仓库 | | | sk publish <repo-url> --dir <dir> | 发布指定目录的技能 | | | sk publish <repo-url> --dir <dir> --name <name> | 组合发布多个 skill | | 安装 | sk install <skill\|repo> | 安装技能 | | | sk update [skill-name] | 更新技能 | | | sk uninstall <skill-name> | 卸载技能 | | | sk list | 列出已安装的技能 | | 锁定 | sk pin <skill-name> [version] | 锁定技能版本 | | 市场 | sk market add <source> | 添加市场 | | | sk market list | 列出市场 | | | sk market enable <name> | 启用市场 | | | sk market disable <name> | 禁用市场 | | | sk market remove <name> | 移除市场 | | 搜索 | sk search [query] | 搜索技能 | | 配置 | sk config list | 查看配置 | | | sk config get <key> | 获取配置值 | | | sk config set <key> <value> | 设置配置值 | | | sk config reset | 重置配置 | | 诊断 | sk doctor | 诊断系统状态 |


三、指令详解

3.1 技能开发

3.1.1 sk init <name>

在当前目录初始化一个新技能。

# 在当前目录创建技能
sk init code-reviewer

# 在指定目录创建技能
sk init code-reviewer --dir /path/to/dir

3.1.2 sk validate [path]

验证技能格式是否正确。

# 验证本地技能
sk validate ./my-skill

# 验证远程仓库中的技能
sk validate https://github.com/user/repo.git --skill skill-name

3.2 技能发布

3.2.1 sk publish <repo-url>

发布技能到远程仓库,自动更新 marketplace.json。

# 在当前目录推送
sk publish [email protected]:user/my-skills.git

# 指定自定义目录
sk publish [email protected]:user/my-skills.git --dir ./my-skills

# 组合发布:将目录下多个 skill 打包为一个 plugin
# 目录结构: ./test-combo/test1/SKILL.md, ./test-combo/test2/SKILL.md
sk publish [email protected]:user/my-skills.git --dir ./test-combo --name test-combo
# 生成: { "name": "test-combo", "skills": ["test-combo/test1", "test-combo/test2"] }

# 指定技能来源仓库(仅记录,不实际使用)
sk publish [email protected]:user/my-skills.git --source https://github.com/user/other-repo.git

# 指定远程仓库中 marketplace.json 所在目录
sk publish [email protected]:user/my-skills.git --marketplace-dir .claude-plugin

3.3 技能安装

3.3.1 sk install [<skill-name>|<repo-url>]

从远程仓库或已配置的市场安装技能。

# 从已配置的市场安装技能(自动搜索所有市场)
sk install helloworld

# 使用 skill@marketplace 格式从指定市场安装
sk install document-skills@anthropic-agent-skills

# 从远程仓库安装所有技能
sk install [email protected]:user/skills-repo.git

# 从远程仓库安装指定技能
sk install [email protected]:user/skills-repo.git --skill my-skill

# 安装特定版本
sk install [email protected]:user/skills-repo.git --version v1.0.0

# 安装到指定目录
sk install [email protected]:user/skills-repo.git --target ~/my-skills

参数说明:

  • 第一个参数可以是技能名称、skill@marketplace 格式或仓库地址
  • 如果参数包含 :// 或以 git@ 开头,则视为仓库地址
  • 如果包含 @(如 skill@marketplace),从指定市场安装
  • 否则视为技能名称,从所有已配置的 marketplaces 中搜索安装
  • 支持的 marketplace 格式:.skills-market/, .claude-plugin/, 根目录
  • 支持的 source 格式:字符串("./")、对象({url/ref})、Anthropic({github:{repo/ref}})

3.3.2 sk update [skill-name]

检查并更新已安装的技能到最新版本。如果没有可用更新,则跳过该技能。

# 更新所有技能(有更新才更新,没更新跳过)
sk update

# 更新指定技能
sk update my-skill

# 强制更新(忽略锁定)
sk update --force

3.3.3 sk uninstall <skill-name>

卸载技能。

sk uninstall my-skill

3.3.4 sk list

列出已安装的技能。

sk list

3.4 技能管理

3.4.1 sk pin <skill-name> [version]

锁定技能版本。

# 锁定到当前版本
sk pin my-skill

# 锁定到指定版本
sk pin my-skill v1.0.0

# 解除锁定
sk pin my-skill --unpin

3.5 市场管理

3.5.1 sk market add <source>

添加技能市场。支持两种 marketplace 目录格式:

  • .skills-market/marketplace.json (sk 格式)
  • .claude-plugin/marketplace.json (Anthropic Claude 格式)
# 添加自定义市场
sk market add [email protected]:user/marketplace.git

# 添加 Anthropic 官方技能市场
sk market add https://github.com/anthropics/skills

3.5.2 sk market list

列出已添加的市场。

sk market list

3.5.3 sk market enable <name>

启用市场。

sk market enable marketplace-name

3.5.4 sk market disable <name>

禁用市场。禁用后搜索和安装将跳过该市场。

sk market disable marketplace-name

3.5.5 sk market remove <name>

移除市场。

sk market remove marketplace-name

3.6 搜索

3.6.1 sk search [query]

在市场中搜索技能。

# 搜索技能
sk search "代码生成"

# 按标签搜索
sk search --tag 开发

# 在指定市场搜索
sk search --marketplace my-market skill-name

3.7 配置管理

3.7.1 sk config list

查看所有配置。

sk config list

3.7.2 sk config get <key>

获取配置值。

sk config get skills.downloadSkillDir
sk config get network.timeout

3.7.3 sk config set <key> <value>

设置配置值。

sk config set skills.downloadSkillDir "/path/to/skills"
sk config set network.timeout 60
sk config set autoUpdate.enabled false

3.7.4 sk config reset

重置为默认配置。

sk config reset

3.8 诊断

3.8.1 sk doctor

诊断技能系统状态。

sk doctor

四、常见问题

Q1: 安装后找不到 sk 命令?

如果安装后找不到 sk 命令,可能需要将 npm 全局 bin 目录添加到 PATH:

Windows (PowerShell)

# 查看 npm 全局路径
npm config get prefix

# 假设输出 C:\Users\你的用户名\AppData\Roaming\npm
# 将以下路径添加到 PATH:
# C:\Users\你的用户名\AppData\Roaming\npm

# 临时生效(当前终端有效)
$env:PATH = "$env:PATH;C:\Users\你的用户名\AppData\Roaming\npm"

# 永久生效(系统属性 -> 高级 -> 环境变量 -> 用户变量 -> Path)

Windows (CMD / Git Bash)

REM 查看 npm 全局路径
npm config get prefix

REM 添加到 PATH(假设输出 C:\Users\xxx\AppData\Roaming\npm)
setx PATH "%PATH%;C:\Users\你的用户名\AppData\Roaming\npm"

macOS / Linux (bash)

# 查看 npm 全局路径
npm config get prefix

# 添加到 PATH
echo 'export PATH="$PATH:$(npm config get prefix)/bin"' >> ~/.bashrc
source ~/.bashrc

# 或 zsh
echo 'export PATH="$PATH:$(npm config get prefix)/bin"' >> ~/.zshrc
source ~/.zshrc

Q2: 如何修改技能安装默认目录?

sk config set skills.downloadSkillDir "~/my-custom-path"

Q3: 如何使用内部 Git 仓库?

sk install [email protected]:user/repo.git

Q4: 如何查看已安装的技能?

sk list

Q5: 如何更新所有技能?

sk update