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

@jl-org/ai-sync

v1.0.5

Published

Migrate Commands, Skills, Rules across Cursor, Claude Code, OpenCode, and other AI CLI tools. 在 Cursor、Claude Code、OpenCode 等工具中迁移 Commands、Skills、Rules...

Readme

AI 工具配置迁移

自动化将 Claude 配置迁移到不同 AI IDE 工具的脚本

支持的工具

  • Cursor
  • Claude Code
  • CodeBuddy
  • OpenCode
  • CodeX
  • Gemini CLI
  • IFlow CLI

快速开始

1. 准备配置

遵循 Claude Code 配置规范 https://code.claude.com/docs/zh-CN/settings

创建 ~/.claude 目录,包含以下子目录:

  • ~/.claude/commands/ - 存放自定义命令(Markdown 格式)
  • ~/.claude/skills/ - 存放技能模块(Markdown 格式)
  • ~/.claude/{CLAUDE.md,AGENTS.md} - 存放 IDE 规则
  • ~/.claude.json - MCP 配置文件

2. 执行迁移命令

npm i -g @jl-org/ai-sync

# 交互式执行
ai-sync
# 查看帮助
ai-sync --help
? 选择要迁移到的工具(使用方向键导航,空格选择,回车确认):
 ◯  Cursor
 ⬤  Claude Code
 ⬤  OpenCode
 ◯  Gemini CLI
 ◯  IFlow CLI

? 配置到当前项目(否则为全局配置)? (y/N) n
? 是否自动覆盖已存在的文件? (y/N) y

开始迁移...
✓ 迁移 Commands... (2/2)
✓ 迁移 Skills... (1/1)
✓ 迁移 Rules... (1/1)
✓ 迁移 MCP... (1/1)

--- 迁移完成 ---
工具: Claude Code, OpenCode
成功: 15
跳过: 3
错误: 0

自定义配置

你可以通过在项目根目录创建 ai-sync.config.js 文件来深度自定义同步行为

1. 使用 defineConfig

通过 defineConfig 你可以定义新的工具配置,或修改现有工具的同步逻辑:

import { defineConfig } from '@jl-org/ai-sync'

export default defineConfig({
  tools: {
    // 定义一个新的工具:test-cli
    'test-cli': {
      name: 'Test CLI',
      // 支持的配置类型
      supported: ['commands', 'skills', 'rules', 'mcp'],
      // 具体的转换逻辑
      commands: {
        source: '.test-cli/commands',
        format: 'markdown',
        target: '~/.test-cli/commands',
      },
      rules: {
        source: '.test-cli/rules',
        target: '~/.test-cli/RULES.md',
        // 开启合并模式:将多个规则合并为一个文件
        merge: true,
        // 高度自定义转换逻辑
        transform: (content, fileName) => {
          return `${content}\n\n> Generated from ${fileName}`
        }
      }
    }
  }
})

执行规则

配置转换规则

| 配置类型 | 转换说明 | |---------|--------| | Commands | Claude → Cursor/OpenCode:直接复制Claude → Gemini/IFlow:Markdown → TOML 自动转换 | | Skills | 所有工具:直接复制 | | Rules | Cursor → 其他工具:.mdc 文件合并为单个 Markdown其他工具 → Cursor:不迁移(Cursor 已支持自动检测 ~/.claude/CLAUDE.md) | | MCP | Claude → Cursor/OpenCode/Gemini/IFlow:自动格式转换 |

路径规则

  • 工具配置:统一使用全局 Home 目录下的配置路径,如 ~/.claude/
  • 路径解析:支持使用 ~ 表示用户主目录,自动处理跨平台路径
  • 默认目录:默认使用家目录 ~ 作为配置探测起点,以 ~/.claude 作为唯一配置标准
  • 指定路径:支持通过命令行参数或配置文件指定自定义的源目录和目标项目目录