-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.ps1
More file actions
289 lines (245 loc) · 8.43 KB
/
install.ps1
File metadata and controls
289 lines (245 loc) · 8.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# ============================================================
# 🧠 Skill Creator Ultra — One-Click Installer (Windows)
# Supports: Antigravity, Claude Code, Cursor, Windsurf,
# Cline, GitHub Copilot, OpenClaw
# ============================================================
$ErrorActionPreference = "Stop"
$REPO_URL = "https://github.com/marketingjuliancongdanh79-pixel/skill-generator.git"
$SKILL_NAME = "skill-creator-ultra"
$TMP_DIR = "$env:TEMP\$SKILL_NAME-install"
$VERSION = "1.1.0"
function Write-Header {
Write-Host ""
Write-Host "🧠 Skill Creator Ultra v$VERSION — Installer" -ForegroundColor Cyan
Write-Host ("═" * 48) -ForegroundColor Cyan
Write-Host ""
}
function Write-Success { param($msg) Write-Host "✅ $msg" -ForegroundColor Green }
function Write-Error2 { param($msg) Write-Host "❌ $msg" -ForegroundColor Red }
function Write-Info { param($msg) Write-Host "ℹ️ $msg" -ForegroundColor Blue }
function Test-GitInstalled {
try { git --version | Out-Null; return $true }
catch {
Write-Error2 "Git is not installed. Download from https://git-scm.com"
return $false
}
}
function Get-Repo {
if (Test-Path $TMP_DIR) {
Write-Info "Updating existing download..."
Push-Location $TMP_DIR
git pull --quiet 2>$null
Pop-Location
} else {
Write-Info "Downloading Skill Creator Ultra..."
git clone --quiet $REPO_URL $TMP_DIR 2>$null
}
}
function Install-To {
param($TargetDir, $PlatformName)
$parentDir = Split-Path $TargetDir -Parent
if (-not (Test-Path $parentDir)) {
New-Item -ItemType Directory -Path $parentDir -Force | Out-Null
}
if (Test-Path $TargetDir) {
Write-Info "Removing old installation..."
Remove-Item $TargetDir -Recurse -Force
}
Copy-Item $TMP_DIR $TargetDir -Recurse
Remove-Item "$TargetDir\.git" -Recurse -Force -ErrorAction SilentlyContinue
Write-Success "Installed to: $TargetDir"
}
# Bridge/Rule file creators
function New-ClaudeBridge {
$claudeMd = "CLAUDE.md"
$bridge = @"
## Skill Creator Ultra
When user asks to "create skill", "turn workflow into skill", or "automate this":
- Read ``.claude/commands/$SKILL_NAME/SKILL.md``
- Follow the 8 Phase pipeline
- Reference resources/ for templates and best practices
"@
if (Test-Path $claudeMd) {
$content = Get-Content $claudeMd -Raw
if ($content -notmatch "Skill Creator Ultra") {
Add-Content $claudeMd $bridge
Write-Success "Appended bridge to existing CLAUDE.md"
} else {
Write-Info "CLAUDE.md already has Skill Creator Ultra bridge"
}
} else {
Set-Content $claudeMd $bridge
Write-Success "Created CLAUDE.md with bridge"
}
}
function New-CursorRule {
$rulesDir = ".cursor\rules"
New-Item -ItemType Directory -Path $rulesDir -Force | Out-Null
$rule = @"
---
description: Create AI Skills from ideas or workflows using 8-phase pipeline
globs:
alwaysApply: false
---
When user requests "create skill", "turn workflow into skill", or "automate":
- Read ``.cursor/rules/skill-creator-ultra/SKILL.md``
- Follow 8 Phase pipeline
- Reference resources/ for templates and best practices
"@
Set-Content "$rulesDir\$SKILL_NAME.mdc" $rule
Write-Success "Created Cursor rule file"
}
function New-WindsurfRule {
$rulesDir = ".windsurf\rules"
New-Item -ItemType Directory -Path $rulesDir -Force | Out-Null
$rule = @"
---
trigger: manual
description: Create AI Skills from ideas or workflows using 8-phase pipeline
---
When user requests "create skill", "turn workflow into skill", or "automate":
- Read ``.windsurf/rules/skill-creator-ultra/SKILL.md``
- Follow 8 Phase pipeline
"@
Set-Content "$rulesDir\$SKILL_NAME.md" $rule
Write-Success "Created Windsurf rule file"
}
function New-CopilotInstructions {
$githubDir = ".github"
New-Item -ItemType Directory -Path $githubDir -Force | Out-Null
$instructions = "$githubDir\copilot-instructions.md"
$text = @"
## Skill Creator Ultra
When user requests "create skill" or "automate this":
- Read ``.github/$SKILL_NAME/SKILL.md``
- Follow 8 Phase pipeline
"@
if (Test-Path $instructions) {
$content = Get-Content $instructions -Raw
if ($content -notmatch "Skill Creator Ultra") {
Add-Content $instructions $text
Write-Success "Appended to copilot-instructions.md"
} else {
Write-Info "copilot-instructions.md already configured"
}
} else {
Set-Content $instructions $text
Write-Success "Created copilot-instructions.md"
}
}
# Platform installers
function Install-AntigravityGlobal {
$target = "$env:USERPROFILE\.gemini\antigravity\skills\$SKILL_NAME"
Install-To $target "Antigravity (Global)"
Write-Host ""
Write-Info "Open a new Antigravity chat and say: 'tạo skill mới'"
}
function Install-AntigravityWorkspace {
$target = ".agent\skills\$SKILL_NAME"
Install-To $target "Antigravity (Workspace)"
Write-Host ""
Write-Info "Open a new Antigravity chat and say: 'tạo skill mới'"
}
function Install-ClaudeCode {
$target = "$env:USERPROFILE\.claude\commands\$SKILL_NAME"
Install-To $target "Claude Code (Global)"
New-ClaudeBridge
}
function Install-Cursor {
$target = ".cursor\rules\$SKILL_NAME"
Install-To $target "Cursor"
New-CursorRule
}
function Install-Windsurf {
$target = ".windsurf\rules\$SKILL_NAME"
Install-To $target "Windsurf"
New-WindsurfRule
}
function Install-Cline {
$target = ".clinerules\$SKILL_NAME"
Install-To $target "Cline"
Write-Host ""
Write-Info "Add to Cline Settings → Custom Instructions:"
Write-Host ' When user requests "create skill" or "automate":'
Write-Host " - Read .clinerules/$SKILL_NAME/SKILL.md"
Write-Host " - Follow 8 Phase pipeline"
}
function Install-Copilot {
$target = ".github\$SKILL_NAME"
Install-To $target "GitHub Copilot"
New-CopilotInstructions
}
function Install-OpenClaw {
Write-Host ""
Write-Info "OpenClaw uses System Prompt — cannot auto-install."
Write-Host ""
Write-Host " Manual steps:"
Write-Host " 1. Open SKILL.md from: $TMP_DIR\SKILL.md"
Write-Host " 2. Copy contents into your Agent's System Prompt"
Write-Host " 3. Optionally upload resources/ to knowledge base"
Write-Host ""
Write-Success "Files downloaded to: $TMP_DIR"
}
function Install-All {
Install-AntigravityGlobal; Write-Host ""
Install-ClaudeCode; Write-Host ""
Install-Cursor; Write-Host ""
Install-Windsurf; Write-Host ""
Install-Cline; Write-Host ""
Install-Copilot; Write-Host ""
Install-OpenClaw
}
# Menu
function Show-Menu {
Write-Host " 1) 🟢 Google Antigravity (Global — all projects)" -ForegroundColor Green
Write-Host " 2) 🟢 Google Antigravity (Workspace — this project)" -ForegroundColor Green
Write-Host " 3) 🟣 Claude Code" -ForegroundColor Magenta
Write-Host " 4) 🔵 Cursor" -ForegroundColor Blue
Write-Host " 5) 🟠 Windsurf" -ForegroundColor Yellow
Write-Host " 6) 🟤 Cline" -ForegroundColor DarkYellow
Write-Host " 7) ⚫ GitHub Copilot"
Write-Host " 8) 🐾 OpenClaw"
Write-Host " 9) 📦 Install ALL platforms" -ForegroundColor Cyan
Write-Host " 0) ❌ Exit"
Write-Host ""
$choice = Read-Host "Choose platform (0-9)"
return $choice
}
# Main
function Main {
param($DirectChoice)
Write-Header
if (-not (Test-GitInstalled)) { exit 1 }
if ($DirectChoice) {
$choice = $DirectChoice
} else {
$choice = Show-Menu
}
Write-Host ""
Get-Repo
Write-Host ""
switch ($choice) {
"1" { Install-AntigravityGlobal }
"2" { Install-AntigravityWorkspace }
"3" { Install-ClaudeCode }
"4" { Install-Cursor }
"5" { Install-Windsurf }
"6" { Install-Cline }
"7" { Install-Copilot }
"8" { Install-OpenClaw }
"9" { Install-All }
"0" { Write-Host "Bye!"; exit 0 }
default { Write-Error2 "Invalid choice"; exit 1 }
}
Write-Host ""
Write-Host ("═" * 48) -ForegroundColor Cyan
Write-Success "Skill Creator Ultra v$VERSION installed!"
Write-Host ("═" * 48) -ForegroundColor Cyan
Write-Host ""
}
# Run — support direct choice via argument
if ($args.Count -gt 0) {
Main -DirectChoice $args[0]
} else {
Main
}