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

zenskill

v0.1.8

Published

ZenSkill CLI — install, search, and manage agent skills

Readme

ZenSkill CLI

zenskill 是一个命令行工具,用于从 ZenSkillHub 服务器安装、搜索和管理智能体技能(agent skills)。

安装

本地开发

cd cli
npm install
npm run build
node bin/zenskill.js --help

作为 npm 包发布

npm publish
npm install -g zenskill
# 或者
npx zenskill --help

快速开始

1. 配置服务器地址

# 设置 ZenSkillHub 服务器地址(默认:http://localhost:8000)
zenskill config set server http://your-zenskill-server.com

# 查看当前配置
zenskill config get

2. 搜索技能

# 搜索包含 "automation" 的技能
zenskill search automation

3. 安装技能

# 安装一个技能
zenskill install my-skill

# 指定安装目录
zenskill install my-skill --dir ./agent-skills

# 强制重新安装(如果已安装)
zenskill install my-skill --force

4. 查看已安装的技能

# 列出所有已安装的技能
zenskill list

5. 卸载技能

# 卸载一个技能(需要确认)
zenskill uninstall my-skill --force

命令参考

全局选项

--dir <dir>        # 技能安装目录(默认:./skills)
--server <url>     # ZenSkillHub 服务器 URL(默认:http://localhost:8000)
--registry <url>   # --server 的别名
--site <url>       # --server 的别名
--token <token>    # 认证令牌(用于私有技能)

命令

zenskill install <slug>

安装一个技能。

选项:

  • -f, --force - 强制重新安装(如果已安装)

示例:

zenskill install text-summarizer
zenskill install text-summarizer --dir ./my-skills
zenskill install text-summarizer --force

zenskill search <query>

搜索技能。

示例:

zenskill search text
zenskill search "data processing"

zenskill list

列出所有已安装的技能。

zenskill uninstall <slug>

卸载一个技能。

选项:

  • -f, --force - 跳过确认提示,直接删除

示例:

zenskill uninstall text-summarizer --force

zenskill config <subcommand> [key] [value]

管理配置。

子命令:

  • get [key] - 获取配置值

    zenskill config get              # 显示所有配置
    zenskill config get server       # 获取服务器 URL
    zenskill config get token        # 检查是否设置了令牌
  • set <key> <value> - 设置配置值

    zenskill config set server http://example.com
    zenskill config set token my-secret-token
  • clear <key> - 清除配置值

    zenskill config clear token      # 清除认证令牌
  • path - 显示配置文件路径

    zenskill config path
    # 输出:~/.config/zenskill/config.json

环境变量

你也可以使用环境变量来设置配置:

export CLAWHUB_SITE=http://your-server.com
export ZENSKILL_TOKEN=your-token
export ZENSKILL_DIR=./my-skills

zenskill list

优先级: 环境变量(CLAWHUB_SITE)> 配置文件 > 默认值

认证(私有技能)

公共技能可以直接下载,无需认证。对于私有技能,你需要设置认证令牌:

# 设置 session token(从 web 界面获得)
zenskill config set token your-session-token

# 然后安装私有技能
zenskill install private-skill

配置文件

配置文件存储在:~/.config/zenskill/config.json

文件格式:

{
  "server": "http://localhost:8000",
  "token": "your-session-token"
}

安全性: 配置文件权限为 0o600(仅所有者可读写),包含敏感信息如令牌。

技能元数据

安装技能后,会在技能目录中创建 .zenskill/origin.json 文件,记录安装信息:

{
  "version": 1,
  "registry": "http://localhost:8000",
  "slug": "my-skill",
  "installedVersion": "1.0.0",
  "installedAt": 1710000000000
}

锁文件

工作目录中的 .zenskill/lock.json 记录所有已安装的技能:

{
  "version": 1,
  "skills": {
    "my-skill": { "version": "1.0.0", "installedAt": 1710000000000 },
    "another-skill": { "version": "2.1.0", "installedAt": 1710000000001 }
  }
}

故障排除

连接错误

Error: Failed to fetch skill metadata

解决方案: 检查服务器地址是否正确

zenskill config set server http://correct-server.com

访问被拒绝(403)

Error: Access denied: This skill may be private...

解决方案: 设置认证令牌

zenskill config set token your-token

技能不存在(404)

Error: Skill not found

解决方案: 检查技能名称,使用 zenskill search 查找可用技能

开发

构建

npm run build

本地测试

node bin/zenskill.js [command] [options]

依赖

  • commander - CLI 命令解析
  • fflate - ZIP 解压缩
  • ora - 进度指示器

许可证

MIT