Skip to content

borenchan/sdkmate / skills

安装并使用 sdkm(跨平台 SDK 版本管理器 CLI,单二进制、纯绿色)在用户机器上管理 Java/Node.js/Python/Maven/Go 等开发环境版本,以及配置 sdkm 自身(代理、缓存、超时、GitHub token、符号链接目录等 config.toml 项)。当用户机器上还没有 sdkm 时,按本 skill 的安装章节从 GitHub Release 下载最新版并初始化(含配套安装脚本 scripts/install.sh / scripts/install.ps1,可直接调用)。当 agent 需要为用户安装或切换/卸载 SDK 版本、遇到 sdkm 命令(sdkm init/install/uninstall/switch/use/list/current/config/self 及别名 i/rm/s/ls/c/u)、需要配置 Java/Node/Python/Maven/Go 版本、配置 sdkm 工具自身、或要注册自定义 SDK 时,务必先读本 skill。涵盖多作用域版本切换(全局/项目/临时)、模糊版本匹配、config.toml 配置、TUI 选择器按键、自定义 SDK 注册与已知限制。即使用户没明说"用 sdkm",只要意图是在用户机器上安装/管理本地 SDK 版本(装/切/卸/查 Java/Node/Python/Maven/Go)或调整 sdkm 的代理/缓存/token 等设置就应触发。

FileKindSize
SKILL.mdskill md27.0 KB
scripts/install.ps1script2.8 KB
scripts/install.shscript3.2 KB

scripts/install.ps1

View on GitHub
# sdkm 一键安装脚本(Windows PowerShell)
# 用法:powershell -ExecutionPolicy Bypass -File install.ps1 [-Dest 安装目录]   默认安装到 %USERPROFILE%\.sdkm
# 流程:拉取最新 release 资产 → 解压 → 初始化
# 注意:init/switch 需管理员权限(写注册表 + 创建符号链接),请用管理员终端运行
param(
    [string]$Dest = "$env:USERPROFILE\.sdkm"
)

$ErrorActionPreference = "Stop"

# ── 1. 平台校验(当前 release 仅 x64 Windows 产物)──
if (-not [Environment]::Is64BitOperatingSystem) {
    Write-Host "❌ 暂无 32 位 Windows 产物,请到 https://github.com/borenchan/sdkmate/releases 反馈" -ForegroundColor Red
    exit 1
}
$asset = "sdkm-windows-x86_64.zip"

# ── 2. 从 GitHub API 拿最新版资产下载地址 ──
$api = "https://api.github.com/repos/borenchan/sdkmate/releases/latest"
Write-Host "ℹ️  查询最新版本资产: $asset"
try {
    $release = Invoke-RestMethod -Uri $api -UseBasicParsing
} catch {
    Write-Host "❌ 无法访问 GitHub API(检查网络/代理): $_" -ForegroundColor Red
    exit 1
}
$downloadUrl = ($release.assets | Where-Object { $_.name -eq "$asset" }).browser_download_url
if (-not $downloadUrl) {
    Write-Host "❌ 未找到资产 $asset,请到 https://github.com/borenchan/sdkmate/releases 手动下载" -ForegroundColor Red
    exit 1
}

# ── 3. 下载并解压 ──
$tmp = Join-Path $env:TEMP ("sdkm_install_" + [guid]::NewGuid().ToString("N"))
New-Item -ItemType Directory -Force $tmp | Out-Null
$zipPath = Join-Path $tmp "sdkm.zip"
Write-Host "⬇️  下载 $downloadUrl"
Invoke-WebRequest -Uri $downloadUrl -OutFile $zipPath -UseBasicParsing
Expand-Archive -Path $zipPath -DestinationPath $tmp -Force   # 解压得 .sdkm\sdkm.exe

# ── 4. 安装到目标目录(已装则覆盖二进制,保留 store/ 与配置)──
New-Item -ItemType Directory -Force $Dest | Out-Null
if (Test-Path (Join-Path $Dest "config.toml")) {
    Copy-Item (Join-Path $tmp ".sdkm\sdkm.exe") $Dest -Force
    Write-Host "✅ 已覆盖二进制到 $Dest(原有 store/ 与 config.toml 保留)"
} else {
    Copy-Item (Join-Path $tmp ".sdkm\*") $Dest -Recurse -Force
    Write-Host "✅ 已安装到 $Dest"
}
Remove-Item $tmp -Recurse -Force -ErrorAction SilentlyContinue

# ── 5. 初始化 + PATH 提示 ──
$sdkmExe = Join-Path $Dest "sdkm.exe"
& $sdkmExe init
if ($LASTEXITCODE -ne 0) {
    Write-Host "⚠️  init 未完成(可稍后手动执行),安装目录: $Dest" -ForegroundColor Yellow
}
# init 已把安装目录注册进系统 PATH(注册表);当前会话即时生效需手动刷
if (-not (($env:Path -split ';') -contains $Dest)) {
    $env:Path = "$Dest;$env:Path"
}
Write-Host "🎉 安装完成: $(& $sdkmExe --version)"
Write-Host "👉 若新终端里 sdkm 不生效,请重开终端(注册表 PATH 已写入)"
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall