@boses/skillink 0.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 yliu
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 yliu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,57 +1,50 @@
1
1
  # Skillink 🚀
2
2
 
3
- **Skillink** 是一个为 AI 时代打造的技能管理工具。它允许你在一个统一的目录(`.agents/skills`)中编写 AI 技能(Skills),并利用符号链接(Symlink/Junction)技术,即时同步到各种 AI 工具(如 Cursor、Windsurf、VSCode、Gemini)的配置目录中。
3
+ [English](./README.md) | [简体中文](./README.zh-CN.md)
4
4
 
5
- > **核心理念:一次编写,处处生效。**
5
+ **Skillink** is a skill linker for AI tools.
6
+ Write skills in one place (`.agents/skills`) and sync to multiple tool directories with symlinks/junctions.
6
7
 
7
- ## 特性
8
+ > Core idea: **Write once, use everywhere.**
8
9
 
9
- - **🎯 极简架构**:基于 Node.js 20+ 和 TypeScript 5.x,性能卓越。
10
- - **🔗 零克隆开销**:采用符号链接技术,目标目录的文件只是源文件的引用。修改源文件,AI 工具立即感知,无需等待同步。
11
- - **🛠️ 极致 DX**:
12
- - **交互式初始化**:一键引导配置。
13
- - **自动探测与创建**:自动管理 AI 工具的配置目录。
14
- - **实时监视**:支持 `--watch` 模式,动态响应技能的增删。
15
- - **🛡️ 安全可靠**:仅操作符号链接,不轻易改动或删除用户的原始文件。
10
+ ## Features
16
11
 
17
- ## 📦 安装
12
+ - Minimal architecture with Node.js 20+ and TypeScript
13
+ - Symlink-based sync (no copy, instant effect)
14
+ - Interactive `init` flow
15
+ - `sync --watch` for real-time skill folder changes
16
+ - Safe clean behavior (only removes links under source boundary)
17
+ - CLI localization via config (`en` / `zh-CN`)
18
18
 
19
- 推荐全局安装以便在任何项目中使用:
19
+ ## Install
20
20
 
21
- ```bash
22
- # 使用 pnpm
23
- pnpm add -g @boses/skillink
24
-
25
- # 使用 npm
26
- npm install -g @boses/skillink
21
+ Install as a dev dependency:
27
22
 
28
- # 使用 yarn
29
- yarn global add @boses/skillink
30
- ```
23
+ ```bash
24
+ # pnpm
25
+ pnpm add -D @boses/skillink
31
26
 
32
- 或者使用 `npx` 快速试用:
27
+ # npm
28
+ npm install -D @boses/skillink
33
29
 
34
- ```bash
35
- npx @boses/skillink init
30
+ # yarn
31
+ yarn add -D @boses/skillink
36
32
  ```
37
33
 
38
- ## 🚀 快速开始
34
+ ## Quick Start
39
35
 
40
- ### 1. 初始化项目
41
-
42
- 在项目根目录下运行:
36
+ ### 1) Initialize
43
37
 
44
38
  ```bash
45
- skillink init
39
+ npx skillink init
46
40
  ```
47
41
 
48
- 按照交互提示选择你正在使用的 AI 工具。该命令会自动:
49
- - 创建 `.agents/skills` 目录并添加一个示例技能。
50
- - 生成 `skillink.config.ts` 配置文件。
42
+ The first step in `init` asks language (`English / 简体中文`), then it creates:
51
43
 
52
- ### 2. 编写技能
44
+ - `.agents/skills` (with an example skill)
45
+ - `skillink.config.ts`
53
46
 
54
- `.agents/skills` 目录下创建子文件夹,并在其中编写 `SKILL.md`:
47
+ ### 2) Write skills
55
48
 
56
49
  ```text
57
50
  .agents/skills/
@@ -59,53 +52,60 @@ skillink init
59
52
  └── SKILL.md
60
53
  ```
61
54
 
62
- ### 3. 同步到工具
55
+ ### 3) Sync
63
56
 
64
57
  ```bash
65
- skillink sync
58
+ npx skillink sync
66
59
  ```
67
60
 
68
- 想要在开发时自动同步新增的技能?运行:
61
+ Watch mode:
69
62
 
70
63
  ```bash
71
- skillink sync --watch
64
+ npx skillink sync --watch
72
65
  ```
73
66
 
74
- ## 🛠️ 命令详解
67
+ ## Commands
75
68
 
76
- | 命令 | 描述 |
77
- | :--- | :--- |
78
- | `init` | 初始化项目环境,生成 `.agents/skills` 和配置文件。 |
79
- | `sync` | 将技能同步到所有配置的目标工具中。支持 `-w, --watch` 模式。 |
80
- | `status` | 检查并显示当前所有技能与目标工具的同步状态。 |
81
- | `clean` | 移除所有由 Skillink 创建的符号链接,恢复环境。 |
69
+ | Command | Description |
70
+ | :------- | :----------------------------------------------------------------------------------- |
71
+ | `init` | Initialize project and create config. |
72
+ | `sync` | Sync skills to all enabled targets (`--watch` supported). |
73
+ | `status` | Show detailed sync status. |
74
+ | `clean` | Remove generated symlinks from configured targets. |
75
+ | `check` | Check updates by semantic versions from npm `versions` (no `latest` tag dependency). |
82
76
 
83
- ## ⚙️ 配置说明 (`skillink.config.ts`)
77
+ ## Configuration (`skillink.config.ts`)
84
78
 
85
79
  ```typescript
86
- import { defineConfig } from 'skillink';
80
+ import { defineConfig } from '@boses/skillink';
87
81
 
88
82
  export default defineConfig({
89
- // 技能源目录
83
+ // CLI locale: 'en' | 'zh-CN' (default: 'en')
84
+ locale: 'en',
85
+ // Skills source directory
90
86
  source: '.agents/skills',
91
- // 同步目标列表
87
+ // Sync targets
92
88
  targets: [
93
89
  {
94
90
  name: 'cursor',
95
91
  path: '.cursor/rules',
96
- // 是否启用该目标(默认为 true)
97
- // 设置为 false 后,sync 和 status 命令将忽略此目标
98
92
  enabled: true,
99
93
  },
100
94
  {
101
95
  name: 'gemini',
102
- path: '.gemini/modules',
96
+ path: '.gemini/skills',
103
97
  enabled: true,
104
- }
98
+ },
105
99
  ],
106
100
  });
107
101
  ```
108
102
 
109
- ## 📄 许可证
103
+ ## Git Recommendation
104
+
105
+ - Commit: `skillink.config.ts`, `.agents/skills/**`
106
+ - Avoid committing generated link targets (for example: `.cursor/rules`, `.gemini/skills`)
107
+ - `init` will remind you to add target directories to `.gitignore`
108
+
109
+ ## License
110
110
 
111
- MIT
111
+ MIT
@@ -0,0 +1,111 @@
1
+ # Skillink 🚀
2
+
3
+ [English](./README.md) | [简体中文](./README.zh-CN.md)
4
+
5
+ **Skillink** 是一个 AI Skills 链接工具。
6
+ 你可以在统一目录(`.agents/skills`)编写技能,并通过符号链接(Symlink/Junction)同步到多个 AI 工具目录。
7
+
8
+ > 核心理念:**一次编写,处处生效。**
9
+
10
+ ## 特性
11
+
12
+ - Node.js 20+ + TypeScript 的简洁架构
13
+ - 基于符号链接同步,零拷贝、即时生效
14
+ - 交互式 `init` 初始化流程
15
+ - `sync --watch` 支持实时监听技能目录变化
16
+ - 安全清理策略(仅清理位于 source 边界内的链接)
17
+ - 支持 CLI 国际化输出(`en` / `zh-CN`)
18
+
19
+ ## 安装
20
+
21
+ 推荐安装为开发依赖:
22
+
23
+ ```bash
24
+ # pnpm
25
+ pnpm add -D @boses/skillink
26
+
27
+ # npm
28
+ npm install -D @boses/skillink
29
+
30
+ # yarn
31
+ yarn add -D @boses/skillink
32
+ ```
33
+
34
+ ## 快速开始
35
+
36
+ ### 1)初始化
37
+
38
+ ```bash
39
+ npx skillink init
40
+ ```
41
+
42
+ `init` 第一步会先询问语言(`English / 简体中文`),然后自动创建:
43
+
44
+ - `.agents/skills`(包含示例技能)
45
+ - `skillink.config.ts`
46
+
47
+ ### 2)编写技能
48
+
49
+ ```text
50
+ .agents/skills/
51
+ └── react-expert/
52
+ └── SKILL.md
53
+ ```
54
+
55
+ ### 3)同步
56
+
57
+ ```bash
58
+ npx skillink sync
59
+ ```
60
+
61
+ 监听模式:
62
+
63
+ ```bash
64
+ npx skillink sync --watch
65
+ ```
66
+
67
+ ## 命令
68
+
69
+ | 命令 | 说明 |
70
+ | :------- | :----------------------------------------------------------------- |
71
+ | `init` | 初始化项目并生成配置。 |
72
+ | `sync` | 同步技能到所有启用目标(支持 `--watch`)。 |
73
+ | `status` | 显示详细同步状态。 |
74
+ | `clean` | 清理配置目标中的已生成符号链接。 |
75
+ | `check` | 基于 npm `versions` 的语义化版本检查更新(不依赖 `latest` 标签)。 |
76
+
77
+ ## 配置说明(`skillink.config.ts`)
78
+
79
+ ```typescript
80
+ import { defineConfig } from '@boses/skillink';
81
+
82
+ export default defineConfig({
83
+ // CLI 语言: 'en' | 'zh-CN'(默认: 'en')
84
+ locale: 'en',
85
+ // 技能源目录
86
+ source: '.agents/skills',
87
+ // 同步目标
88
+ targets: [
89
+ {
90
+ name: 'cursor',
91
+ path: '.cursor/rules',
92
+ enabled: true,
93
+ },
94
+ {
95
+ name: 'gemini',
96
+ path: '.gemini/skills',
97
+ enabled: true,
98
+ },
99
+ ],
100
+ });
101
+ ```
102
+
103
+ ## Git 建议
104
+
105
+ - 推荐提交:`skillink.config.ts`、`.agents/skills/**`
106
+ - 不建议提交:链接产物目录(如 `.cursor/rules`、`.gemini/skills`)
107
+ - `init` 完成后会提示将目标目录加入 `.gitignore`
108
+
109
+ ## 许可证
110
+
111
+ MIT
@@ -1,8 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'module';const require = createRequire(import.meta.url);
3
- import {
4
- init_esm_shims
5
- } from "../chunk-ZEFDUUIX.js";
6
-
7
- // src/bin/skillink.ts
8
- init_esm_shims();
3
+ import "../chunk-2UL2JQ4R.js";
4
+ import "../chunk-AGAXTALJ.js";