add-skill-kit 3.2.4 → 3.2.6

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.
Files changed (78) hide show
  1. package/README.md +179 -119
  2. package/bin/lib/commands/help.js +0 -4
  3. package/bin/lib/commands/install.js +129 -9
  4. package/bin/lib/ui.js +1 -1
  5. package/lib/agent-cli/__tests__/adaptive_engine.test.js +190 -0
  6. package/lib/agent-cli/__tests__/integration/cross_script.test.js +222 -0
  7. package/lib/agent-cli/__tests__/integration/full_cycle.test.js +230 -0
  8. package/lib/agent-cli/__tests__/pattern_analyzer.test.js +173 -0
  9. package/lib/agent-cli/__tests__/pre_execution_check.test.js +167 -0
  10. package/lib/agent-cli/__tests__/skill_injector.test.js +191 -0
  11. package/lib/agent-cli/bin/{ag-smart.js → agent.js} +48 -15
  12. package/lib/agent-cli/dashboard/dashboard_server.js +340 -0
  13. package/lib/agent-cli/dashboard/index.html +538 -0
  14. package/lib/agent-cli/lib/audit.js +2 -2
  15. package/lib/agent-cli/lib/auto-learn.js +8 -8
  16. package/lib/agent-cli/lib/eslint-fix.js +1 -1
  17. package/lib/agent-cli/lib/fix.js +5 -5
  18. package/lib/agent-cli/lib/hooks/install-hooks.js +4 -4
  19. package/lib/agent-cli/lib/hooks/lint-learn.js +4 -4
  20. package/lib/agent-cli/lib/learn.js +10 -10
  21. package/lib/agent-cli/lib/recall.js +1 -1
  22. package/lib/agent-cli/lib/settings.js +24 -0
  23. package/lib/agent-cli/lib/skill-learn.js +2 -2
  24. package/lib/agent-cli/lib/stats.js +3 -3
  25. package/lib/agent-cli/lib/ui/dashboard-ui.js +103 -4
  26. package/lib/agent-cli/lib/ui/index.js +36 -6
  27. package/lib/agent-cli/lib/watcher.js +2 -2
  28. package/lib/agent-cli/package.json +4 -4
  29. package/lib/agent-cli/scripts/adaptive_engine.js +381 -0
  30. package/lib/agent-cli/scripts/dashboard_server.js +224 -0
  31. package/lib/agent-cli/scripts/error_sensor.js +565 -0
  32. package/lib/agent-cli/scripts/learn_from_failure.js +225 -0
  33. package/lib/agent-cli/scripts/pattern_analyzer.js +781 -0
  34. package/lib/agent-cli/scripts/pre_execution_check.js +623 -0
  35. package/lib/agent-cli/scripts/rule_sharing.js +374 -0
  36. package/lib/agent-cli/scripts/skill_injector.js +387 -0
  37. package/lib/agent-cli/scripts/success_sensor.js +500 -0
  38. package/lib/agent-cli/scripts/user_correction_sensor.js +426 -0
  39. package/lib/agent-cli/services/auto-learn-service.js +247 -0
  40. package/lib/agent-cli/src/MIGRATION.md +418 -0
  41. package/lib/agent-cli/src/README.md +367 -0
  42. package/lib/agent-cli/src/core/evolution/evolution-signal.js +42 -0
  43. package/lib/agent-cli/src/core/evolution/index.js +17 -0
  44. package/lib/agent-cli/src/core/evolution/review-gate.js +40 -0
  45. package/lib/agent-cli/src/core/evolution/signal-detector.js +137 -0
  46. package/lib/agent-cli/src/core/evolution/signal-queue.js +79 -0
  47. package/lib/agent-cli/src/core/evolution/threshold-checker.js +79 -0
  48. package/lib/agent-cli/src/core/index.js +15 -0
  49. package/lib/agent-cli/src/core/learning/cognitive-enhancer.js +282 -0
  50. package/lib/agent-cli/src/core/learning/index.js +12 -0
  51. package/lib/agent-cli/src/core/learning/lesson-synthesizer.js +83 -0
  52. package/lib/agent-cli/src/core/scanning/index.js +14 -0
  53. package/lib/agent-cli/src/data/index.js +13 -0
  54. package/lib/agent-cli/src/data/repositories/index.js +8 -0
  55. package/lib/agent-cli/src/data/repositories/lesson-repository.js +130 -0
  56. package/lib/agent-cli/src/data/repositories/signal-repository.js +119 -0
  57. package/lib/agent-cli/src/data/storage/index.js +8 -0
  58. package/lib/agent-cli/src/data/storage/json-storage.js +64 -0
  59. package/lib/agent-cli/src/data/storage/yaml-storage.js +66 -0
  60. package/lib/agent-cli/src/infrastructure/index.js +13 -0
  61. package/lib/agent-cli/src/presentation/formatters/skill-formatter.js +232 -0
  62. package/lib/agent-cli/src/services/export-service.js +162 -0
  63. package/lib/agent-cli/src/services/index.js +13 -0
  64. package/lib/agent-cli/src/services/learning-service.js +99 -0
  65. package/lib/agent-cli/types/index.d.ts +343 -0
  66. package/lib/agent-cli/utils/benchmark.js +269 -0
  67. package/lib/agent-cli/utils/logger.js +303 -0
  68. package/lib/agent-cli/utils/ml_patterns.js +300 -0
  69. package/lib/agent-cli/utils/recovery.js +312 -0
  70. package/lib/agent-cli/utils/telemetry.js +290 -0
  71. package/lib/agentskillskit-cli/ag-smart.js +15 -15
  72. package/lib/agentskillskit-cli/package.json +3 -3
  73. package/package.json +12 -6
  74. package/lib/agent-cli/lib/auto_preview.py +0 -148
  75. package/lib/agent-cli/lib/checklist.py +0 -222
  76. package/lib/agent-cli/lib/session_manager.py +0 -120
  77. package/lib/agent-cli/lib/verify_all.py +0 -327
  78. /package/bin/{cli.js → kit.js} +0 -0
package/README.md CHANGED
@@ -1,149 +1,222 @@
1
- # Add Skill Kit
1
+ # add-skill-kit
2
2
 
3
- > **Package Manager cho AI Agent Skills - Cài đặt 1 lệnh, dùng ngay lập tức**
3
+ > **CLI installer for Agent Skill Kit - FAANG-grade AI skills, workflows, and agents**
4
4
 
5
- [![npm](https://img.shields.io/npm/v/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed)](https://www.npmjs.com/package/add-skill-kit)
6
- [![downloads](https://img.shields.io/npm/dm/add-skill-kit?style=flat&colorA=18181b&colorB=7c3aed)](https://www.npmjs.com/package/add-skill-kit)
5
+ [![npm](https://img.shields.io/badge/npm-add--skill--kit-CB3837?style=flat&logo=npm)](https://www.npmjs.com/package/add-skill-kit)
6
+ [![version](https://img.shields.io/badge/version-3.2.5-7c3aed?style=flat&colorA=18181b)](https://www.npmjs.com/package/add-skill-kit)
7
+ [![JavaScript](https://img.shields.io/badge/100%25-JavaScript-F7DF1E?style=flat&colorA=18181b&logo=javascript)](https://github.com/agentskillkit/add-skill-kit)
7
8
  [![license](https://img.shields.io/badge/license-MIT-7c3aed?style=flat&colorA=18181b)](LICENSE)
8
9
 
9
10
  ---
10
11
 
11
- ## 🎯 Lợi Ích Cho Bạn (Benefits)
12
-
13
- ### ⚡ Từ 0 → Production-Ready Trong 30 Giây
12
+ ## Installation
14
13
 
15
14
  ```bash
16
15
  npx -y add-skill-kit agentskillkit/agent-skills
17
16
  ```
18
17
 
19
- **Xong.** AI Agent của bạn đã có:
20
- - 40+ skills chuyên môn
21
- - 20 specialist agents
22
- - 11 workflows có sẵn
23
- - **✅ Agent CLI (`npx agent`) đã sẵn sàng**
18
+ **That's it!** One command installs everything:
24
19
 
25
- ### 🧩 Không Bao Giờ Copy-Paste Prompts Nữa
20
+ | Component | Count | Description |
21
+ |-----------|-------|-------------|
22
+ | **Skills** | 49 | FAANG-grade coding skills |
23
+ | **Workflows** | 26 | `/think`, `/build`, `/autopilot`, etc. |
24
+ | **Agents** | 25 | Specialist AI agents |
25
+ | **Rules** | GEMINI.md | AI behavior configuration |
26
+ | **Scripts** | 25 | JavaScript automation scripts |
27
+ | **Commands** | `kit` | CLI management tool |
28
+ | **Commands** | `agent` | Interactive learning (optional) |
26
29
 
27
- Quên việc:
28
- - ❌ Tìm kiếm prompts tốt trên internet
29
- - ❌ Copy-paste vào từng project
30
- - ❌ Maintain nhiều phiên bản khác nhau
30
+ ---
31
31
 
32
- Với Add Skill Kit:
33
- - ✅ **1 source of truth** - Cập nhật trung tâm, mọi project đều nhận
34
- - ✅ **Symlink install** - Không duplicate files
35
- - ✅ **Version control** - Rollback bất cứ lúc nào
32
+ ## 🎯 What This CLI Does
36
33
 
37
- ### 💡 AI Agent Của Bạn Tự Học
34
+ ### 1. Fetches Skills from GitHub
38
35
 
39
36
  ```bash
40
- # Dạy AI một lesson mới
41
- npx ag-smart learn --pattern "var " --message "Use const/let instead"
37
+ # Install from any GitHub repo
38
+ npx -y add-skill-kit <owner>/<repo>
39
+
40
+ # Examples:
41
+ npx -y add-skill-kit agentskillkit/agent-skills # Official skills
42
+ npx -y add-skill-kit myteam/company-skills # Custom skills
43
+ ```
44
+
45
+ ### 2. Interactive Installation
46
+
47
+ ```
48
+ ┌───────────────────────────────────────────┐
49
+ │ 🛠️ Agent Skill Kit Installer │
50
+ ├───────────────────────────────────────────┤
51
+ │ ◆ Select skills to install │
52
+ │ ◆ Choose install scope │
53
+ │ ◆ Configure AutoLearn (optional) │
54
+ │ ◆ Auto-install dependencies │
55
+ └───────────────────────────────────────────┘
56
+ ```
57
+
58
+ ### 3. Creates Ready-to-Use Structure
42
59
 
43
- # Từ nay AI sẽ nhớ mãi và không lặp lại
44
60
  ```
61
+ your-project/
62
+ ├── .agent/
63
+ │ ├── GEMINI.md # AI Rules
64
+ │ ├── skills/ # 49 Skills
65
+ │ ├── workflows/ # 26 Workflows
66
+ │ ├── agents/ # 25 Agents
67
+ │ ├── knowledge/ # Learning memory
68
+ │ ├── config/ # Configuration
69
+ │ ├── scripts-js/ # Automation
70
+ │ └── metrics/ # Tracking
71
+
72
+ ├── kit.cmd / kit # CLI wrapper
73
+ └── agent.cmd / agent # AutoLearn (optional)
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 🔧 CLI Options
79
+
80
+ ### Install Scope
81
+
82
+ | Option | Location | Best For |
83
+ |--------|----------|----------|
84
+ | **Project** | `.agent/` in current project | Single project |
85
+ | **Global** | `~/.gemini/antigravity/` | All projects |
86
+
87
+ ### AutoLearn (Optional)
88
+
89
+ When prompted "Install AutoLearn?":
90
+
91
+ | Choice | Effect |
92
+ |--------|--------|
93
+ | **Yes** | Installs `agent` command for interactive learning |
94
+ | **No** | Core functionality works perfectly, just no `agent` CLI |
95
+
96
+ > **Note:** Choosing "No" does NOT affect workflows, skills, or agents.
45
97
 
46
98
  ---
47
99
 
48
- ## 🚀 Quick Start
100
+ ## 📦 Commands After Installation
49
101
 
50
- ### Cài Đặt Skills
102
+ ### `kit` Command (Always Available)
51
103
 
52
104
  ```bash
53
- # Install toàn bộ Agent Skills Kit
54
- npx -y add-skill-kit agentskillkit/agent-skills
105
+ kit list # List all installed skills
106
+ kit validate # Validate skill structure
107
+ kit info <skill> # Show skill details
108
+ kit doctor # Check system health
109
+ kit cache status # View cache usage
110
+ kit cache clear # Clear cache
111
+ ```
55
112
 
56
- # Hoặc chỉ 1 skill cụ thể
57
- npx -y add-skill-kit agentskillkit/agent-skills#react-patterns
113
+ ### `agent` Command (If AutoLearn Installed)
114
+
115
+ ```bash
116
+ agent # Launch dashboard
117
+ agent learn # Teach patterns
118
+ agent recall # Scan violations
119
+ agent stats # View statistics
120
+ agent watch # Real-time monitor
58
121
  ```
59
122
 
60
- ### Quản Lý Skills
123
+ ---
124
+
125
+ ## 🚀 Usage Examples
126
+
127
+ ### Install Official Skills
61
128
 
62
129
  ```bash
63
- # Liệt skills đã cài
64
- add-skill-kit list
130
+ npx -y add-skill-kit agentskillkit/agent-skills
131
+ ```
65
132
 
66
- # Cập nhật skills
67
- add-skill-kit update
133
+ ### Install Specific Skill
68
134
 
69
- # Gỡ cài đặt
70
- add-skill-kit uninstall react-patterns
135
+ ```bash
136
+ npx -y add-skill-kit agentskillkit/agent-skills/react-architect
137
+ ```
138
+
139
+ ### Install to Global Location
140
+
141
+ ```bash
142
+ npx -y add-skill-kit agentskillkit/agent-skills --global
143
+ ```
144
+
145
+ ### Force Reinstall
71
146
 
72
- # Kiểm tra health
73
- add-skill-kit doctor
147
+ ```bash
148
+ npx -y add-skill-kit agentskillkit/agent-skills --force
74
149
  ```
75
150
 
76
151
  ---
77
152
 
78
- ## 🏆 Ưu Điểm Vượt Trội (Advantages)
153
+ ## 🗂️ What Gets Installed
79
154
 
80
- | Feature | Add Skill Kit | Copy-Paste Thủ Công |
81
- |---------|---------------|---------------------|
82
- | **Install time** | 30 giây | 30+ phút |
83
- | **Cập nhật** | 1 lệnh | Manual mỗi file |
84
- | **Consistency** | 100% đồng bộ | Dễ sai lệch |
85
- | **Rollback** | ✅ Built-in | ❌ Manual backup |
86
- | **Integrity check** | ✅ Merkle hash | ❌ Không có |
87
- | **Self-learning** | ✅ Knowledge base | ❌ Không có |
155
+ ### Complete Structure
88
156
 
89
- ---
157
+ ```
158
+ .agent/
159
+ ├── GEMINI.md # Supreme AI Rules
160
+ ├── ARCHITECTURE.md # System Overview
161
+ ├── CONTINUOUS_EXECUTION_POLICY.md # Autopilot Rules
162
+ ├── WORKFLOW_CHAINS.md # Workflow Patterns
163
+
164
+ ├── skills/ # 49 Skills
165
+ │ ├── auto-learner/
166
+ │ ├── react-architect/
167
+ │ ├── typescript-expert/
168
+ │ ├── debug-pro/
169
+ │ ├── studio/
170
+ │ └── ... (44 more)
171
+
172
+ ├── workflows/ # 26 Workflows
173
+ │ ├── think.md
174
+ │ ├── build.md
175
+ │ ├── autopilot.md
176
+ │ └── ... (23 more)
177
+
178
+ ├── agents/ # 25 Agents
179
+ │ ├── frontend-specialist.md
180
+ │ ├── backend-specialist.md
181
+ │ └── ... (23 more)
182
+
183
+ ├── knowledge/ # Learning Memory
184
+ │ └── lessons-learned.yaml
185
+
186
+ ├── config/ # Configuration
187
+ ├── scripts-js/ # 25 JS Scripts
188
+ └── metrics/ # Performance
189
+ ```
90
190
 
91
- ## 📦 Tính Năng Đầy Đủ (Features)
191
+ ### Dependencies Auto-Installed
92
192
 
93
- ### 🔧 CLI Commands
193
+ ```bash
194
+ npm install # Node.js dependencies
195
+ ```
94
196
 
95
- | Command | Chức năng |
96
- |---------|-----------|
97
- | `install` / `add` / `i` | Cài đặt skills từ GitHub |
98
- | `uninstall` / `remove` / `rm` | Gỡ cài đặt |
99
- | `update` | Cập nhật skills |
100
- | `list` / `ls` | Liệt kê skills |
101
- | `verify` | Kiểm tra integrity |
102
- | `doctor` | Health check |
103
- | `validate` / `check` | Validate spec |
104
- | `analyze` | Phân tích skill |
105
- | `info` / `show` | Thông tin skill |
106
- | `lock` | Lock file |
107
- | `cache` | Quản lý cache |
197
+ ---
108
198
 
109
- ### 🎯 Intelligent Installation
199
+ ## 🔗 Related Packages
110
200
 
111
- - **Interactive selection** - Chọn skills cần cài
112
- - **Auto-Install CLI** - Tự động cài `agentskillskit-cli`
113
- - **Symlink mode** - Tiết kiệm disk space
114
- - **Copy mode** - Offline support
115
- - **Merkle verification** - Đảm bảo integrity
201
+ | Package | Purpose |
202
+ |---------|---------|
203
+ | [agent-skills](https://github.com/agentskillkit/agent-skills) | Main skills repository |
204
+ | [add-skill-kit](https://www.npmjs.com/package/add-skill-kit) | This CLI installer |
116
205
 
117
- ### 📁 Cài Đặt Đầy Đủ
206
+ ---
118
207
 
119
- Một lệnh cài đặt tất cả:
208
+ ## 📈 Version History
120
209
 
121
- ```
122
- .agent/
123
- ├── skills/ # 40+ domain skills
124
- ├── agents/ # 20 specialist personas
125
- ├── workflows/ # 11 slash commands
126
- ├── knowledge/ # Self-learning memory
127
- ├── rules/ # Global rules
128
- ├── .shared/ # Shared resources
129
- ├── GEMINI.md # Configuration
130
- └── ARCHITECTURE.md
131
- ```
132
-
133
- ### ⚡ 11 Slash Commands Có Sẵn
134
- | Command | Chức năng |
135
- |---------|-----------|
136
- | `/brainstorm` | Khám phá options trước khi code |
137
- | `/create` | Tạo features/apps mới |
138
- | `/debug` | Debug có hệ thống |
139
- | `/deploy` | Deploy production |
140
- | `/enhance` | Thêm/cập nhật features |
141
- | `/orchestrate` | Điều phối multi-agents |
142
- | `/plan` | Lập kế hoạch task |
143
- | `/preview` | Quản lý dev server |
144
- | `/status` | Xem tiến độ project |
145
- | `/test` | Tạo và chạy tests |
146
- | `/ui-ux-pro-max` | Thiết kế UI chuyên sâu |
210
+ **v3.2.5 (Current)**
211
+ - ✅ 100% JavaScript - No Python required
212
+ - AutoLearn made optional
213
+ - Complete installation (config, scripts-js, metrics, policy docs)
214
+ - Improved error messages
215
+ - Wrapper scripts for `kit` and `agent`
216
+
217
+ **v3.2.0**
218
+ - Migrated all scripts to JavaScript
219
+ - Added `kit` CLI command
147
220
 
148
221
  ---
149
222
 
@@ -157,34 +230,21 @@ cd add-skill-kit
157
230
  # Install dependencies
158
231
  npm install
159
232
 
160
- # Run tests
161
- npm test
162
-
163
- # Run linting
164
- npm run lint
233
+ # Run locally
234
+ node bin/kit.js install agentskillkit/agent-skills
165
235
  ```
166
236
 
167
237
  ---
168
238
 
169
- ## 📋 Requirements
170
-
171
- - Node.js 18+
172
- - Git (để clone repositories)
173
-
174
- ---
175
-
176
- ## 🔗 Links
239
+ ## 📄 License
177
240
 
178
- - [Agent Skills Kit (Content)](https://github.com/agentskillkit/agent-skills)
179
- - [NPM Package](https://www.npmjs.com/package/add-skill-kit)
180
- - [Issues](https://github.com/agentskillkit/add-skill-kit/issues)
241
+ MIT - Free for all projects.
181
242
 
182
243
  ---
183
244
 
184
- ## 📄 License
185
-
186
- MIT - Sử dụng tự do.
245
+ **⚡ add-skill-kit v3.2.5**
246
+ *One command. Complete AI setup.*
187
247
 
188
248
  ---
189
249
 
190
- **⭐ Star nếu hữu ích. Cài đặt ngay. Build faster.**
250
+ **[GitHub](https://github.com/agentskillkit/add-skill-kit) [npm](https://www.npmjs.com/package/add-skill-kit) [Issues](https://github.com/agentskillkit/add-skill-kit/issues)**
@@ -12,10 +12,6 @@ export async function run() {
12
12
  let running = true;
13
13
 
14
14
  while (running) {
15
- stepLine();
16
- step(c.bold("kit") + c.dim(` v${VERSION}`));
17
- step(c.dim("What would you like to know?"));
18
- stepLine();
19
15
 
20
16
  const choice = await select({
21
17
  message: "Select a topic",
@@ -523,6 +523,58 @@ export async function run(spec) {
523
523
  knowledgeInstalled = true;
524
524
  }
525
525
 
526
+ // Install config/ if it exists (required for skill configuration)
527
+ const configDir = path.join(baseAgentDir, "config");
528
+ const targetConfigDir = path.join(WORKSPACE, "..", "config");
529
+ let configInstalled = false;
530
+
531
+ if (fs.existsSync(configDir) && !fs.existsSync(targetConfigDir)) {
532
+ fs.cpSync(configDir, targetConfigDir, { recursive: true });
533
+ step("Installed config/");
534
+ configInstalled = true;
535
+ }
536
+
537
+ // Install scripts-js/ if it exists (required for skill operations)
538
+ const scriptsJsDir = path.join(baseAgentDir, "scripts-js");
539
+ const targetScriptsJsDir = path.join(WORKSPACE, "..", "scripts-js");
540
+ let scriptsJsInstalled = false;
541
+
542
+ if (fs.existsSync(scriptsJsDir) && !fs.existsSync(targetScriptsJsDir)) {
543
+ fs.cpSync(scriptsJsDir, targetScriptsJsDir, { recursive: true });
544
+ step("Installed scripts-js/");
545
+ scriptsJsInstalled = true;
546
+ }
547
+
548
+ // Install metrics/ if it exists (for agent performance tracking)
549
+ const metricsDir = path.join(baseAgentDir, "metrics");
550
+ const targetMetricsDir = path.join(WORKSPACE, "..", "metrics");
551
+ let metricsInstalled = false;
552
+
553
+ if (fs.existsSync(metricsDir) && !fs.existsSync(targetMetricsDir)) {
554
+ fs.cpSync(metricsDir, targetMetricsDir, { recursive: true });
555
+ step("Installed metrics/");
556
+ metricsInstalled = true;
557
+ }
558
+
559
+ // Install additional policy documents
560
+ const policyDocs = [
561
+ "CONTINUOUS_EXECUTION_POLICY.md",
562
+ "WORKFLOW_CHAINS.md"
563
+ ];
564
+ let policyDocsInstalled = 0;
565
+
566
+ for (const doc of policyDocs) {
567
+ const docSrc = path.join(baseAgentDir, doc);
568
+ const docDest = path.join(WORKSPACE, "..", doc);
569
+ if (fs.existsSync(docSrc) && !fs.existsSync(docDest)) {
570
+ fs.copyFileSync(docSrc, docDest);
571
+ policyDocsInstalled++;
572
+ }
573
+ }
574
+ if (policyDocsInstalled > 0) {
575
+ step(`Installed ${policyDocsInstalled} policy docs`);
576
+ }
577
+
526
578
  // Install rules if they exist
527
579
  const rulesDir = path.join(baseAgentDir, "rules");
528
580
  const targetRulesDir = path.join(WORKSPACE, "..", "rules");
@@ -630,17 +682,37 @@ export async function run(spec) {
630
682
 
631
683
  fs.rmSync(tmp, { recursive: true, force: true });
632
684
 
685
+ // Ask user about AutoLearn installation
686
+ stepLine();
687
+ const installAutoLearn = await confirm({
688
+ message: "Install AutoLearn (enables 'agent' command for learning & self-improvement)?",
689
+ initialValue: true
690
+ });
691
+
692
+ if (isCancel(installAutoLearn)) {
693
+ cancel("Installation cancelled");
694
+ process.exit(0);
695
+ }
696
+
633
697
  // Install CLI package
634
698
  stepLine();
635
699
  const cliSpinner = spinner();
636
- const cliPackage = "agentskillskit-cli";
700
+ const cliPackage = "add-skill-kit";
637
701
 
638
702
  if (isGlobal) {
639
- cliSpinner.start(`Installing Agent CLI globally (${cliPackage})`);
703
+ if (installAutoLearn) {
704
+ cliSpinner.start(`Installing CLI globally (${cliPackage})`);
705
+ } else {
706
+ cliSpinner.start(`Installing kit CLI globally (${cliPackage})`);
707
+ }
640
708
  try {
641
709
  await execAsync(`npm install -g ${cliPackage}`, { timeout: 120000 });
642
- cliSpinner.stop("Agent CLI installed globally");
643
- step(c.dim("Run: agent"));
710
+ cliSpinner.stop("CLI installed globally");
711
+ if (installAutoLearn) {
712
+ step(c.dim("Commands: agent, kit"));
713
+ } else {
714
+ step(c.dim("Command: kit"));
715
+ }
644
716
  } catch (e) {
645
717
  cliSpinner.stop(c.yellow("Global CLI installation failed"));
646
718
  step(c.dim(`Try running manually: npm i -g ${cliPackage}`));
@@ -649,7 +721,7 @@ export async function run(spec) {
649
721
  cliSpinner.start(`Installing Agent CLI locally (${cliPackage})`);
650
722
  try {
651
723
  await execAsync(`npm install -D ${cliPackage}`, { timeout: 120000 });
652
- cliSpinner.stop("Agent CLI installed locally");
724
+ cliSpinner.stop("CLI installed locally");
653
725
 
654
726
  // Add npm scripts to package.json
655
727
  try {
@@ -658,25 +730,73 @@ export async function run(spec) {
658
730
  const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
659
731
  pkg.scripts = pkg.scripts || {};
660
732
 
661
- // Add agent script if not exists
662
- if (!pkg.scripts.agent) {
733
+ // Always add kit script
734
+ if (!pkg.scripts.kit) {
735
+ pkg.scripts.kit = "kit";
736
+ }
737
+
738
+ // Add agent script only if AutoLearn enabled
739
+ if (installAutoLearn && !pkg.scripts.agent) {
663
740
  pkg.scripts.agent = "agent";
664
741
  }
665
742
 
666
743
  fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
667
- step(c.green("✓ Added npm script: 'agent'"));
744
+ if (installAutoLearn) {
745
+ step(c.green("✓ Added npm scripts: 'agent', 'kit'"));
746
+ } else {
747
+ step(c.green("✓ Added npm script: 'kit'"));
748
+ }
668
749
  }
669
750
  } catch (scriptErr) {
670
751
  step(c.yellow("⚠ Could not add npm scripts automatically"));
671
752
  }
672
753
 
673
- step(c.dim("Run: npm run agent"));
754
+ // Create wrapper scripts for direct command access (Windows + Unix)
755
+ try {
756
+ const projectRoot = process.cwd();
757
+
758
+ // Always create kit wrappers
759
+ const kitCmd = `@echo off\nnode "%~dp0node_modules\\add-skill-kit\\bin\\kit.js" %*`;
760
+ const kitSh = `#!/bin/sh\nnode "$(dirname "$0")/node_modules/add-skill-kit/bin/kit.js" "$@"`;
761
+ fs.writeFileSync(path.join(projectRoot, "kit.cmd"), kitCmd);
762
+ fs.writeFileSync(path.join(projectRoot, "kit"), kitSh, { mode: 0o755 });
763
+
764
+ if (installAutoLearn) {
765
+ // Create agent wrappers only if AutoLearn enabled
766
+ const agentCmd = `@echo off\nnode "%~dp0node_modules\\add-skill-kit\\lib\\agent-cli\\bin\\agent.js" %*`;
767
+ const agentSh = `#!/bin/sh\nnode "$(dirname "$0")/node_modules/add-skill-kit/lib/agent-cli/bin/agent.js" "$@"`;
768
+ fs.writeFileSync(path.join(projectRoot, "agent.cmd"), agentCmd);
769
+ fs.writeFileSync(path.join(projectRoot, "agent"), agentSh, { mode: 0o755 });
770
+
771
+ step(c.green("✓ Created wrapper scripts: agent, kit"));
772
+ step(c.dim("Run directly: ./agent or ./kit (Unix) | agent or kit (Windows)"));
773
+ } else {
774
+ step(c.green("✓ Created wrapper script: kit"));
775
+ step(c.dim("Run directly: ./kit (Unix) | kit (Windows)"));
776
+ }
777
+ } catch (wrapperErr) {
778
+ step(c.dim("Run: npx kit"));
779
+ }
674
780
  } catch (e) {
675
781
  cliSpinner.stop(c.yellow("Local CLI installation skipped"));
676
782
  step(c.dim(`Run manually: npm i -D ${cliPackage}`));
677
783
  }
678
784
  }
679
785
 
786
+ // Run npm install to ensure all skill dependencies are available
787
+ stepLine();
788
+ const depsSpinner = spinner();
789
+ depsSpinner.start("Installing skill dependencies (csv-parse, etc.)");
790
+ try {
791
+ await execAsync("npm install", { timeout: 120000 });
792
+ depsSpinner.stop("Skill dependencies installed");
793
+ } catch (e) {
794
+ depsSpinner.stop(c.yellow("Dependencies installation skipped"));
795
+ step(c.dim("Run manually: npm install"));
796
+ }
797
+
798
+ // Python dependencies no longer needed - all scripts migrated to JS
799
+
680
800
  stepLine();
681
801
  console.log(` ${c.cyan("Done!")}`);
682
802
  console.log();
package/bin/lib/ui.js CHANGED
@@ -177,7 +177,7 @@ export function brandedIntro(version, status = "") {
177
177
  // Last line: gradient ASCII + dim version (aligned at bottom)
178
178
  const lastLine = bannerLines[bannerLines.length - 1];
179
179
  console.log(pikaGradient(lastLine) + ` ${c.dim(`v${version}`)}`);
180
- console.log(''); // Empty line after banner
180
+
181
181
 
182
182
  if (status) {
183
183
  console.log(`${c.dim(status)}`);