sc-skill 1.0.1 → 1.0.2
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/README.md +7 -7
- package/dist/cli.js +4 -4
- package/dist/config.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# sc
|
|
2
2
|
|
|
3
3
|
团队技能同步工具 - 使用软链接管理 Claude Code 技能
|
|
4
4
|
|
|
@@ -22,15 +22,15 @@ npm link
|
|
|
22
22
|
### 1. 同步技能到缓存
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
|
|
25
|
+
sc sync
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
从团队仓库 `https://codeup.aliyun.com/sczlcq/skills.git` 拉取最新技能到 `~/.
|
|
28
|
+
从团队仓库 `https://codeup.aliyun.com/sczlcq/skills.git` 拉取最新技能到 `~/.sc/cache`
|
|
29
29
|
|
|
30
30
|
### 2. 交互式管理技能
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
|
|
33
|
+
sc toggle
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
使用空格键勾选/取消勾选技能,回车确认。选中的技能会通过软链接启用到 `~/.claude/skills`
|
|
@@ -38,20 +38,20 @@ skill-sync toggle
|
|
|
38
38
|
### 3. 查看技能状态
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
|
|
41
|
+
sc list
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
显示所有缓存的技能及其启用状态
|
|
45
45
|
|
|
46
46
|
## 工作原理
|
|
47
47
|
|
|
48
|
-
1. **缓存区**: 技能存储在 `~/.
|
|
48
|
+
1. **缓存区**: 技能存储在 `~/.sc/cache`,通过 git 管理
|
|
49
49
|
2. **软链接**: 启用的技能通过软链接指向缓存区
|
|
50
50
|
3. **目标目录**: `~/.claude/skills` 只包含软链接,不存储实际文件
|
|
51
51
|
|
|
52
52
|
## 配置
|
|
53
53
|
|
|
54
|
-
配置文件位置: `~/.
|
|
54
|
+
配置文件位置: `~/.sc/config.json`
|
|
55
55
|
|
|
56
56
|
```json
|
|
57
57
|
{
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import { DEFAULT_CONFIG, getConfigPath } from './config.js';
|
|
|
7
7
|
import fs from 'fs-extra';
|
|
8
8
|
const program = new Command();
|
|
9
9
|
program
|
|
10
|
-
.name('
|
|
10
|
+
.name('sc')
|
|
11
11
|
.description('团队技能同步工具')
|
|
12
12
|
.version('1.0.0');
|
|
13
13
|
program
|
|
@@ -22,7 +22,7 @@ program
|
|
|
22
22
|
console.log('✓ 已拉取最新技能到缓存');
|
|
23
23
|
await saveLastSync();
|
|
24
24
|
console.log('✅ 同步完成');
|
|
25
|
-
console.log('\n💡 运行
|
|
25
|
+
console.log('\n💡 运行 sc toggle 来启用/禁用技能');
|
|
26
26
|
}
|
|
27
27
|
catch (error) {
|
|
28
28
|
console.error('❌ 同步失败:', error);
|
|
@@ -38,7 +38,7 @@ program
|
|
|
38
38
|
const available = await manager.getAvailableSkills();
|
|
39
39
|
const enabled = await manager.getEnabledSkills();
|
|
40
40
|
if (available.length === 0) {
|
|
41
|
-
console.log('❌ 缓存中没有技能,请先运行
|
|
41
|
+
console.log('❌ 缓存中没有技能,请先运行 sc sync');
|
|
42
42
|
process.exit(1);
|
|
43
43
|
}
|
|
44
44
|
const answers = await inquirer.prompt([
|
|
@@ -80,7 +80,7 @@ program
|
|
|
80
80
|
const available = await manager.getAvailableSkills();
|
|
81
81
|
const enabled = await manager.getEnabledSkills();
|
|
82
82
|
if (available.length === 0) {
|
|
83
|
-
console.log('缓存中没有技能,请先运行
|
|
83
|
+
console.log('缓存中没有技能,请先运行 sc sync');
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
86
|
console.log(`\n📦 缓存中的技能 (${available.length}):`);
|
package/dist/config.js
CHANGED
|
@@ -7,11 +7,11 @@ export const getSkillsDir = () => {
|
|
|
7
7
|
};
|
|
8
8
|
export const getCacheDir = () => {
|
|
9
9
|
const home = os.homedir();
|
|
10
|
-
return path.join(home, '.
|
|
10
|
+
return path.join(home, '.sc', 'cache');
|
|
11
11
|
};
|
|
12
12
|
export const getConfigPath = () => {
|
|
13
13
|
const home = os.homedir();
|
|
14
|
-
return path.join(home, '.
|
|
14
|
+
return path.join(home, '.sc', 'config.json');
|
|
15
15
|
};
|
|
16
16
|
export const DEFAULT_CONFIG = {
|
|
17
17
|
repo: DEFAULT_REPO,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sc-skill",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "团队技能同步工具",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
31
|
-
"url": "https://github.com/yourusername/
|
|
31
|
+
"url": "https://github.com/yourusername/sc.git"
|
|
32
32
|
},
|
|
33
33
|
"packageManager": "pnpm@10.30.2",
|
|
34
34
|
"dependencies": {
|