vm-lab
БесплатноЗапускает вложенные скриптыНе проверенParallels macOS VM lab: GUI automation, Peekaboo, TCC, Ghostty.
от steipete★ 7 577 звёзд на GitHubОб этом скилле
VM Lab
Use this when the task needs a clean macOS VM to test GUI automation, TCC prompts, screenshot capture, clicking, typing, performance, or "two-way validation" of Peekaboo-like tools.
Core idea: run the tool under test inside the guest, but verify it from outside the guest with Parallels screenshots and host-side observations. Do not close apps you do not own.
Safety Rules
- Only task-owned clones are disposable. Preserve source/golden snapshots, recovery VMs, and other tasks' VMs; never reset, revert, or delete their snapshots.
- Never access inherited guest credentials or bypass login/startup security to bootstrap a clone.
- Never print secrets. If
opis needed, follow the 1Password skill and run it only insidetmux. - Prefer fresh app windows you create yourself: TextEdit, a local HTML test page, or a small test app.
- Limit host writes to task-owned temporary diagnostics and explicitly authorized clone recovery. Never change global Bash/Codex settings for a lab workaround.
- For git repos inside the VM, use HTTPS remotes and normal branch discipline.
Bootstrap Preflight
Before guest automation, confirm the exact task-owned VM UUID and snapshot provenance; the names below are examples, not permission to operate an existing VM.
- Apple-VZ clone fails to boot: verify the active raw disk's contents, not just clone success or logical size. A sparse linked child alone does not prove a broken chain;
clone --unlinkcreates another clone, not an in-place repair. - Packaging hangs before its first output: inspect the task-owned shell process and heredoc redirection before changing product code or build guards. A system-Bash retry must also pin PATH-resolved child shells, for that invocation only.
Use Bootstrap diagnostics for read-only checks, evidence limits, and narrowly scoped recovery boundaries.
VM Discovery
List VMs:
prlctl list --all
Get VM status/IP:
prlctl list --info "macOS Tahoe"
Run guest commands as Peter:
prlctl exec "macOS Tahoe" \
'sudo -u steipete -H /bin/zsh -lc '\''source ~/.zprofile 2>/dev/null || true; uname -a'\'''
Capture an independent host-side screenshot:
prlctl capture "macOS Tahoe" --file /tmp/vm-reference.png
sips -g pixelWidth -g pixelHeight /tmp/vm-reference.png
TCC / GUI Attribution
For macOS Screen Recording and Accessibility, the responsible process matters.
prlctl execis headless and can fail to produce useful Screen Recording attribution.- Launch the test command from a visible terminal app in the guest when Screen Recording is involved.
- Ghostty works as a GUI terminal if installed.
- After a first failed capture, check
System Settings > Privacy & Security > Screen & System Audio Recording. permissions statusrun throughprlctl execmay still report Screen Recording false after Ghostty is allowed; validate Screen Recording by rerunning the capture from Ghostty.
Open the Screen Recording pane:
prlctl exec "macOS Tahoe" \
'sudo -u steipete -H open "x-apple.systempreferences:com.apple.preference.security?Privacy_ScreenCapture"'
Open Ghostty:
prlctl exec "macOS Tahoe" 'sudo -u steipete -H open -a Ghostty'
Running Commands Through Ghostty
Best path: create a guest script with prlctl exec, open/focus Ghostty, then type only a short launcher path into the visible terminal.
Guest script pattern:
prlctl exec "macOS Tahoe" 'sudo -u steipete -H /bin/zsh -lc '\''cat > /tmp/run-vm-lab.zsh <<EOF
#!/bin/zsh
source ~/.zprofile 2>/dev/null || true
cd ~/Projects/Peekaboo || exit 1
Apps/CLI/.build/debug/peekaboo image --path /tmp/peekaboo-vm.png --json
rc=$?
echo "EXIT:$rc"
[ -f /tmp/peekaboo-vm.png ] && sips -g pixelWidth -g pixelHeight /tmp/peekaboo-vm.png
echo "Press return to close..."
read _
exit $rc
EOF
chmod +x /tmp/run-vm-lab.zsh
ln -sf /tmp/run-vm-lab.zsh /tmp/r
open -a Ghostty'\'''
Then link the launcher into Ghostty's home directory and type ./r with scripts/parallels_type.py. This avoids unreliable path characters in Parallels key injection.
prlctl exec "macOS Tahoe" \
"sudo -u steipete -H /bin/zsh -lc 'ln -sf /tmp/run-vm-lab.zsh ~/r'"
python3 skills/vm-lab/scripts/parallels_type.py "macOS Tahoe" $'./r\n'
Avoid long command typing. Parallels key injection uses its own key-code table and can be layout-sensitive.
Known Pitfalls
- macOS clipboard APIs may fail from
prlctl exec;pbcopy, AppleScript clipboard, and Peekaboo paste can all fail in headless guest context. open -na Ghostty.app --args -e ...may only focus an existing Ghostty window on macOS; do not assume it runs the command.prlctl execmay re-join argv through a guest shell; for complex payloads, pass one fully shell-quoted command string or create the file with a tiny Python writer.- Parallels
send-key-event --keyuses Parallels key values, not macOS virtual key codes. - For normal typin
Установить vm-lab в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл vm-lab?
Parallels macOS VM lab: GUI automation, Peekaboo, TCC, Ghostty.
Как установить скилл vm-lab?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vm-lab запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic