@moon791017/neo-skills 1.0.21 → 1.0.23
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 +101 -20
- package/bin/_system-instructions.js +61 -0
- package/bin/_utils.js +12 -0
- package/bin/install-system-instructions.js +207 -0
- package/gemini-extension.json +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -67,49 +67,130 @@
|
|
|
67
67
|
|
|
68
68
|
## 📦 安裝與使用
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
### 支援的 AI Agent
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
| Agent | CLI 工具 | 技能目錄 | 指導檔 |
|
|
73
|
+
| :--- | :--- | :--- | :--- |
|
|
74
|
+
| **Gemini** | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | 透過擴充套件自動載入 | `GEMINI.md` |
|
|
75
|
+
| **Claude** | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `.claude/skills/` | `CLAUDE.md` |
|
|
76
|
+
| **Copilot** | [GitHub Copilot CLI](https://docs.github.com/en/copilot) | `.copilot/skills/`(全域)<br>`.github/skills/`(專案) | `.copilot/copilot-instructions.md`(全域)<br>`.github/copilot-instructions.md`(專案) |
|
|
77
|
+
| **Codex** | [OpenAI Codex CLI](https://github.com/openai/codex) | `.codex/skills/` | `AGENTS.md` |
|
|
78
|
+
|
|
79
|
+
Neo Skills 提供兩個 CLI 工具,分別用於安裝**技能模組**與**系統提示詞**:
|
|
80
|
+
|
|
81
|
+
| 工具 | 用途 | 安裝目標 |
|
|
82
|
+
| :--- | :--- | :--- |
|
|
83
|
+
| `install-skills` | 將技能模組(`skills/`)複製到 Agent 的技能目錄 | 資料夾(如 `.claude/skills`) |
|
|
84
|
+
| `install-system-instructions` | 將系統提示詞寫入 Agent 的指導檔 | 單一檔案(如 `CLAUDE.md`) |
|
|
85
|
+
|
|
86
|
+
> 兩個工具皆支援 `--ai-agent` 與 `--project-path` 參數,邏輯一致。
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### 一、Gemini CLI(擴充套件模式)
|
|
91
|
+
|
|
92
|
+
Gemini CLI 透過擴充套件機制直接安裝,**不需要**以下的 npx 指令:
|
|
73
93
|
|
|
74
94
|
```bash
|
|
75
95
|
gemini extension install https://github.com/Benknightdark/neo-skills --auto-update
|
|
76
96
|
```
|
|
77
97
|
|
|
78
|
-
|
|
98
|
+
---
|
|
79
99
|
|
|
80
|
-
|
|
100
|
+
### 二、安裝技能模組 (`install-skills`)
|
|
101
|
+
|
|
102
|
+
將 `skills/` 目錄下的所有技能模組複製到目標 AI Agent 的技能資料夾。
|
|
103
|
+
|
|
104
|
+
**語法:**
|
|
81
105
|
|
|
82
|
-
```bash
|
|
83
|
-
npx -p @moon791017/neo-skills install-skills --ai-agent claude
|
|
84
|
-
npx -p @moon791017/neo-skills install-skills --ai-agent copilot
|
|
85
|
-
npx -p @moon791017/neo-skills install-skills --ai-agent codex
|
|
86
106
|
```
|
|
107
|
+
install-skills [--ai-agent <name>] [--project-path <path>]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**參數:**
|
|
87
111
|
|
|
88
|
-
|
|
112
|
+
| 參數 | 必填 | 說明 |
|
|
113
|
+
| :--- | :---: | :--- |
|
|
114
|
+
| `--ai-agent <name>` | 否 | 指定目標 Agent(`claude` / `copilot` / `codex`)。省略時安裝全部。 |
|
|
115
|
+
| `--project-path <path>` | 否 | 指定專案根目錄。省略時安裝至 `$HOME` 全域路徑。 |
|
|
89
116
|
|
|
90
|
-
|
|
117
|
+
**安裝路徑對照:**
|
|
118
|
+
|
|
119
|
+
| Agent | 全域路徑 | 專案路徑 |
|
|
120
|
+
| :--- | :--- | :--- |
|
|
121
|
+
| Claude | `~/.claude/skills/` | `<project>/.claude/skills/` |
|
|
122
|
+
| Copilot | `~/.copilot/skills/` | `<project>/.github/skills/` |
|
|
123
|
+
| Codex | `~/.codex/skills/` | `<project>/.codex/skills/` |
|
|
124
|
+
|
|
125
|
+
**範例:**
|
|
91
126
|
|
|
92
127
|
```bash
|
|
93
|
-
#
|
|
94
|
-
npx -p @moon791017/neo-skills install-skills --ai-agent claude
|
|
128
|
+
# 安裝指定 Agent 至全域
|
|
129
|
+
npx -p @moon791017/neo-skills install-skills --ai-agent claude -y
|
|
130
|
+
|
|
131
|
+
# 安裝指定 Agent 至專案
|
|
132
|
+
npx -p @moon791017/neo-skills install-skills --ai-agent copilot --project-path /my/project -y
|
|
95
133
|
|
|
96
|
-
#
|
|
97
|
-
npx -p @moon791017/neo-skills install-skills
|
|
134
|
+
# 一次安裝全部 Agent
|
|
135
|
+
npx -p @moon791017/neo-skills install-skills -y
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### 三、安裝系統提示詞 (`install-system-instructions`)
|
|
141
|
+
|
|
142
|
+
將預定義的系統提示詞寫入 AI Agent 的指導檔。若指導檔已存在,會附加至最下方;若不存在,則自動建立。
|
|
98
143
|
|
|
99
|
-
|
|
100
|
-
|
|
144
|
+
**語法:**
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
install-system-instructions --instructions <key> [--ai-agent <name>] [--project-path <path>]
|
|
101
148
|
```
|
|
102
149
|
|
|
103
|
-
|
|
150
|
+
**參數:**
|
|
151
|
+
|
|
152
|
+
| 參數 | 必填 | 說明 |
|
|
153
|
+
| :--- | :---: | :--- |
|
|
154
|
+
| `--instructions <key>` | ✅ | 指定要安裝的系統提示詞(見下方種類表)。 |
|
|
155
|
+
| `--ai-agent <name>` | 否 | 指定目標 Agent(`claude` / `copilot` / `codex`)。省略時安裝至全部。 |
|
|
156
|
+
| `--project-path <path>` | 否 | 指定專案根目錄。省略時安裝至 `$HOME` 全域路徑。 |
|
|
157
|
+
|
|
158
|
+
**指導檔路徑對照:**
|
|
104
159
|
|
|
105
|
-
|
|
160
|
+
| Agent | 全域路徑 | 專案路徑 |
|
|
161
|
+
| :--- | :--- | :--- |
|
|
162
|
+
| Claude | `~/.claude/CLAUDE.md` | `<project>/CLAUDE.md` |
|
|
163
|
+
| Copilot | `~/.copilot/copilot-instructions.md` | `<project>/.github/copilot-instructions.md` |
|
|
164
|
+
| Codex | `~/.codex/AGENTS.md` | `<project>/AGENTS.md` |
|
|
165
|
+
|
|
166
|
+
**可用的系統提示詞種類:**
|
|
167
|
+
|
|
168
|
+
| Key | 名稱 | 說明 |
|
|
169
|
+
| :--- | :--- | :--- |
|
|
170
|
+
| `technical-co-founder` | Technical Co-Founder | 讓 AI 扮演技術共同創辦人,以 Discovery → Planning → Building → Polish → Handoff 五階段框架,協助您從零打造可上線的真實產品。 |
|
|
106
171
|
|
|
107
|
-
|
|
172
|
+
**範例:**
|
|
108
173
|
|
|
109
174
|
```bash
|
|
110
|
-
|
|
175
|
+
# 一次安裝至全部 Agent 的全域指導檔
|
|
176
|
+
npx -p @moon791017/neo-skills install-system-instructions \
|
|
177
|
+
--instructions technical-co-founder -y
|
|
178
|
+
|
|
179
|
+
# 安裝至指定 Agent 的全域指導檔 (~/.claude/CLAUDE.md)
|
|
180
|
+
npx -p @moon791017/neo-skills install-system-instructions \
|
|
181
|
+
--ai-agent claude --instructions technical-co-founder -y
|
|
182
|
+
|
|
183
|
+
# 安裝至專案的 CLAUDE.md
|
|
184
|
+
npx -p @moon791017/neo-skills install-system-instructions \
|
|
185
|
+
--ai-agent claude --instructions technical-co-founder --project-path /my/project -y
|
|
186
|
+
|
|
187
|
+
# 安裝至專案的 .github/copilot-instructions.md
|
|
188
|
+
npx -p @moon791017/neo-skills install-system-instructions \
|
|
189
|
+
--ai-agent copilot --instructions technical-co-founder --project-path /my/project -y
|
|
111
190
|
```
|
|
112
191
|
|
|
192
|
+
> **💡** 重複執行相同指令不會重複寫入,系統會自動偵測並跳過已安裝的提示詞。
|
|
193
|
+
|
|
113
194
|
## 💡 常用指令範例
|
|
114
195
|
|
|
115
196
|
您可以直接對 AI 代理下達以下指令或在對話中描述需求:
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export const technicalCoFounderInstructions = `
|
|
2
|
+
When generating commit messages, do not include 'Co-authored-by' or any AI attribution trailers.
|
|
3
|
+
|
|
4
|
+
Role:
|
|
5
|
+
You are now my Technical Co-Founder. Your job is to help me build a real product I can use, share, or launch. Handle all the building, but keep me in the loop and in control.
|
|
6
|
+
My Idea:
|
|
7
|
+
[Describe your product idea — what it does, who it's for, what problem it solves. Explain it like you'd tell a friend.]
|
|
8
|
+
How serious I am:
|
|
9
|
+
[Just exploring / I want to use this myself / I want to share it with others / I want to launch it publicly]
|
|
10
|
+
Project Framework:
|
|
11
|
+
1. Phase 1: Discovery
|
|
12
|
+
• Ask questions to understand what I actually need (not just what I said)
|
|
13
|
+
• Challenge my assumptions if something doesn't make sense
|
|
14
|
+
• Help me separate "must have now" from "add later"
|
|
15
|
+
• Tell me if my idea is too big and suggest a smarter starting point
|
|
16
|
+
2. Phase 2: Planning
|
|
17
|
+
• Propose exactly what we'll build in version 1
|
|
18
|
+
• Explain the technical approach in plain language
|
|
19
|
+
• Estimate complexity (simple, medium, ambitious)
|
|
20
|
+
• Identify anything I'll need (accounts, services, decisions)
|
|
21
|
+
• Show a rough outline of the finished product
|
|
22
|
+
3. Phase 3: Building
|
|
23
|
+
• Build in stages I can see and react to
|
|
24
|
+
• Explain what you're doing as you go (I want to learn)
|
|
25
|
+
• Test everything before moving on
|
|
26
|
+
• Stop and check in at key decision points
|
|
27
|
+
• If you hit a problem, tell me the options instead of just picking one
|
|
28
|
+
4. Phase 4: Polish
|
|
29
|
+
• Make it look professional, not like a hackathon project
|
|
30
|
+
• Handle edge cases and errors gracefully
|
|
31
|
+
• Make sure it's fast and works on different devices if relevant
|
|
32
|
+
• Add small details that make it feel "finished"
|
|
33
|
+
5. Phase 5: Handoff
|
|
34
|
+
• Deploy it if I want it online
|
|
35
|
+
• Give clear instructions for how to use it, maintain it, and make changes
|
|
36
|
+
• Document everything so I'm not dependent on this conversation
|
|
37
|
+
• Tell me what I could add or improve in version 2
|
|
38
|
+
6. How to Work with Me
|
|
39
|
+
• Treat me as the product owner. I make the decisions, you make them happen.
|
|
40
|
+
• Don't overwhelm me with technical jargon. Translate everything.
|
|
41
|
+
• Push back if I'm overcomplicating or going down a bad path.
|
|
42
|
+
• Be honest about limitations. I'd rather adjust expectations than be disappointed.
|
|
43
|
+
• Move fast, but not so fast that I can't follow what's happening.
|
|
44
|
+
Rules:
|
|
45
|
+
• I don't just want it to work—I want it to be something I'm proud to show people
|
|
46
|
+
• This is real. Not a mockup. Not a prototype. A working product.
|
|
47
|
+
• Keep me in control and in the loop at all times`;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 系統提示詞 Registry — 以 kebab-case 作為 key,供 CLI 選擇安裝。
|
|
51
|
+
*
|
|
52
|
+
* 新增提示詞時:
|
|
53
|
+
* 1. 在上方新增 named export(內容字串)
|
|
54
|
+
* 2. 在此 registry 加入對應 entry
|
|
55
|
+
*/
|
|
56
|
+
export const INSTRUCTIONS = {
|
|
57
|
+
'technical-co-founder': {
|
|
58
|
+
name: 'Technical Co-Founder',
|
|
59
|
+
content: technicalCoFounderInstructions,
|
|
60
|
+
},
|
|
61
|
+
};
|
package/bin/_utils.js
CHANGED
|
@@ -25,17 +25,29 @@ export const AGENTS = {
|
|
|
25
25
|
claude: {
|
|
26
26
|
name: 'Claude',
|
|
27
27
|
homePath: '.claude/skills',
|
|
28
|
+
instructionFile: {
|
|
29
|
+
homePath: '.claude/CLAUDE.md',
|
|
30
|
+
projectPath: 'CLAUDE.md',
|
|
31
|
+
},
|
|
28
32
|
hint: '請確保您的 Claude Desktop 或相關插件已指向此目錄。',
|
|
29
33
|
},
|
|
30
34
|
copilot: {
|
|
31
35
|
name: 'Copilot',
|
|
32
36
|
homePath: '.copilot/skills',
|
|
33
37
|
projectPath: '.github/skills',
|
|
38
|
+
instructionFile: {
|
|
39
|
+
homePath: '.copilot/copilot-instructions.md',
|
|
40
|
+
projectPath: '.github/copilot-instructions.md',
|
|
41
|
+
},
|
|
34
42
|
hint: '請確保您的 GitHub Copilot CLI 已指向此目錄。',
|
|
35
43
|
},
|
|
36
44
|
codex: {
|
|
37
45
|
name: 'Codex',
|
|
38
46
|
homePath: '.codex/skills',
|
|
47
|
+
instructionFile: {
|
|
48
|
+
homePath: '.codex/AGENTS.md',
|
|
49
|
+
projectPath: 'AGENTS.md',
|
|
50
|
+
},
|
|
39
51
|
hint: '請確保您的 Codex CLI 已指向此目錄。',
|
|
40
52
|
},
|
|
41
53
|
};
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Neo Skills — 系統提示詞安裝程式
|
|
4
|
+
*
|
|
5
|
+
* 用法:
|
|
6
|
+
* install-system-instructions --instructions technical-co-founder
|
|
7
|
+
* install-system-instructions --ai-agent claude --instructions technical-co-founder
|
|
8
|
+
* install-system-instructions --ai-agent copilot --instructions technical-co-founder --project-path .
|
|
9
|
+
*
|
|
10
|
+
* 參數:
|
|
11
|
+
* --ai-agent <name> 指定目標 AI Agent(可用值見 _utils.js 的 AGENTS)。
|
|
12
|
+
* 省略時安裝至全部已註冊 agent。
|
|
13
|
+
* --instructions <key> 指定要安裝的系統提示詞(可用值見 _system-instructions.js 的 INSTRUCTIONS)。必填。
|
|
14
|
+
* --project-path <path> 指定專案根目錄作為安裝基底(取代 $HOME)。省略時安裝至全域路徑。
|
|
15
|
+
*/
|
|
16
|
+
import { readFile, writeFile, mkdir, access } from 'node:fs/promises';
|
|
17
|
+
import { join, resolve, dirname } from 'node:path';
|
|
18
|
+
import { homedir } from 'node:os';
|
|
19
|
+
|
|
20
|
+
import { AGENTS } from './_utils.js';
|
|
21
|
+
import { INSTRUCTIONS } from './_system-instructions.js';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 從 process.argv 解析指定 flag 的值。
|
|
25
|
+
* @param {string} flag
|
|
26
|
+
* @returns {string | undefined}
|
|
27
|
+
*/
|
|
28
|
+
function parseArg(flag) {
|
|
29
|
+
const idx = process.argv.indexOf(flag);
|
|
30
|
+
if (idx === -1 || idx + 1 >= process.argv.length) return undefined;
|
|
31
|
+
return process.argv[idx + 1];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 產生提示詞的起始標記。
|
|
36
|
+
* @param {string} key
|
|
37
|
+
*/
|
|
38
|
+
function startMarker(key) {
|
|
39
|
+
return `<!-- neo-skills:system-instructions:${key} -->`;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 產生提示詞的結束標記。
|
|
44
|
+
* @param {string} key
|
|
45
|
+
*/
|
|
46
|
+
function endMarker(key) {
|
|
47
|
+
return `<!-- /neo-skills:system-instructions:${key} -->`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 將提示詞包裹在起始/結束標記之間。
|
|
52
|
+
* @param {string} key
|
|
53
|
+
* @param {string} content
|
|
54
|
+
*/
|
|
55
|
+
function wrapContent(key, content) {
|
|
56
|
+
return `${startMarker(key)}\n${content}\n${endMarker(key)}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 全域錯誤攔截
|
|
60
|
+
process.on('uncaughtException', (err) => {
|
|
61
|
+
console.error('💥 [Fatal Error]:', err);
|
|
62
|
+
process.exit(1);
|
|
63
|
+
});
|
|
64
|
+
process.on('unhandledRejection', (reason) => {
|
|
65
|
+
console.error('💥 [Unhandled Rejection]:', reason);
|
|
66
|
+
process.exit(1);
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 對單一 agent 執行系統提示詞安裝。
|
|
71
|
+
*
|
|
72
|
+
* @param {string} agentKey - AGENTS 中的 key
|
|
73
|
+
* @param {object} agentConfig - AGENTS[agentKey]
|
|
74
|
+
* @param {string} instructionsKey - INSTRUCTIONS 中的 key
|
|
75
|
+
* @param {object} instruction - INSTRUCTIONS[instructionsKey]
|
|
76
|
+
* @param {string | undefined} projectPath - 使用者指定的專案路徑
|
|
77
|
+
* @returns {Promise<{success: boolean, message: string}>}
|
|
78
|
+
*/
|
|
79
|
+
async function installForAgent(agentKey, agentConfig, instructionsKey, instruction, projectPath) {
|
|
80
|
+
if (!agentConfig.instructionFile) {
|
|
81
|
+
const msg = `agent "${agentKey}" 未設定 instructionFile,跳過。`;
|
|
82
|
+
console.warn(`⚠️ ${msg}`);
|
|
83
|
+
return { success: true, message: msg };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const { instructionFile } = agentConfig;
|
|
87
|
+
const baseDir = projectPath ? resolve(projectPath) : homedir();
|
|
88
|
+
const subPath = projectPath && instructionFile.projectPath
|
|
89
|
+
? instructionFile.projectPath
|
|
90
|
+
: instructionFile.homePath;
|
|
91
|
+
const targetFile = join(baseDir, subPath);
|
|
92
|
+
|
|
93
|
+
console.log(`🚀 [${agentConfig.name}] 開始安裝系統提示詞: ${instruction.name}`);
|
|
94
|
+
console.log(`🎯 目標檔案: ${targetFile}`);
|
|
95
|
+
|
|
96
|
+
const wrappedContent = wrapContent(instructionsKey, instruction.content);
|
|
97
|
+
|
|
98
|
+
let fileExists = false;
|
|
99
|
+
try {
|
|
100
|
+
await access(targetFile);
|
|
101
|
+
fileExists = true;
|
|
102
|
+
} catch {
|
|
103
|
+
// 檔案不存在,稍後建立
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (fileExists) {
|
|
107
|
+
const existing = await readFile(targetFile, 'utf8');
|
|
108
|
+
|
|
109
|
+
if (existing.includes(startMarker(instructionsKey))) {
|
|
110
|
+
const msg = `指導檔中已包含 "${instruction.name}" 提示詞,跳過安裝。`;
|
|
111
|
+
console.log(`⏭️ ${msg}`);
|
|
112
|
+
return { success: true, message: msg };
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const newContent = existing.trimEnd() + '\n\n' + wrappedContent + '\n';
|
|
116
|
+
await writeFile(targetFile, newContent, 'utf8');
|
|
117
|
+
const msg = `已將 "${instruction.name}" 附加至既有指導檔。`;
|
|
118
|
+
console.log(`✅ [${agentConfig.name}] ${msg}`);
|
|
119
|
+
return { success: true, message: msg };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
await mkdir(dirname(targetFile), { recursive: true });
|
|
123
|
+
await writeFile(targetFile, wrappedContent + '\n', 'utf8');
|
|
124
|
+
const msg = `已建立指導檔並寫入 "${instruction.name}" 提示詞。`;
|
|
125
|
+
console.log(`✅ [${agentConfig.name}] ${msg}`);
|
|
126
|
+
return { success: true, message: msg };
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
async function main() {
|
|
130
|
+
const agentKey = parseArg('--ai-agent');
|
|
131
|
+
const projectPath = parseArg('--project-path');
|
|
132
|
+
const instructionsKey = parseArg('--instructions');
|
|
133
|
+
|
|
134
|
+
// ── 驗證 --instructions(兩種模式皆需要)──
|
|
135
|
+
if (!instructionsKey) {
|
|
136
|
+
const valid = Object.keys(INSTRUCTIONS).join(', ');
|
|
137
|
+
console.error(`❌ 缺少必填參數 --instructions。可用選項: ${valid}`);
|
|
138
|
+
process.exit(1);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const instruction = INSTRUCTIONS[instructionsKey];
|
|
142
|
+
if (!instruction) {
|
|
143
|
+
const valid = Object.keys(INSTRUCTIONS).join(', ');
|
|
144
|
+
console.error(`❌ 未知的 instructions: "${instructionsKey}"。可用選項: ${valid}`);
|
|
145
|
+
process.exit(1);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// ── 模式一:指定單一 agent ──
|
|
149
|
+
if (agentKey) {
|
|
150
|
+
const agentConfig = AGENTS[agentKey];
|
|
151
|
+
if (!agentConfig) {
|
|
152
|
+
const valid = Object.keys(AGENTS).join(', ');
|
|
153
|
+
console.error(`❌ 未知的 agent: "${agentKey}"。可用選項: ${valid}`);
|
|
154
|
+
process.exit(1);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (!agentConfig.instructionFile) {
|
|
158
|
+
console.error(`❌ agent "${agentKey}" 未設定 instructionFile。`);
|
|
159
|
+
process.exit(1);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
const result = await installForAgent(agentKey, agentConfig, instructionsKey, instruction, projectPath);
|
|
163
|
+
if (!result.success) process.exit(1);
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// ── 模式二:安裝至全部 agent ──
|
|
168
|
+
console.log('╔══════════════════════════════════════════╗');
|
|
169
|
+
console.log('║ 🧠 Neo Skills — 系統提示詞安裝程式 ║');
|
|
170
|
+
console.log('╚══════════════════════════════════════════╝');
|
|
171
|
+
console.log('');
|
|
172
|
+
|
|
173
|
+
const results = [];
|
|
174
|
+
|
|
175
|
+
for (const [key, config] of Object.entries(AGENTS)) {
|
|
176
|
+
console.log(`━━━ 正在安裝: ${config.name} ━━━`);
|
|
177
|
+
try {
|
|
178
|
+
const result = await installForAgent(key, config, instructionsKey, instruction, projectPath);
|
|
179
|
+
results.push({ name: config.name, ...result });
|
|
180
|
+
} catch (error) {
|
|
181
|
+
console.error(`❌ [${config.name}] 安裝失敗:`, error.message || error);
|
|
182
|
+
results.push({ name: config.name, success: false, message: error.message || String(error) });
|
|
183
|
+
}
|
|
184
|
+
console.log('');
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// 彙總報告
|
|
188
|
+
console.log('══════════════════════════════════════════');
|
|
189
|
+
console.log('📊 安裝結果彙總:');
|
|
190
|
+
const failed = results.filter(r => !r.success);
|
|
191
|
+
|
|
192
|
+
for (const r of results) {
|
|
193
|
+
console.log(` ${r.success ? '✅' : '❌'} ${r.name}: ${r.message}`);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
console.log('');
|
|
197
|
+
console.log(`成功: ${results.length - failed.length} / ${results.length}`);
|
|
198
|
+
|
|
199
|
+
if (failed.length > 0) {
|
|
200
|
+
console.log(`失敗: ${failed.length} — ${failed.map(r => r.name).join(', ')}`);
|
|
201
|
+
process.exit(1);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
console.log('🎉 全部安裝完成!');
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
main();
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moon791017/neo-skills",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Neo Skills: A Universal Expert Agent Extension",
|
|
6
6
|
"homepage": "https://neo-blog-iota.vercel.app/",
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
"gemini cli",
|
|
9
9
|
"claude code",
|
|
10
10
|
"copilot cli",
|
|
11
|
+
"openai codex cli",
|
|
11
12
|
"ai agent skills"
|
|
12
13
|
],
|
|
13
14
|
"bin": {
|
|
14
15
|
"neo-skills": "./bin/install-skills.js",
|
|
15
|
-
"install-skills": "./bin/install-skills.js"
|
|
16
|
+
"install-skills": "./bin/install-skills.js",
|
|
17
|
+
"install-system-instructions": "./bin/install-system-instructions.js"
|
|
16
18
|
},
|
|
17
19
|
"files": [
|
|
18
20
|
"dist",
|