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

@huskky/skillmaker

v1.0.0

Published

CLI tool to generate and install AI coding agent skills (Claude Code, Codex, OpenClaw)

Downloads

23

Readme

@huskky/skillmaker

CLI 工具,用于快速生成和安装多平台 AI 编程代理技能(Skill)。

支持的平台:

  • 🤖 Claude Code — Anthropic 的编程代理
  • 🧠 Codex — OpenAI 的编程代理
  • 🦞 OpenClaw — 通用 AI 代理平台

安装

# 全局安装(推荐)
npm install -g @huskky/skillmaker

# 或通过 npx 直接使用(无需安装)
npx skillmaker --help

安装完成后,终端中即可使用 skillmaker 命令。

快速开始

方式一:交互式向导(推荐新手)

在终端执行:

skillmaker new

工具会逐步提问:

  1. Skill 名称 — 使用 kebab-case 格式,如 my-data-skill
  2. 一句话描述 — 这个 Skill 做什么
  3. 行为描述 — 用你自己的话说说它应该怎么做
  4. 触发场景 — 什么情况下应该触发这个 Skill
  5. 是否需要 scripts/ 目录 — 是否包含可执行脚本
  6. 是否需要 references/ 目录 — 是否包含参考文档
  7. 是否需要 assets/ 目录 — 是否包含模板/资源文件
  8. 是否使用 Claude AI 增强 — 需要设置 ANTHROPIC_API_KEY 环境变量
  9. 是否立即安装 — 生成后直接安装到 Claude Code
  10. 安装位置 — 全局安装(所有项目可用)或本地安装(仅当前项目)

方式二:配置文件驱动(适合批量/自动化)

创建一个 YAML 配置文件,例如 config.yaml

skill:
  name: "my-data-skill"
  description: "分析 CSV 文件并生成报告"

generation:
  enhance_with_ai: false   # 是否使用 AI 增强
  template: "default"

structure:
  scripts:
    - name: "analyze.py"
      content: |
        #!/usr/bin/env python3
        import csv
        print("正在分析...")
      executable: true
  references:
    - name: "format-guide.md"
      content: |
        # 报告格式指南

        报告应遵循标准格式。

install:
  scope: "global"   # "global" 全局安装 | "local" 本地安装 | "ask" 询问

然后执行:

# 根据配置生成 Skill
skillmaker generate config.yaml

# 指定输出目录
skillmaker generate config.yaml -o skills-generated

# 生成时使用 AI 增强(需要 ANTHROPIC_API_KEY)
skillmaker generate config.yaml --enhance

# 预览模式(不实际写入文件)
skillmaker generate config.yaml --dry-run

命令详解

1. skillmaker new [name] — 交互式创建

skillmaker new                    # 逐步提问,创建新 Skill
skillmaker new my-skill           # 预设名称,其余仍需填写
skillmaker new -e                 # 创建时启用 AI 增强

2. skillmaker generate <config> — 配置文件生成

skillmaker generate config.yaml                    # 从 YAML 配置生成
skillmaker generate config.json                    # 从 JSON 配置生成
skillmaker generate config.yaml -o ./output        # 指定输出目录
skillmaker generate config.yaml --enhance           # AI 增强 SKILL.md
skillmaker generate config.yaml --dry-run           # 预览,不写入

3. skillmaker validate <file> — 格式校验

检查 SKILL.md 文件格式是否正确:

skillmaker validate SKILL.md
skillmaker validate path/to/skill/SKILL.md

校验内容:

  • 是否包含 YAML frontmatter(以 --- 开头)
  • name 字段是否存在且为 kebab-case 格式
  • description 字段是否存在
  • body 部分是否非空

4. skillmaker install <skill-dir> — 安装 Skill

# 交互式选择目标平台
skillmaker install ./my-skill

# 安装到所有检测到的平台(自动识别已安装的代理)
skillmaker install ./my-skill --target all

# 安装到指定平台
skillmaker install ./my-skill --target claude-code
skillmaker install ./my-skill --target codex
skillmaker install ./my-skill --target openclaw

# 全局安装(默认)
skillmaker install ./my-skill --target all --global

# 本地安装(当前项目)
skillmaker install ./my-skill --target all --local

# 预览模式
skillmaker install ./my-skill --target all --dry-run

# 覆盖已存在的 Skill
skillmaker install ./my-skill --target all --overwrite

各平台的安装路径:

| 平台 | 全局路径 | 本地路径 | |------|----------|----------| | 🤖 Claude Code | ~/.agents/skills/<name>/ + ~/.claude/skills/ 软链接 | .claude/skills/<name>/ | | 🧠 Codex | ~/.codex/skills/<name>/ | .codex/skills/<name>/ | | 🦞 OpenClaw | ~/.openclaw/skills/<name>/ | skills/<name>/ |

5. skillmaker enhance <skill-dir> — AI 优化

使用 Claude AI 优化现有 SKILL.md 的内容质量:

# 优化指定目录中的 SKILL.md
skillmaker enhance ./my-skill

# 优化指定文件
skillmaker enhance ./my-skill/SKILL.md

# 指定模型
skillmaker enhance ./my-skill --model claude-opus-4-6

# 跳过确认,直接覆盖
skillmaker enhance ./my-skill --yes

执行流程:

  1. 读取现有 SKILL.md
  2. 调用 Claude API 优化内容
  3. 展示 Diff 预览(绿色 = 新增,红色 = 删除)
  4. 询问是否覆盖

选项速查

| 选项 | 说明 | |------|------| | -e, --enhance | 使用 Claude AI 增强 SKILL.md | | -g, --global | 全局安装 | | -l, --local | 本地安装(当前项目) | | -o, --output <dir> | 输出目录(默认 .) | | --dry-run | 预览模式,不实际写入文件 | | -v, --verbose | 启用详细输出 | | --overwrite | 安装时覆盖已存在的 Skill | | --yes | 跳过确认提示 |

AI 增强

使用 AI 功能需要设置 Anthropic API Key:

# 方式一:设置环境变量(推荐)
export ANTHROPIC_API_KEY="your-api-key-here"

# 方式二:直接在命令中传入
skillmaker enhance ./my-skill --api-key "your-api-key-here"

# 方式三:写入 shell 配置文件持久化
echo 'export ANTHROPIC_API_KEY="your-key"' >> ~/.zshrc
source ~/.zshrc

支持通过环境变量切换模型:

export SKILL_MAKER_MODEL="claude-opus-4-6"

Skill 结构说明

每个 Skill 本质上是一个目录:

skill-name/
├── SKILL.md           # 必需 — YAML frontmatter + Markdown 正文
├── scripts/           # 可选 — 可执行脚本(Python/Bash)
├── references/        # 可选 — 参考文档,按需加载到上下文
└── assets/            # 可选 — 模板、图片等资源文件

SKILL.md 格式:

---
name: my-skill
description: 一句话描述这个 Skill 做什么,以及何时触发
---

# My Skill

## When to Use This Skill

具体的触发条件和场景...

## Instructions

逐步的操作指南...

完整使用示例

从零创建一个 Skill 并安装到所有平台:

# 1. 使用交互式向导创建
skillmaker new my-csv-analyzer
# → 按提示填写描述、触发条件等
# → 选择 AI 增强(需 API Key)
# → 选择目标平台(可多选 Claude Code / Codex / OpenClaw)

# 2. 验证生成的 Skill 格式正确
skillmaker validate skills-generated/my-csv-analyzer/SKILL.md

# 3. 一次性安装到所有检测到的平台
skillmaker install skills-generated/my-csv-analyzer --target all

# 4. 安装后在对应代理中即可使用
# Claude Code / Codex / OpenClaw 对话涉及 CSV 分析时自动触发

开发

npm install       # 安装依赖
npm run build     # 构建
npm test          # 运行测试
npm run dev       # 监听模式(自动重新构建)

License

MIT