skill-linker 3.0.8 → 4.0.4

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 CHANGED
@@ -4,14 +4,12 @@
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org/)
6
6
 
7
- 一個現代化的互動式 CLI 工具,用於將 AI Agent Skills 快速連結(Symlink)到各種 AI Agent 的專案或全域目錄中。
7
+ 一個現代化的 CLI 工具,用於將 AI Agent Skills 快速連結(Symlink)到各種 AI Agent 的專案或全域目錄中。
8
8
 
9
9
  ## ✨ 功能特色
10
10
 
11
- - **現代化 TUI 介面**:使用 `prompts` 提供流暢的互動體驗。
12
- - **智慧來源選擇**:執行 `npx skill-linker` 時自動偵測,可選擇從本地庫或 GitHub Clone
13
- - **模糊搜尋 (Fuzzy Search)**:在選擇 Repository 時,直接輸入文字即可即時過濾清單。
14
- - **智慧偵測**:自動偵測系統中已安裝的 Agent,並在選單中預設勾選。
11
+ - **CLI 優先設計**:專為 AI Agent 打造的命令列介面,無需互動問答。
12
+ - **自動化流程**:支援自動 Clone、安裝、覆寫。
15
13
  - **多 Agent 支援**:支援 Claude Code, GitHub Copilot, Antigravity, Cursor, Windsurf, OpenCode, Gemini CLI 等。
16
14
  - **雙重範圍 (Scope)**:可選擇安裝到當前 `專案目錄 (Project)` 或 `全域目錄 (Global)`。
17
15
  - **自動 Clone**:支援從 GitHub Clone 並自動處理 Multi-skill Repos。
@@ -22,20 +20,14 @@
22
20
  ### 方式 1:使用 npx (推薦)
23
21
 
24
22
  ```bash
25
- # 啟動互動式安裝介面
26
- # 第一步會詢問:從本地庫選擇 GitHub Clone
27
- npx skill-linker
23
+ # 安裝技能(需要 --skill 或 --from)
24
+ npx /app/workspace/projects/skill-linker install --skill <路徑> --agent opencode --scope both --yes
25
+ npx skill-linker install --from https://github.com/anthropics/skills --agent claude --scope both
28
26
 
29
- # 瀏覽並從庫中 (AgentSkills/) 挑選已下載的 Skill
27
+ # 列出已安裝的 Repos
30
28
  npx skill-linker list
31
- # 或使用縮寫
32
- npx skill-linker -l
33
-
34
- # 直接從 GitHub Clone 並安裝 (跳過來源選擇)
35
- npx skill-linker --from https://github.com/user/my-skill
36
-
37
- # 指定本地路徑 (如果是自己 clone 下來的指定目錄)
38
- npx skill-linker /path/to/my-skill
29
+ npx skill-linker list --repo skill-name
30
+ npx skill-linker list --repo skill-name --json
39
31
  ```
40
32
 
41
33
  ### 方式 2:本地開發/安裝
@@ -50,43 +42,67 @@ npm link # 之後可直接使用 skill-linker 指令
50
42
  ## 🛠️ 命令說明
51
43
 
52
44
  ```
53
- Usage: skill-linker [options] [command] [skill-path]
45
+ Usage: skill-linker [command]
54
46
 
55
- Interactive CLI to link AI Agent Skills to various agents
47
+ CLI to link AI Agent Skills to various agents
56
48
 
57
- Arguments:
58
- skill-path 指定本地 Skill 目錄路徑
49
+ Commands:
50
+ install Install a skill to specified agents
51
+ list List available skills in library
59
52
 
60
53
  Options:
61
- -V, --version 顯示版本號
62
- --from <github-url> 先從 GitHub Clone Skill 後再進行連結
63
- -l, --list 列出庫中可用的 Skills (可互動選擇)
64
- -h, --help 顯示說明
54
+ -V, --version 顯示版本號
55
+ -h, --help 顯示說明
56
+ ```
57
+
58
+ ### install 命令
65
59
 
66
- Commands:
67
- list 列出庫中所有可用的 Repos 與其 Skills
68
60
  ```
61
+ Usage: skill-linker install --skill <path>
69
62
 
70
- ### 📋 瀏覽模式 (List Mode)
63
+ Options:
64
+ --skill <path> 指定本地 Skill 目錄路徑(必需)
65
+ --from <github-url> 從 GitHub Clone 後再進行連結
66
+ -a, --agent <names> 指定 Agent 名稱(opencode, claude, cursor 等)
67
+ -s, --scope <scope> 範圍:project, global, both(預設 both)
68
+ -y, --yes 自動覆寫已存在的連結
69
+ ```
71
70
 
72
- 如果您想從之前透過 `--from` 下載過的庫 (`~/Documents/AgentSkills`) 中挑選 Skill 來安裝,請使用 `list` 子指令:
71
+ 範例:
73
72
 
74
73
  ```bash
75
- npx skill-linker list
74
+ # 指定路徑安裝到 opencode
75
+ npx skill-linker install --skill /path/to/skill --agent opencode
76
+
77
+ # 從 GitHub Clone 並安裝到多個 Agents
78
+ npx skill-linker install --from https://github.com/anthropics/skills --agent claude cursor --scope both
79
+
80
+ # 安裝到所有已偵測到的 Agents
81
+ npx skill-linker install --skill /path/to/skill --scope both --yes
76
82
  ```
77
83
 
78
- 或使用選項:
79
- ```bash
80
- npx skill-linker -l
84
+ ### list 命令
85
+
81
86
  ```
87
+ Usage: skill-linker list [options]
82
88
 
83
- 1. **第一層**:選擇已 Clone 的 Repository (會標註是否有 `skills/` 子目錄)。
84
- 2. **第二層**:如果該 Repo 包含多個 Skills,會進階列出供您查看。
89
+ Options:
90
+ -r, --repo <name> 指定 Repository 名稱
91
+ --json JSON 輸出格式
92
+ ```
93
+
94
+ 範例:
85
95
 
86
- > 💡 **提示**:如果您已經手動 `git clone` 了某個 Skill Repo,也可以直接指定路徑安裝:
87
- > ```bash
88
- > npx skill-linker /path/to/your-cloned-repo
89
- > ```
96
+ ```bash
97
+ # 列出所有 Repos
98
+ npx skill-linker list
99
+
100
+ # 列出特定 Repo 的 Skills
101
+ npx skill-linker list --repo skill-name
102
+
103
+ # JSON 輸出
104
+ npx skill-linker list --repo skill-name --json
105
+ ```
90
106
 
91
107
  ## 📂 Skill Library 管理
92
108
 
@@ -102,35 +118,41 @@ npx skill-linker -l
102
118
 
103
119
  ## 🛠️ 支援的 Agent 與路徑
104
120
 
105
- | 平台 / 工具 | 專案目錄 | 全域目錄 |
106
- |------------|---------|---------|
107
- | **Claude Code** | `.claude/skills/` | `~/.claude/skills/` |
108
- | **GitHub Copilot** | `.github/skills/` | `~/.copilot/skills/` |
109
- | **Google Antigravity** | `.agent/skills/` | `~/.gemini/antigravity/skills/` |
110
- | **Cursor** | `.cursor/skills/` | `~/.cursor/skills/` |
111
- | **OpenCode** | `.opencode/skill/` | `~/.config/opencode/skill/` |
112
- | **OpenAI Codex** | `.codex/skills/` | `~/.codex/skills/` |
113
- | **Gemini CLI** | `.gemini/skills/` | `~/.gemini/skills/` |
114
- | **Windsurf** | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
121
+ | 平台 / 工具 | 專案目錄 | 全域目錄 |
122
+ | ---------------------- | ------------------- | ------------------------------- |
123
+ | **Claude Code** | `.claude/skills/` | `~/.claude/skills/` |
124
+ | **GitHub Copilot** | `.github/skills/` | `~/.copilot/skills/` |
125
+ | **Google Antigravity** | `.agent/skills/` | `~/.gemini/antigravity/skills/` |
126
+ | **Cursor** | `.cursor/skills/` | `~/.cursor/skills/` |
127
+ | **OpenCode** | `.opencode/skills/` | `~/.config/opencode/skills/` |
128
+ | **OpenAI Codex** | `.codex/skills/` | `~/.codex/skills/` |
129
+ | **Gemini CLI** | `.gemini/skills/` | `~/.gemini/skills/` |
130
+ | **Windsurf** | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
115
131
 
116
132
  ## 📦 推薦的 Public Skill Repos
117
133
 
118
134
  ### Claude 官方 Skills (pdf, docx, pptx, xlsx...)
135
+
119
136
  [anthropics/skills](https://github.com/anthropics/skills)
137
+
120
138
  ```bash
121
- npx skill-linker --from https://github.com/anthropics/skills
139
+ npx skill-linker install --from https://github.com/anthropics/skills --agent claude
122
140
  ```
123
141
 
124
142
  ### moltbot 的 AI Agent Skills (來自 clawdhub.com)
143
+
125
144
  [moltbot/skills](https://github.com/moltbot/skills)
145
+
126
146
  ```bash
127
- npx skill-linker --from https://github.com/moltbot/skills
147
+ npx skill-linker install --from https://github.com/moltbot/skills --agent opencode
128
148
  ```
129
149
 
130
150
  ### 精選的 AI Skills 工具箱
151
+
131
152
  [obra/superpowers](https://github.com/obra/superpowers)
153
+
132
154
  ```bash
133
- npx skill-linker --from https://github.com/obra/superpowers
155
+ npx skill-linker install --from https://github.com/obra/superpowers --agent claude cursor
134
156
  ```
135
157
 
136
158
  ## ⚠️ 注意事項
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "skill-linker",
3
- "version": "3.0.8",
4
- "description": "Interactive CLI to link AI Agent Skills to various agents (Claude, Copilot, Antigravity, Cursor, etc.)",
3
+ "version": "4.0.4",
4
+ "description": "CLI to link AI Agent Skills to various agents (Claude, Copilot, Antigravity, Cursor, etc.)",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
7
7
  "skill-linker": "bin/cli.js"
@@ -28,8 +28,7 @@
28
28
  "dependencies": {
29
29
  "chalk": "^4.1.2",
30
30
  "commander": "^12.0.0",
31
- "execa": "^5.1.1",
32
- "prompts": "^2.4.2"
31
+ "execa": "^5.1.1"
33
32
  },
34
33
  "repository": {
35
34
  "type": "git",
package/src/cli.js CHANGED
@@ -1,45 +1,57 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const { program } = require('commander');
4
- const chalk = require('chalk');
5
- const install = require('./commands/install');
6
- const list = require('./commands/list');
3
+ const { program } = require("commander");
4
+ const chalk = require("chalk");
5
+ const install = require("./commands/install");
6
+ const list = require("./commands/list");
7
7
 
8
8
  // Package info
9
- const packageJson = require('../package.json');
9
+ const packageJson = require("../package.json");
10
10
 
11
11
  program
12
- .name('skill-linker')
13
- .description('Interactive CLI to link AI Agent Skills to various agents')
14
- .version(packageJson.version);
12
+ .name("skill-linker")
13
+ .description(
14
+ "CLI to link AI Agent Skills to various agents (Claude, Copilot, Antigravity, Cursor, etc.)",
15
+ )
16
+ .version(packageJson.version);
15
17
 
16
- // Default command (install)
18
+ // Install command
17
19
  program
18
- .argument('[skill-path]', 'Path to skill directory')
19
- .option('--from <github-url>', 'Clone skill from GitHub URL first, then link')
20
- .option('-l, --list', 'List available skills in library')
21
- .action(async (skillPath, options) => {
22
- // Handle --list flag
23
- if (options.list) {
24
- await list();
25
- return;
26
- }
27
-
28
- // Run install command
29
- await install({
30
- skill: skillPath,
31
- from: options.from
32
- });
20
+ .command("install")
21
+ .description("Install a skill to specified agents")
22
+ .requiredOption(
23
+ "--skill <path>",
24
+ "Path to skill directory or --from clone URL",
25
+ )
26
+ .option("--from <github-url>", "Clone skill from GitHub URL first, then link")
27
+ .option(
28
+ "-a, --agent <names...>",
29
+ "Agent names to install to (opencode, claude, cursor, etc.)",
30
+ )
31
+ .option("-s, --scope <scope>", "Scope: project, global, or both")
32
+ .option("-y, --yes", "Skip confirmation prompts")
33
+ .action(async (options) => {
34
+ await install({
35
+ skill: options.skill,
36
+ from: options.from,
37
+ agents: options.agent,
38
+ scope: options.scope,
39
+ yes: options.yes || false,
33
40
  });
41
+ });
34
42
 
35
- // Standalone list command
43
+ // List command
36
44
  program
37
- .command('list')
38
- .description('List all available skills in the library')
39
- .action(async () => {
40
- await list();
45
+ .command("list")
46
+ .description("List available skills in library")
47
+ .option("-r, --repo <name>", "Repository name to list skills from")
48
+ .option("--json", "Output as JSON")
49
+ .action(async (options) => {
50
+ await list({
51
+ repo: options.repo,
52
+ json: options.json || false,
41
53
  });
54
+ });
42
55
 
43
56
  // Parse command line arguments
44
57
  program.parse(process.argv);
45
-