[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C1K0JV7DPFYECWXW3D3THS":3,"skill-same:01M7C1K0JV7DPFYECWXW3D3THS":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7C1K0JV7DPFYECWXW3D3THS","windows-vm",null,"Create, manage, or connect to a headless Windows 11 VM running in Docker with SSH access. Use when the user wants to spin up, stop, restart, or SSH into a Windows VM.","zak-keown\u002Fmoe","zak-keown","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F320717241?v=4","01M7BZFXME0NW6TQX0H7AZM2KS","01M7BZFXN32VR0JN5AATRD53H4",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fwindows-vm\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: windows-vm\ndescription: Create, manage, or connect to a headless Windows 11 VM running in Docker with SSH access. Use when the user wants to spin up, stop, restart, or SSH into a Windows VM.\nargument-hint: \"[create|start|stop|restart|ssh|status]\"\nallowed-tools: Bash, Read, Write\n---\n\n# Headless Windows 11 VM\n\nManage a headless Windows 11 VM running via [dockur\u002Fwindows](https:\u002F\u002Fgithub.com\u002Fdockur\u002Fwindows) in Docker with KVM acceleration. The VM is accessible via SSH only — no RDP or GUI required.\n\n## Host prerequisites\n\n- Docker\n- KVM support (`\u002Fdev\u002Fkvm` must exist — check with `ls \u002Fdev\u002Fkvm`)\n- `sshpass` (`sudo apt install sshpass`)\n- `imagemagick` (optional, for screenshot debugging: `sudo apt install imagemagick`)\n\n## Configuration\n\n- **Container name**: `windows11`\n- **VM directory**: `$HOME\u002Fwindows-vm\u002F`\n  - `storage\u002F` — VM disk image (managed by dockur, wiped on recreate)\n  - `iso\u002Fwin11x64.iso` — cached Windows ISO (7.3GB, persists across recreates)\n  - `oem\u002Finstall.bat` — post-install script (installs OpenSSH Server)\n- **Credentials**: user \u002F password\n- **SSH**: `localhost:2222` (bound to 127.0.0.1 only)\n- **RDP**: `localhost:3389` (bound to 127.0.0.1 only, fallback)\n- **Web console**: `localhost:8006` (VNC in browser, for debugging)\n- **Resources**: 8GB RAM, 4 CPU cores, 64GB disk\n\n## Actions\n\n### create — First-time setup or full recreate\n\n1. Ensure directories exist:\n   ```bash\n   mkdir -p \"$HOME\u002Fwindows-vm\u002Foem\" \"$HOME\u002Fwindows-vm\u002Fstorage\" \"$HOME\u002Fwindows-vm\u002Fiso\"\n   ```\n\n2. Ensure `$HOME\u002Fwindows-vm\u002Foem\u002Finstall.bat` exists with OpenSSH setup:\n   ```bat\n   @echo off\n   echo Installing OpenSSH Server...\n   powershell -Command \"Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0\" 2>nul\n   powershell -Command \"Get-WindowsCapability -Online -Name OpenSSH.Server* | Add-WindowsCapability -Online\" 2>nul\n   dism \u002FOnline \u002FAdd-Capability \u002FCapabilityName:OpenSSH.Server~~~~0.0.1.0 2>nul\n   powershell -Command \"Start-Service sshd\" 2>nul\n   powershell -Command \"Set-Service -Name sshd -StartupType Automatic\"\n   powershell -Command \"New-ItemProperty -Path 'HKLM:\\SOFTWARE\\OpenSSH' -Name DefaultShell -Value 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe' -PropertyType String -Force\"\n   powershell -Command \"New-NetFirewallRule -Name 'OpenSSH-Server' -DisplayName 'OpenSSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22\"\n   powershell -Command \"Get-Service sshd\" 2>nul\n   echo Done.\n   ```\n\n3. If recreating, remove the old container and disk:\n   ```bash\n   docker stop windows11 && docker rm windows11\n   rm -f \"$HOME\u002Fwindows-vm\u002Fstorage\u002Fdata.img\"\n   ```\n\n4. Launch the container. There are two cases:\n\n   **If cached ISO exists** (`$HOME\u002Fwindows-vm\u002Fiso\u002Fwin11x64.iso`):\n   ```bash\n   docker run -d \\\n     --name windows11 \\\n     -p 127.0.0.1:3389:3389 \\\n     -p 127.0.0.1:2222:22 \\\n     -p 127.0.0.1:8006:8006 \\\n     -e RAM_SIZE=\"8G\" \\\n     -e CPU_CORES=\"4\" \\\n     -e DISK_SIZE=\"64G\" \\\n     -e USERNAME=\"user\" \\\n     -e PASSWORD=\"password\" \\\n     --cap-add NET_ADMIN \\\n     --device \u002Fdev\u002Fkvm \\\n     -v \"$HOME\u002Fwindows-vm\u002Fstorage:\u002Fstorage\" \\\n     -v \"$HOME\u002Fwindows-vm\u002Foem:\u002Foem\" \\\n     -v \"$HOME\u002Fwindows-vm\u002Fiso\u002Fwin11x64.iso:\u002Fboot.iso\" \\\n     dockurr\u002Fwindows\n   ```\n\n   **First time (no cached ISO)** — omit the `\u002Fboot.iso` mount and add `VERSION`:\n   ```bash\n   docker run -d \\\n     --name windows11 \\\n     -p 127.0.0.1:3389:3389 \\\n     -p 127.0.0.1:2222:22 \\\n     -p 127.0.0.1:8006:8006 \\\n     -e RAM_SIZE=\"8G\" \\\n     -e CPU_CORES=\"4\" \\\n     -e DISK_SIZE=\"64G\" \\\n     -e VERSION=\"win11\" \\\n     -e USERNAME=\"user\" \\\n     -e PASSWORD=\"password\" \\\n     --cap-add NET_ADMIN \\\n     --device \u002Fdev\u002Fkvm \\\n     -v \"$HOME\u002Fwindows-vm\u002Fstorage:\u002Fstorage\" \\\n     -v \"$HOME\u002Fwindows-vm\u002Foem:\u002Foem\" \\\n     dockurr\u002Fwindows\n   ```\n   After the ISO downloads and Windows boots, **immediately** copy the ISO out before\n   the container is ever stopped (dockur wipes `\u002Fstorage` on recreate):\n   ```bash\n   cp \"$HOME\u002Fwindows-vm\u002Fstorage\u002Fwin11x64.iso\" \"$HOME\u002Fwindows-vm\u002Fiso\u002Fwin11x64.iso\"\n   ```\n\n5. Wait for Windows install + OpenSSH setup to complete. This takes **20-30 minutes** for a\n   fresh install (the OEM install.bat runs at the end of Windows OOBE and downloads OpenSSH\n   from Microsoft, which is slow). Monitor with:\n   ```bash\n   docker logs -f windows11\n   ```\n   You can also watch the VM screen via the web console at `http:\u002F\u002Flocalhost:8006`.\n\n   To check if SSH is up:\n   ```bash\n   sshpass -p 'password' ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 -p 2222 user@localhost \"whoami\"\n   ```\n\n6. Once SSH is responding, install Node.js and Claude Code by piping a setup script via stdin\n   (avoids PowerShell escaping hell over SSH):\n   ```bash\n   cat \u003C\u003C 'PS' | sshpass -p 'password' ssh -o StrictHostKeyChecking=no -p 2222 user@localhost \"powershell -ExecutionPolicy Bypass -Command -\"\n   # Download and install Node.js silently\n   Invoke-WebRequest -Uri 'https:\u002F\u002Fnodejs.org\u002Fdist\u002Fv22.14.0\u002Fnode-v22.14.0-x64.msi' -OutFile 'C:\\Users\\user\\node-install.msi'\n   Start-Process msiexec.exe -ArgumentList '\u002Fi C:\\Users\\user\\node-install.msi \u002Fqn \u002Fnorestart' -Wait -Verb RunAs\n   Write-Host \"Node.js installed\"\n\n   # Install Claude Code globally\n   & 'C:\\Program Files\\nodejs\\npm.cmd' install -g @anthropic-ai\u002Fclaude-code\n   Write-Host \"Claude Code installed\"\n\n   # Add npm global bin to SYSTEM PATH (user PATH is not read by sshd)\n   $systemPath = [Environment]::GetEnvironmentVariable('Path', 'Machine')\n   $additions = @()\n   if ($systemPath -notlike '*AppData*npm*') { $additions += 'C:\\Users\\user\\AppData\\Roaming\\npm' }\n   if ($systemPath -notlike '*Git\\cmd*') { $additions += 'C:\\Program Files\\Git\\cmd' }\n   if ($additions.Count -gt 0) {\n       [Environment]::SetEnvironmentVariable('Path', $systemPath + ';' + ($additions -join ';'), 'Machine')\n       Write-Host \"Added to system PATH: $($additions -join ', ')\"\n   }\n\n   # Set execution policy machine-wide (required for claude.ps1)\n   Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force -ErrorAction SilentlyContinue\n\n   # Create system-wide PowerShell profile that rebuilds PATH from registry on login.\n   # Without this, interactive SSH sessions don't pick up the full system PATH.\n   $profileDir = Split-Path $PROFILE.AllUsersAllHosts\n   if (-not (Test-Path $profileDir)) { New-Item -ItemType Directory -Path $profileDir -Force }\n   @'\n   $machinePath = [Environment]::GetEnvironmentVariable('Path', 'Machine')\n   $userPath = [Environment]::GetEnvironmentVariable('Path', 'User')\n   $env:Path = \"$machinePath;$userPath\"\n   '@ | Set-Content -Path $PROFILE.AllUsersAllHosts -Force\n   Write-Host \"PowerShell profile created\"\n\n   # Restart sshd so it picks up the new PATH\n   Restart-Service sshd -Force\n   PS\n   ```\n   Note: the connection will drop when sshd restarts — that's expected.\n\n7. Clear the stale host key (new VM = new host key) and verify:\n   ```bash\n   ssh-keygen -f ~\u002F.ssh\u002Fknown_hosts -R '[localhost]:2222'\n   sshpass -p 'password' ssh -o StrictHostKeyChecking=no -p 2222 user@localhost \"claude --version\"\n   ```\n\n### start — Start a stopped VM\n```bash\ndocker start windows11\n```\n\n### stop — Stop the VM\n```bash\ndocker stop windows11\n```\n\n### restart — Restart the VM\n```bash\ndocker restart windows11\n```\n\n### status — Check VM status\n```bash\ndocker ps -f name=windows11 --format \"table {{.Status}}\\t{{.Ports}}\"\ndocker logs windows11 2>&1 | tail -5\n```\n\n### ssh — Connect to the VM\n```bash\nssh -p 2222 user@localhost\n```\n\n### screenshot — See what's on the VM screen (for debugging)\n```bash\ndocker exec windows11 bash -c \"echo 'screendump \u002Ftmp\u002Fscreen.ppm' | nc -w 2 localhost 7100\" > \u002Fdev\u002Fnull 2>&1\nsleep 1\ndocker cp windows11:\u002Ftmp\u002Fscreen.ppm \u002Ftmp\u002Fscreen.ppm\nconvert \u002Ftmp\u002Fscreen.ppm \u002Ftmp\u002Fscreen.png\n```\n\n## Important Notes\n\n- **ISO caching**: The `\u002Fstorage` volume is managed by dockur and gets wiped on recreate. Store the ISO separately in `$HOME\u002Fwindows-vm\u002Fiso\u002F` and mount it as `\u002Fboot.iso` to skip the 7.3GB download.\n- **`--cap-add NET_ADMIN`** is required for port forwarding to work. Without it, QEMU falls back to user-mode networking and port forwarding silently fails.\n- **`--device \u002Fdev\u002Fkvm`** is required for hardware acceleration.\n- **Boot time**: Fresh install takes 20-30 min (Windows install + OpenSSH download from Microsoft). Subsequent boots from existing `data.img` are fast (~2 min).\n- Ports are bound to `127.0.0.1` only — not exposed to the network.\n- Do NOT use `-e VERSION=\"win11\"` when mounting `\u002Fboot.iso` — the version is auto-detected from the ISO.\n\n## Post-install gotchas\n\n- **Node.js is not pre-installed** — the Claude Code install script (`irm https:\u002F\u002Fclaude.ai\u002Finstall.ps1 | iex`) will report success but `claude` won't work without Node. Install Node.js via MSI first.\n- **npm global bin not in PATH** — Node's MSI adds `C:\\Program Files\\nodejs` to PATH but not `C:\\Users\\user\\AppData\\Roaming\\npm` (where `npm install -g` puts binaries). Must add it to the **system** PATH (not user PATH) because OpenSSH's sshd only reads system PATH. After changing system PATH, restart sshd.\n- **PowerShell execution policy** — Default policy is `Restricted`, which blocks `claude.ps1`. Must set to `RemoteSigned` at **LocalMachine** scope (not CurrentUser) for it to take effect in SSH sessions.\n- **Escaping hell** — Running PowerShell commands over SSH with nested quotes is unreliable. Pipe scripts via stdin using `powershell -ExecutionPolicy Bypass -Command -` instead.\n- **Interactive SSH sessions don't get full PATH** — Windows OpenSSH sshd doesn't properly propagate the system PATH to interactive PowerShell sessions. Fix: create a system-wide PowerShell profile (`$PROFILE.AllUsersAllHosts`) that rebuilds `$env:Path` from the registry on every login.\n- **winget may not work** — The Microsoft Store certificate can fail in a VM. Use direct MSI\u002Finstaller downloads instead.\n- **Host key changes** — Each recreated VM gets new SSH host keys. Run `ssh-keygen -R '[localhost]:2222'` to clear the old one.\n","# Headless Windows 11 VM\n\nManage a headless Windows 11 VM running via [dockur\u002Fwindows](https:\u002F\u002Fgithub.com\u002Fdockur\u002Fwindows) in Docker with KVM acceleration. The VM is accessible via SSH only — no RDP or GUI required.\n\n## Host prerequisites\n\n- Docker\n- KVM support (`\u002Fdev\u002Fkvm` must exist — check with `ls \u002Fdev\u002Fkvm`)\n- `sshpass` (`sudo apt install sshpass`)\n- `imagemagick` (optional, for screenshot debugging: `sudo apt install imagemagick`)\n\n## Configuration\n\n- **Container name**: `windows11`\n- **VM directory**: `$HOME\u002Fwindows-vm\u002F`\n  - `storage\u002F` — VM disk image (managed by dockur, wiped on recreate)\n  - `iso\u002Fwin11x64.iso` — cached Windows ISO (7.3GB, persists across recreates)\n  - `oem\u002Finstall.bat` — post-install script (installs OpenSSH Server)\n- **Credentials**: user \u002F password\n- **SSH**: `localhost:2222` (bound to 127.0.0.1 only)\n- **RDP**: `localhost:3389` (bound to 127.0.0.1 only, fallback)\n- **Web console**: `localhost:8006` (VNC in browser, for debugging)\n- **Resources**: 8GB RAM, 4 CPU cores, 64GB disk\n\n## Actions\n\n### create — First-time setup or full recreate\n\n1. Ensure directories exist:\n   ```bash\n   mkdir -p \"$HOME\u002Fwindows-vm\u002Foem\" \"$HOME\u002Fwindows-vm\u002Fstorage\" \"$HOME\u002Fwindows-vm\u002Fiso\"\n   ```\n\n2. Ensure `$HOME\u002Fwindows-vm\u002Foem\u002Finstall.bat` exists with OpenSSH setup:\n   ```bat\n   @echo off\n   echo Installing OpenSSH Server...\n   powershell -Command \"Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0\" 2>nul\n   powershell -Command \"Get-WindowsCapability -Online -Name OpenSSH.Server* | Add-WindowsCapability -Online\" 2>nul\n   dism \u002FOnline \u002FAdd-Capability \u002FCapabilityName:OpenSSH.Server~~~~0.0.1.0 2>nul\n   powershell -Command \"Start-Service sshd\" 2>nul\n   powershell -Command \"Set-Service -Name sshd -StartupType Automatic\"\n   powershell -Command \"New-ItemProperty -Path 'HKLM:\\SOFTWARE\\OpenSSH' -Name DefaultShell -Value 'C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe' -PropertyType String -Force\"\n   powershell -Command \"New-NetFirewallRule -Name 'OpenSSH-Server' -DisplayName 'OpenSSH Server' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22\"\n   powershell -Command \"Get-Service sshd\" 2>nul\n   echo Done.\n   ```\n\n3. If recreating, remove the old container and disk:\n   ```bash\n   docker stop windows11 && docker rm windows11\n   rm -f \"$HOME\u002Fwindows-vm\u002Fstorage\u002Fdata.img\"\n   ```\n\n4. Launch the container. There are two cases:\n\n   **If cached ISO exists** (`$HOME\u002Fwindows-vm\u002Fiso\u002Fwin11x64.iso`):\n   ```bash\n   docker run -d \\\n     --name windows11 \\\n     -p 127.0.0.1:3389:3389 \\\n     -p 127.0.0.1:2222:22 \\\n     -p 127.0.0.1:8006:8006 \\\n     -e RAM_SIZE=\"8G\" \\\n     -e CPU_CORES=\"4\" \\\n     -e DISK_SIZE=\"64G\" \\\n     -e USERNAME=\"user\" \\\n     -e PASSWORD=\"password\" \\\n     --cap-add NET_ADMIN \\\n     --device \u002Fdev\u002Fkvm \\\n     -v \"$HOME\u002Fwindows-vm\u002Fstorage:\u002Fstorage\" \\\n     -v \"$HOME\u002Fwindows-vm\u002Foem:\u002Foem\" \\\n     -v \"$HOME\u002Fwindows-vm\u002Fiso\u002Fwin11x64.iso:\u002Fboot.iso\" \\\n     dockurr\u002Fwindows\n   ```\n\n   **First time (no cached ISO)** — omit the `\u002Fboot.iso` mount and add `VERSION`:\n   ```bash\n   docker run -d \\\n     --name windows11 \\\n     -p 127.0.0.1:3389:3389 \\\n     -p 127.0.0.1:2222:22 \\\n     -p 127.0.0.1:8006:8006 \\\n     -e RAM_SIZE=\"8G\" \\\n     -e CPU_CORES=\"4\" \\\n     -e DISK_SIZE=\"64G\" \\\n     -e VERSION=\"win11\" \\\n     -e USERNAME=\"user\" \\\n     -e PASSWORD=\"password\" \\\n     --cap-add NET_ADMIN \\\n     --device \u002Fdev\u002Fkvm \\\n     -v \"$HOME\u002Fwindows-vm\u002Fstorage:\u002Fstorage\" \\\n     -v \"$HOME\u002Fwindows-vm\u002Foem:\u002Foem\" \\\n     dockurr\u002Fwindows\n   ```\n   After the ISO downloads and Windows boots, **immediately** copy the ISO out before\n   the container is ever stopped (dockur wipes `\u002Fstorage` on recreate):\n   ```bash\n   cp \"$HOME\u002Fwindows-vm\u002Fstorage\u002Fwin11x64.iso\" \"$HOME\u002Fwindows-vm\u002Fiso\u002Fwin11x64.iso\"\n   ```\n\n5. Wait for Windows install + OpenSSH setup to complete. This takes **20-30 minutes** for a\n   fresh install (the OEM install.bat runs at the end of Windows OOBE and downloads OpenSSH\n   from Microsoft, which is slow). Monitor with:\n   ```bash\n   docker logs -f windows11\n   ```\n   You can also watch the VM screen via the web console at `http:\u002F\u002Flocalhost:8006`.\n\n   To check if SSH is up:\n   ```bash\n   sshpass -p 'password' ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 -p 2222 user@localhost \"whoami\"\n   ```\n\n6. Once SSH is responding, install Node.js and Claude Code by piping a setup script via stdin\n   (avoids PowerShell escaping hell over SSH):\n   ```bash\n   cat \u003C\u003C 'PS' | sshpass -p 'password' ssh -o StrictHostKeyChecking=no -p 2222 user@localhost \"powershell -ExecutionPolicy Bypass -Command -\"\n   # Download and install Node.js silently\n   Invoke-WebRequest -Uri 'https:\u002F\u002Fnodejs.org\u002Fdist\u002Fv22.14.0\u002Fnode-v22.14.0-x64.msi' -OutFile 'C:\\Users\\user\\node-install.msi'\n   Start-Process msiexec.exe -ArgumentList '\u002Fi C:\\Users\\user\\node-install.msi \u002Fqn \u002Fnorestart' -Wait -Verb RunAs\n   Write-Host \"Node.js installed\"\n\n   # Install Claude Code globally\n   & 'C:\\Program Files\\nodejs\\npm.cmd' install -g @anthropic-ai\u002Fclaude-code\n   Write-Host \"Claude Code installed\"\n\n   # Add npm global bin to SYSTEM PATH (user PATH is not read by sshd)\n   $systemPath = [Environment]::GetEnvironmentVariable('Path', 'Machine')\n   $additions = @()\n   if ($systemPath -notlike '*AppData*npm*') { $additions += 'C:\\Users\\user\\AppData\\Roaming\\npm' }\n   if ($systemPath -notlike '*Git\\cmd*') { $additions += 'C:\\Program Files\\Git\\cmd' }\n   if ($additions.Count -gt 0) {\n       [Environment]::SetEnvironmentVariable('Path', $systemPath + ';' + ($additions -join ';'), 'Machine')\n       Write-Host \"Added to system PATH: $($additions -join ', ')\"\n   }\n\n   # Set execution policy machine-wide (required for claude.ps1)\n   Set-ExecutionPolicy RemoteSigned -Scope LocalMachine -Force -ErrorAction SilentlyContinue\n\n   # Create system-wide PowerShell profile that rebuilds PATH from registry on login.\n   # Without this, interactive SSH sessions don't pick up the full system PATH.\n   $profileDir = Split-Path $PROFILE.AllUsersAllHosts\n   if (-not (Test-Path $profileDir)) { New-Item -ItemType Directory -Path $profileDir -Force }\n   @'\n   $machinePath = [Environment]::GetEnvironmentVariable('Path', 'Machine')\n   $userPath = [Environment]::GetEnvironmentVariable('Path', 'User')\n   $env:Path = \"$machinePath;$userPath\"\n   '@ | Set-Content -Path $PROFILE.AllUsersAllHosts -Force\n   Write-Host \"PowerShell profile created\"\n\n   # Restart sshd so it picks up the new PATH\n   Restart-Service sshd -Force\n   PS\n   ```\n   Note: the connection will drop when sshd restarts — that's expected.\n\n7. Clear the stale host key (new VM = new host key) and verify:\n   ```bash\n   ssh-keygen -f ~\u002F.ssh\u002Fknown_hosts -R '[localhost]:2222'\n   sshpass -p 'password' ssh -o StrictHostKeyChecking=no -p 2222 user@localhost \"claude --version\"\n   ```\n\n### start — Start a stopped VM\n```bash\ndocker start windows11\n```\n\n### stop — Stop the VM\n```bash\ndocker stop windows11\n```\n\n### restart — Restart the VM\n```bash\ndocker restart windows11\n```\n\n### status — Check VM status\n```bash\ndocker ps -f name=windows11 --format \"table {{.Status}}\\t{{.Ports}}\"\ndocker logs windows11 2>&1 | tail -5\n```\n\n### ssh — Connect to the VM\n```bash\nssh -p 2222 user@localhost\n```\n\n### screenshot — See what's on the VM screen (for debugging)\n```bash\ndocker exec windows11 bash -c \"echo 'screendump \u002Ftmp\u002Fscreen.ppm' | nc -w 2 localhost 7100\" > \u002Fdev\u002Fnull 2>&1\nsleep 1\ndocker cp windows11:\u002Ftmp\u002Fscreen.ppm \u002Ftmp\u002Fscreen.ppm\nconvert \u002Ftmp\u002Fscreen.ppm \u002Ftmp\u002Fscreen.png\n```\n\n## Important Notes\n\n- **ISO caching**: The `\u002Fstorage` volume is managed by dockur and gets wiped on recreate. Store the ISO separately in `$HOME\u002Fwindows-vm\u002Fiso\u002F` and mount it as `\u002Fboot.iso` to skip the 7.3GB download.\n- **`--cap-add NET_ADMIN`** is required for port forwarding to work. Without it, QEMU falls back to user-mode networking and port forwarding silently fails.\n- **`--device \u002Fdev\u002Fkvm`** is required for hardware acceleration.\n- **Boot time**: Fresh install takes 20-30 min (Windows install + OpenSSH download from Microsoft). Subsequent boots from existing `data.img` are fast (~2 min).\n- Ports are bound to `127.0.0.1` only — not exposed to the network.\n- Do NOT use `-e VERSION=\"win11\"` when mounting `\u002Fboot.iso` — the version is auto-detected from the ISO.\n\n## Post-install gotchas\n\n- **Node.js is not pre-installed** — the Claude Code install script (`irm https:\u002F\u002Fclaude.ai\u002Finstall.ps1 | iex`) will report success but `claude` won't work without Node. Install Node.js via MSI first.\n- **npm global bin not in PATH** — Node's MSI adds `C:\\Program Files\\nodejs` to PATH but not `C:\\Users\\user\\AppData\\Roaming\\npm` (where `npm install -g` puts binaries). Must add it to the **system** PATH (not user PATH) because OpenSSH's sshd only reads system PATH. After changing system PATH, restart sshd.\n- **PowerShell execution policy** — Default policy is `Restricted`, which blocks `claude.ps1`. Must set to `RemoteSigned` at **LocalMachine** scope (not CurrentUser) for it to take effect in SSH sessions.\n- **Escaping hell** — Running PowerShell commands over SSH with nested quotes is unreliable. Pipe scripts via stdin using `powershell -ExecutionPolicy Bypass -Command -` instead.\n- **Interactive SSH sessions don't get full PATH** — Windows OpenSSH sshd doesn't properly propagate the system PATH to interactive PowerShell sessions. Fix: create a system-wide PowerShell profile (`$PROFILE.AllUsersAllHosts`) that rebuilds `$env:Path` from the registry on every login.\n- **winget may not work** — The Microsoft Store certificate can fail in a VM. Use direct MSI\u002Finstaller downloads instead.\n- **Host key changes** — Each recreated VM gets new SSH host keys. Run `ssh-keygen -R '[localhost]:2222'` to clear the old one.\n",{"name":5,"description":7,"allowed-tools":23,"argument-hint":24},"Bash, Read, Write","[create|start|stop|restart|ssh|status]","main","728894f3f85fbd4e788f015ddfd72bb6155d5dd5","plugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fwindows-vm",1,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe","https:\u002F\u002Fgithub.com\u002Fzak-keown","2026-09-05 06:29:06",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add zak-keown\u002Fmoe --skill windows-vm",{"tool":38,"command":39},"bunx","bunx skills add zak-keown\u002Fmoe --skill windows-vm",{"tool":41,"command":42},"pnpm","pnpm dlx skills add zak-keown\u002Fmoe --skill windows-vm","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002F.opencode\u002Fskills\u002Fwindows-vm\u002FSKILL.md",true,[],[47,54,61,68,73,80],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":18},"01M7C1Z5362Y8NVRZ69HWP0ZD0","write-skill","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-skill\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7C1YZ9966WK9R6ZRPCGWF3G","write-plan","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-plan\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7C1YMR4SJD7BPBBPXZCVGVH","write-clearly","Apply Strunk's timeless writing rules to ANY prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-clearly\u002FSKILL.md",[],[],{"skillNo":69,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7C1YH9805YSM0N20VQAVSXF","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwindows-vm\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7C1YD87SCNEJ2C9B8HFR2NQ","verify-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating MRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fverify-completion\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7C1YARDEHT0TJ9BRG30ZCF4","using-moe","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fusing-moe\u002FSKILL.md",[],[]]