# One-line Windows installer for wbot-chat-intel (no Node.js required) # Usage: irm https://raw.githubusercontent.com/yangdw2024/wbot-lab/main/scripts/install.ps1 | iex $ErrorActionPreference = 'Stop' $repo = 'yangdw2024/wbot-lab' $skillName = 'wbot-chat-intel' $zipUrl = "https://github.com/$repo/archive/refs/heads/main.zip" $tmp = Join-Path $env:TEMP ("install-" + $skillName + "-" + [guid]::NewGuid().ToString('N')) $zipPath = Join-Path $tmp 'repo.zip' try { New-Item -ItemType Directory -Path $tmp -Force | Out-Null Write-Host "Downloading $repo..." -ForegroundColor Cyan Invoke-WebRequest -Uri $zipUrl -OutFile $zipPath -UseBasicParsing Expand-Archive -Path $zipPath -DestinationPath $tmp -Force $srcRoot = (Get-ChildItem -Path $tmp -Directory | Select-Object -First 1).FullName $skillSrc = Join-Path $srcRoot 'skill\wbot-chat-intel' $candidates = @( @{ Root = (Join-Path $env:USERPROFILE '.dsh'); Dest = (Join-Path $env:USERPROFILE ".dsh\skills\$skillName") }, @{ Root = (Join-Path $env:USERPROFILE '.claude'); Dest = (Join-Path $env:USERPROFILE ".claude\skills\$skillName") }, @{ Root = (Join-Path $env:USERPROFILE '.codex'); Dest = (Join-Path $env:USERPROFILE ".codex\skills\$skillName") }, @{ Root = (Join-Path $env:USERPROFILE '.cursor'); Dest = (Join-Path $env:USERPROFILE ".cursor\skills\$skillName") }, @{ Root = (Join-Path $env:USERPROFILE '.agents'); Dest = (Join-Path $env:USERPROFILE ".agents\skills\$skillName") }, @{ Root = (Join-Path $env:USERPROFILE '.gemini\antigravity'); Dest = (Join-Path $env:USERPROFILE ".gemini\antigravity\skills\$skillName") } ) $targets = @($candidates | Where-Object { Test-Path $_.Root }) if ($targets.Count -eq 0) { $targets = @($candidates[0], $candidates[4]) } $items = @('SKILL.md', 'references', 'scripts') foreach ($t in $targets) { if (Test-Path $t.Dest) { Remove-Item -Recurse -Force $t.Dest } New-Item -ItemType Directory -Path $t.Dest -Force | Out-Null foreach ($item in $items) { $from = Join-Path $skillSrc $item if (Test-Path $from) { Copy-Item -Path $from -Destination (Join-Path $t.Dest $item) -Recurse -Force } } Write-Host "[ok] Installed $skillName -> $($t.Dest)" -ForegroundColor Green } Write-Host "`nDone! Open a new session in DSH / Claude Code / Codex / Cursor / Antigravity to use /$skillName." -ForegroundColor Cyan } finally { if (Test-Path $tmp) { Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue } }