# AgentMarket Agent Kit installer (Windows PowerShell) # Installs an OpenAPI-based agent book for Claude Code / Cursor-compatible agents. $ErrorActionPreference = "Stop" $BaseUrl = if ($env:AGENTMARKET_URL) { $env:AGENTMARKET_URL.TrimEnd('/') } else { "https://agents-marketplace.onesolo.app" } $SkillName = "agentmarket-openapi" $ZipUrl = "$BaseUrl/api/agent-kit" $Tmp = Join-Path $env:TEMP ("agentmarket-kit-" + [guid]::NewGuid().ToString()) New-Item -ItemType Directory -Path $Tmp | Out-Null try { Write-Host "==> AgentMarket Agent Kit" Write-Host " Base: $BaseUrl" $ZipPath = Join-Path $Tmp "kit.zip" Invoke-WebRequest -Uri $ZipUrl -OutFile $ZipPath -UseBasicParsing $OutDir = Join-Path $Tmp "out" Expand-Archive -Path $ZipPath -DestinationPath $OutDir -Force $Src = Join-Path $OutDir $SkillName if (-not (Test-Path (Join-Path $Src "SKILL.md"))) { throw "Invalid kit: SKILL.md missing" } function Install-Into([string]$Dest) { $Parent = Split-Path -Parent $Dest if (-not (Test-Path $Parent)) { New-Item -ItemType Directory -Path $Parent | Out-Null } if (Test-Path $Dest) { Remove-Item -Recurse -Force $Dest } Copy-Item -Recurse -Force $Src $Dest Write-Host " Installed: $Dest" } Install-Into (Join-Path $env:USERPROFILE ".claude\skills\$SkillName") Install-Into (Join-Path $env:USERPROFILE ".cursor\skills\$SkillName") Write-Host "==> Done. Restart your agent session to load: $SkillName" Write-Host " OpenAPI: $BaseUrl/api/openapi?format=yaml" } finally { Remove-Item -Recurse -Force $Tmp -ErrorAction SilentlyContinue }