@boses/skillink 0.0.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 +21 -0
- package/README.md +111 -0
- package/dist/bin/skillink.d.ts +1 -0
- package/dist/bin/skillink.js +8 -0
- package/dist/chunk-ZEFDUUIX.js +2628 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +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.
|
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Skillink 🚀
|
|
2
|
+
|
|
3
|
+
**Skillink** 是一个为 AI 时代打造的技能管理工具。它允许你在一个统一的目录(`.agents/skills`)中编写 AI 技能(Skills),并利用符号链接(Symlink/Junction)技术,即时同步到各种 AI 工具(如 Cursor、Windsurf、VSCode、Gemini)的配置目录中。
|
|
4
|
+
|
|
5
|
+
> **核心理念:一次编写,处处生效。**
|
|
6
|
+
|
|
7
|
+
## ✨ 特性
|
|
8
|
+
|
|
9
|
+
- **🎯 极简架构**:基于 Node.js 20+ 和 TypeScript 5.x,性能卓越。
|
|
10
|
+
- **🔗 零克隆开销**:采用符号链接技术,目标目录的文件只是源文件的引用。修改源文件,AI 工具立即感知,无需等待同步。
|
|
11
|
+
- **🛠️ 极致 DX**:
|
|
12
|
+
- **交互式初始化**:一键引导配置。
|
|
13
|
+
- **自动探测与创建**:自动管理 AI 工具的配置目录。
|
|
14
|
+
- **实时监视**:支持 `--watch` 模式,动态响应技能的增删。
|
|
15
|
+
- **🛡️ 安全可靠**:仅操作符号链接,不轻易改动或删除用户的原始文件。
|
|
16
|
+
|
|
17
|
+
## 📦 安装
|
|
18
|
+
|
|
19
|
+
推荐全局安装以便在任何项目中使用:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# 使用 pnpm
|
|
23
|
+
pnpm add -g @boses/skillink
|
|
24
|
+
|
|
25
|
+
# 使用 npm
|
|
26
|
+
npm install -g @boses/skillink
|
|
27
|
+
|
|
28
|
+
# 使用 yarn
|
|
29
|
+
yarn global add @boses/skillink
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
或者使用 `npx` 快速试用:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx @boses/skillink init
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 🚀 快速开始
|
|
39
|
+
|
|
40
|
+
### 1. 初始化项目
|
|
41
|
+
|
|
42
|
+
在项目根目录下运行:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
skillink init
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
按照交互提示选择你正在使用的 AI 工具。该命令会自动:
|
|
49
|
+
- 创建 `.agents/skills` 目录并添加一个示例技能。
|
|
50
|
+
- 生成 `skillink.config.ts` 配置文件。
|
|
51
|
+
|
|
52
|
+
### 2. 编写技能
|
|
53
|
+
|
|
54
|
+
在 `.agents/skills` 目录下创建子文件夹,并在其中编写 `SKILL.md`:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
.agents/skills/
|
|
58
|
+
└── react-expert/
|
|
59
|
+
└── SKILL.md
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 3. 同步到工具
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
skillink sync
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
想要在开发时自动同步新增的技能?运行:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
skillink sync --watch
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 🛠️ 命令详解
|
|
75
|
+
|
|
76
|
+
| 命令 | 描述 |
|
|
77
|
+
| :--- | :--- |
|
|
78
|
+
| `init` | 初始化项目环境,生成 `.agents/skills` 和配置文件。 |
|
|
79
|
+
| `sync` | 将技能同步到所有配置的目标工具中。支持 `-w, --watch` 模式。 |
|
|
80
|
+
| `status` | 检查并显示当前所有技能与目标工具的同步状态。 |
|
|
81
|
+
| `clean` | 移除所有由 Skillink 创建的符号链接,恢复环境。 |
|
|
82
|
+
|
|
83
|
+
## ⚙️ 配置说明 (`skillink.config.ts`)
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import { defineConfig } from 'skillink';
|
|
87
|
+
|
|
88
|
+
export default defineConfig({
|
|
89
|
+
// 技能源目录
|
|
90
|
+
source: '.agents/skills',
|
|
91
|
+
// 同步目标列表
|
|
92
|
+
targets: [
|
|
93
|
+
{
|
|
94
|
+
name: 'cursor',
|
|
95
|
+
path: '.cursor/rules',
|
|
96
|
+
// 是否启用该目标(默认为 true)
|
|
97
|
+
// 设置为 false 后,sync 和 status 命令将忽略此目标
|
|
98
|
+
enabled: true,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'gemini',
|
|
102
|
+
path: '.gemini/modules',
|
|
103
|
+
enabled: true,
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## 📄 许可证
|
|
110
|
+
|
|
111
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|