@moon791017/neo-skills 1.0.9 → 1.0.10
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 +15 -12
- package/bin/_utils.js +6 -1
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,27 +68,30 @@
|
|
|
68
68
|
|
|
69
69
|
本套件支援多種 AI Agent 環境。請依據您的 CLI 工具執行對應指令:
|
|
70
70
|
|
|
71
|
-
###
|
|
71
|
+
### Gemini CLI
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
74
|
gemini extension install https://github.com/Benknightdark/neo-skills --auto-update
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
###
|
|
77
|
+
### Claude Code
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
| 透過 `npx` 執行安裝腳本 | `npx @moon791017/neo-skills install-claude-skills` |
|
|
83
|
-
| `npm` 全域安裝後執行 | `npm i @moon791017/neo-skills -g` <br> `install-claude-skills` |
|
|
79
|
+
```bash
|
|
80
|
+
npx -p @moon791017/neo-skills install-claude-skills
|
|
81
|
+
```
|
|
84
82
|
|
|
85
|
-
###
|
|
83
|
+
### Copilot CLI
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
```bash
|
|
86
|
+
npx -p @moon791017/neo-skills install-copilot-skills
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 安裝全部AI Agent技能
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx -p @moon791017/neo-skills install-skills
|
|
93
|
+
```
|
|
90
94
|
|
|
91
|
-
如需一次安裝所有 agent,可改用 `install-skills` 入口。
|
|
92
95
|
|
|
93
96
|
## 💡 常用指令範例
|
|
94
97
|
|
package/bin/_utils.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* 1. 在 AGENTS 加入設定
|
|
6
6
|
* 2. 建立 bin/install-{key}-skills.js(複製任一現有檔案,改 named export 即可)
|
|
7
7
|
*/
|
|
8
|
+
import { realpathSync } from 'node:fs';
|
|
8
9
|
import { cp, mkdir, access } from 'node:fs/promises';
|
|
9
10
|
import { join, resolve, dirname, basename } from 'node:path';
|
|
10
11
|
import { homedir } from 'node:os';
|
|
@@ -112,7 +113,11 @@ export function createInstallerFromFile(importMetaUrl) {
|
|
|
112
113
|
*/
|
|
113
114
|
export function runAsMain(installFn, callerUrl) {
|
|
114
115
|
const callerPath = fileURLToPath(callerUrl);
|
|
115
|
-
const
|
|
116
|
+
const argvPath = process.argv[1];
|
|
117
|
+
const isMain = Boolean(argvPath) && (
|
|
118
|
+
resolve(argvPath) === resolve(callerPath) ||
|
|
119
|
+
realpathSync.native(resolve(argvPath)) === realpathSync.native(resolve(callerPath))
|
|
120
|
+
);
|
|
116
121
|
if (!isMain) return;
|
|
117
122
|
|
|
118
123
|
const key = extractAgentKey(callerUrl);
|
package/gemini-extension.json
CHANGED