itismyskillmarket 1.3.1 → 1.3.3
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/CHANGELOG.md +294 -0
- package/dist/index.js +452 -14
- package/docs/plans/2026-04-29-weekly-update.md +57 -0
- package/package.json +1 -1
- package/src/cli.ts +67 -11
- package/src/commands/github-install.ts +538 -0
- package/src/commands/uninstall.ts +260 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,297 @@
|
|
|
1
|
+
# SkillMarket v1.3.3 更新日志
|
|
2
|
+
|
|
3
|
+
**日期**: 2026-04-30
|
|
4
|
+
**版本**: 1.3.3
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 🚀 新功能:GitHub 第三方库支持 (Beta)
|
|
9
|
+
|
|
10
|
+
### 1. 支持 GitHub URL 和简写格式
|
|
11
|
+
|
|
12
|
+
现在可以直接从 GitHub 仓库安装 skills:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# GitHub URL 格式
|
|
16
|
+
skm install https://github.com/owner/repo
|
|
17
|
+
skm install https://github.com/owner/repo/tree/main/skills/my-skill
|
|
18
|
+
|
|
19
|
+
# 简写格式
|
|
20
|
+
skm install owner/repo
|
|
21
|
+
skm install owner/repo#branch
|
|
22
|
+
skm install owner/repo@commit-hash
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 2. 自动检测 Skill 本体
|
|
26
|
+
|
|
27
|
+
安装时会自动检测仓库中的 skill 文件:
|
|
28
|
+
|
|
29
|
+
- ✅ `SKILL.md` - skill 定义文件(必须)
|
|
30
|
+
- ✅ `package.json` - 包配置文件(可选)
|
|
31
|
+
- ✅ `metadata.json` - 元数据文件(可选)
|
|
32
|
+
- ✅ 平台目录(`opencode/`, `cursor/`, `vscode/`, `claude/` 等)
|
|
33
|
+
|
|
34
|
+
**检测输出示例**:
|
|
35
|
+
```
|
|
36
|
+
Detecting skill...
|
|
37
|
+
SKILL.md: ✅
|
|
38
|
+
package.json: ✅
|
|
39
|
+
Detected platforms: opencode, vscode
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 3. 平台判断和格式转换
|
|
43
|
+
|
|
44
|
+
- 自动判断 skill 支持的平台
|
|
45
|
+
- 如果某些平台文件缺失,会自动生成适配文件
|
|
46
|
+
- 支持的平台:OpenCode, Cursor, VSCode, Claude Code, Codex, Antigravity
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# 安装到指定平台(自动生成缺失的平台文件)
|
|
50
|
+
skm install owner/repo --platform opencode,claude
|
|
51
|
+
|
|
52
|
+
# 指定分支
|
|
53
|
+
skm install owner/repo#dev --platform vscode
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 4. 版本控制
|
|
57
|
+
|
|
58
|
+
支持指定分支、tag 或 commit:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# 指定分支
|
|
62
|
+
skm install owner/repo#main
|
|
63
|
+
skm install owner/repo -b develop
|
|
64
|
+
|
|
65
|
+
# 指定 commit
|
|
66
|
+
skm install owner/repo@abc1234
|
|
67
|
+
|
|
68
|
+
# 指定 tag(通过分支名)
|
|
69
|
+
skm install owner/repo#v1.0.0
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 5. 技术实现
|
|
73
|
+
|
|
74
|
+
**新增模块**:`src/commands/github-install.ts`
|
|
75
|
+
|
|
76
|
+
| 函数名 | 功能 |
|
|
77
|
+
|--------|------|
|
|
78
|
+
| `parseGitHubUrl()` | 解析 GitHub URL 和简写格式 |
|
|
79
|
+
| `detectSkillFromGitHub()` | 从 GitHub API 检测 skill |
|
|
80
|
+
| `installFromGitHub()` | 从 GitHub 安装 skill |
|
|
81
|
+
| `generatePlatformAdapters()` | 为缺失平台生成适配文件 |
|
|
82
|
+
|
|
83
|
+
**支持的 URL 格式**:
|
|
84
|
+
| 格式 | 示例 |
|
|
85
|
+
|------|------|
|
|
86
|
+
| 完整 URL | `https://github.com/owner/repo` |
|
|
87
|
+
| 完整 URL + 路径 | `https://github.com/owner/repo/tree/main/path` |
|
|
88
|
+
| 简写 | `owner/repo` |
|
|
89
|
+
| 简写 + 分支 | `owner/repo#branch` |
|
|
90
|
+
| 简写 + commit | `owner/repo@commit` |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 🔧 技术实现
|
|
95
|
+
|
|
96
|
+
### GitHub 安装新增函数
|
|
97
|
+
|
|
98
|
+
| 函数名 | 功能 |
|
|
99
|
+
|--------|------|
|
|
100
|
+
| `parseGitHubUrl()` | 解析 GitHub URL |
|
|
101
|
+
| `detectSkillFromGitHub()` | 检测 skill 本体 |
|
|
102
|
+
| `installFromGitHub()` | 主安装函数 |
|
|
103
|
+
| `generatePlatformAdapters()` | 格式转换 |
|
|
104
|
+
|
|
105
|
+
### 更新接口
|
|
106
|
+
|
|
107
|
+
**GitHubInstallOptions** 接口:
|
|
108
|
+
```typescript
|
|
109
|
+
export interface GitHubInstallOptions {
|
|
110
|
+
platforms?: string[]; // 目标平台
|
|
111
|
+
force?: boolean; // 强制覆盖
|
|
112
|
+
branch?: string; // 指定分支
|
|
113
|
+
commit?: string; // 指定 commit
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### CLI 参数更新
|
|
118
|
+
|
|
119
|
+
| 命令 | 参数 | 说明 |
|
|
120
|
+
|------|------|------|
|
|
121
|
+
| `skm install` | `-b, --branch` | GitHub 分支 |
|
|
122
|
+
| `skm install` | `-c, --commit` | GitHub commit hash |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 📦 完整版本历史
|
|
127
|
+
|
|
128
|
+
| 版本 | 日期 | 描述 |
|
|
129
|
+
|------|------|------|
|
|
130
|
+
| 1.3.3 | 2026-04-30 | GitHub 第三方库支持 |
|
|
131
|
+
| 1.3.2 | 2026-04-30 | 增强卸载命令:--all, --dry-run, --yes |
|
|
132
|
+
| 1.3.1 | 2026-04-29 | Bug 修复,workflow 改进 |
|
|
133
|
+
| 1.3.0 | 2026-04-23 | 独立搜索命令,改进分页逻辑 |
|
|
134
|
+
| 1.2.6 | 2026-04-22 | 添加搜索功能(--search) |
|
|
135
|
+
| 1.2.5 | 2026-04-16 | 文档更新 |
|
|
136
|
+
| 1.2.4 | 2026-04-16 | 修复版本号硬编码问题 |
|
|
137
|
+
| 1.2.3 | 2026-04-15 | 跨平台 Skill 安装支持 |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 贡献者
|
|
142
|
+
|
|
143
|
+
- wxc2004 (wanxuchen)
|
|
144
|
+
- Sisyphus Agent
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
# SkillMarket v1.3.2 更新日志
|
|
149
|
+
|
|
150
|
+
**日期**: 2026-04-30
|
|
151
|
+
**版本**: 1.3.2
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## 🎉 新功能:增强卸载命令
|
|
156
|
+
|
|
157
|
+
### 1. 卸载所有 Skills (`--all`)
|
|
158
|
+
|
|
159
|
+
现在可以一键卸载所有已安装的 skills:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# 卸载所有 skills(需要确认)
|
|
163
|
+
skm uninstall --all
|
|
164
|
+
|
|
165
|
+
# 强制卸载所有,跳过确认
|
|
166
|
+
skm uninstall --all --yes
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**确认提示示例**:
|
|
170
|
+
```
|
|
171
|
+
Found 5 installed skill(s):
|
|
172
|
+
- brainstorming@1.2.0
|
|
173
|
+
- test-skill-1@1.1.0
|
|
174
|
+
- test-skill-2@1.0.0
|
|
175
|
+
- weather-time@1.0.0
|
|
176
|
+
- chinese-almanac@1.0.0
|
|
177
|
+
|
|
178
|
+
⚠️ Are you sure you want to uninstall ALL 5 skill(s)? This action cannot be undone. (y/N): _
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### 2. 预览模式 (`--dry-run`)
|
|
182
|
+
|
|
183
|
+
新增 `--dry-run` 标志,可以预览将要删除的内容,而不实际执行删除:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# 预览卸载单个 skill
|
|
187
|
+
skm uninstall brainstorming --dry-run
|
|
188
|
+
|
|
189
|
+
# 预览卸载所有 skills
|
|
190
|
+
skm uninstall --all --dry-run
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**预览输出示例**:
|
|
194
|
+
```
|
|
195
|
+
📋 Uninstall Preview for "brainstorming":
|
|
196
|
+
|
|
197
|
+
Version: 1.2.0
|
|
198
|
+
Installed: 2026-04-15T10:30:00Z
|
|
199
|
+
Platforms (from registry): OpenCode, Claude Code, VSCode
|
|
200
|
+
|
|
201
|
+
Local files to remove:
|
|
202
|
+
- ~/.skillmarket/skills/brainstorming
|
|
203
|
+
|
|
204
|
+
Platform links to remove:
|
|
205
|
+
- ~/.skillmarket/platform-links/opencode/skills/brainstorming
|
|
206
|
+
- ~/.skillmarket/platform-links/claude/skills/brainstorming
|
|
207
|
+
- ~/.skillmarket/platform-links/vscode/skills/brainstorming
|
|
208
|
+
|
|
209
|
+
⚠️ This was a dry-run. No files were actually deleted.
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### 3. 跳过确认 (`-y, --yes`)
|
|
213
|
+
|
|
214
|
+
新增 `-y` 或 `--yes` 选项,跳过所有确认提示:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# 强制卸载,不提示确认
|
|
218
|
+
skm uninstall brainstorming --yes
|
|
219
|
+
|
|
220
|
+
# 强制卸载所有,不提示确认
|
|
221
|
+
skm uninstall --all --yes
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 4. 改进错误处理
|
|
225
|
+
|
|
226
|
+
- 当平台卸载失败时,会询问用户是否继续清理本地文件
|
|
227
|
+
- 避免误删本地文件导致无法恢复
|
|
228
|
+
|
|
229
|
+
**错误处理示例**:
|
|
230
|
+
```
|
|
231
|
+
Uninstalling from 3 platform(s)...
|
|
232
|
+
|
|
233
|
+
OpenCode ✅ Uninstalled
|
|
234
|
+
Claude Code ❌ Failed: EPERM: operation not permitted
|
|
235
|
+
VSCode ✅ Uninstalled
|
|
236
|
+
|
|
237
|
+
⚠️ 1 platform(s) failed to uninstall. Continue with local cleanup? (y/N): _
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 🔧 技术实现
|
|
243
|
+
|
|
244
|
+
### 新增函数
|
|
245
|
+
|
|
246
|
+
| 函数名 | 功能 |
|
|
247
|
+
|--------|------|
|
|
248
|
+
| `uninstallAll()` | 卸载所有已安装的 skills |
|
|
249
|
+
| `askConfirmation()` | 请求用户确认(内部工具函数) |
|
|
250
|
+
| `getUninstallPreview()` | 收集卸载预览信息(内部工具函数) |
|
|
251
|
+
|
|
252
|
+
### 更新接口
|
|
253
|
+
|
|
254
|
+
**UninstallOptions** 新增字段:
|
|
255
|
+
```typescript
|
|
256
|
+
export interface UninstallOptions {
|
|
257
|
+
platforms?: string[]; // 目标平台列表
|
|
258
|
+
all?: boolean; // 卸载所有 skills
|
|
259
|
+
dryRun?: boolean; // 预览模式
|
|
260
|
+
yes?: boolean; // 跳过确认
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### CLI 参数更新
|
|
265
|
+
|
|
266
|
+
| 参数 | 说明 |
|
|
267
|
+
|------|------|
|
|
268
|
+
| `-a, --all` | 卸载所有已安装的 skills |
|
|
269
|
+
| `-d, --dry-run` | 预览模式,不实际删除 |
|
|
270
|
+
| `-y, --yes` | 跳过确认提示 |
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## 📦 完整版本历史
|
|
275
|
+
|
|
276
|
+
| 版本 | 日期 | 描述 |
|
|
277
|
+
|------|------|------|
|
|
278
|
+
| 1.3.2 | 2026-04-30 | 增强卸载命令:--all, --dry-run, --yes |
|
|
279
|
+
| 1.3.1 | 2026-04-29 | Bug 修复,workflow 改进 |
|
|
280
|
+
| 1.3.0 | 2026-04-23 | 独立搜索命令,改进分页逻辑 |
|
|
281
|
+
| 1.2.6 | 2026-04-22 | 添加搜索功能(--search) |
|
|
282
|
+
| 1.2.5 | 2026-04-16 | 文档更新 |
|
|
283
|
+
| 1.2.4 | 2026-04-16 | 修复版本号硬编码问题 |
|
|
284
|
+
| 1.2.3 | 2026-04-15 | 跨平台 Skill 安装支持 |
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## 贡献者
|
|
289
|
+
|
|
290
|
+
- wxc2004 (wanxuchen)
|
|
291
|
+
- Sisyphus Agent
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
1
295
|
# SkillMarket v1.2.6 更新日志
|
|
2
296
|
|
|
3
297
|
**日期**: 2026-04-22
|