Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

vm

БесплатноБез исполняемых скриптовНе проверен

Start/stop/snapshot test VMs; run the VM e2e; arm claude on one.

yotamleo-orgот yotamleo-org★ 15 звёзд на GitHub

Об этом скилле

vm — VM lifecycle + e2e runbook

Lean-invoke skill. Invoke on demand when you need to drive a test VM. Do NOT use this as an always-on rule.

Safety rails — read first

  • Concurrency rail: the old "only ONE VM online at a time" rule was Windows-era — it existed for shared loopback ports (2222/2223) and host RAM, carried no stated rationale, and blocked exactly the parallel linked-clone design the e2e runs need on purpose. It is now: one VM per loopback port; clones get distinct loopback ports above the registered set — the allocator skips any port a registered VM already claims — and a RAM budget (4 GB each, capped via env against free host RAM); the wet-suite baseline VM and the audit clone remain exclusive with each other. ubuntu_new/win11_base_himmel (the wet-suite baselines) and himmel-parity-audit (the audit clone) still never run alongside each other — that exclusivity is unchanged. The after-report clones (himmel-ar-1..himmel-ar-$HIMMEL_VM_AR_MAX, scripts/vm/after-report.sh) are the first consumer of the new rule: several can run at once, each on its own port, because each is genuinely its own host for the machine-lock purposes the linked clones exist to route around.
  • Power the VM OFF when done — python scripts/lib/vmsdk.py <vm> down (after-report.sh does this itself for its own clones, at the end of every run).
  • Creds and the GitHub PAT (himmel_github_token_vm, or himmel_github_token_vm2 when the first is absent; vmsdk.py clone takes the first present) live in the primary checkout's .env — the gitignored .env is NOT copied into worktrees. The SDK resolves it automatically via git rev-parse --git-common-dir, but always invoke vmsdk.py from the primary checkout root to be safe.
  • Ports (loopback only): ubuntu_new → 2222, win11_base_himmel → 2223, himmel-parity-audit → 2224. After-report clones start at 2231 and step upward, skipping any port already claimed by a registered VM (scripts/vm/port-alloc.sh) — never assume a fixed block is free; enumerate via VBoxManage list vms + showvminfo --machinereadable before hardcoding a port. vmsdk.py himmel-ar-<n> (n in 1..HIMMEL_VM_AR_MAX, default 2) reads that port from the clone's NAT rule and takes the user and password from ubuntu_new; no registry entry is needed.
  • After-report clones are PERSISTENT, never deleted — VBoxManage unregistervm --delete is refused by this harness's auto-mode classifier, so scripts/vm/after-report.sh creates each clone ONCE and RESTORES it to a baseline snapshot (suite-ready-v4, not suite-ready, suite-ready-v2 or suite-ready-v3) before every run instead. Do not "clean up" an idle himmel-ar-N by deleting it — restoring is the clean-state mechanism here, not deletion.
  • The baseline snapshot is suite-ready-v4; the older snapshots are kept, deliberately (linked-clone disk chains run back through them — never delete one). suite-ready-v4 is the credential-free golden base to clone; suite-ready-v4-auth is personalised and must NEVER be cloned. The golden image is snapshotted UNPERSONALISED, and the guest has no GUI. Read references/snapshots.md before touching any snapshot, cloning himmel-ar-N, rebuilding the golden image, or migrating v4 → v5 (full rationale, the vacuous-pass trap, the de-personalise steps).
  • The guest SSH login for ubuntu_new-derived VMs is vms.json's ubuntu_new.user literal (himmel) — it wins over the (possibly stale) user_env-resolved value. Repoint every consumer at once by editing that one JSON field, not by hardcoding a username elsewhere.

VM registry

Defined in scripts/lib/vms.json. Known VMs:

VM name OS SSH port
ubuntu_new Ubuntu 2222
win11_base_himmel Windows 11 2223

CLI — vmsdk.py

python scripts/lib/vmsdk.py <vm> <verb>

vmsdk.py needs python-dotenv and paramiko. Its PEP 723 script block pins them (python-dotenv>=1.0,<2, paramiko>=3.4,<6), so on a clean checkout run it as uv run scripts/lib/vmsdk.py <vm> <verb> (or pip install 'python-dotenv>=1.0,<2' 'paramiko>=3.4,<6'). Without python-dotenv it exits 2 with missing dependency and the verb never ran; without paramiko it exits 1 with the same message, at the first SSH step (the verb may have partly run). A background caller must check the exit code. up, down, snapshot and restore read their own result back (list runningvms, CurrentSnapshotName) and exit 1 when the readback disagrees or cannot be read, so a restore that did not happen can never pass as a clean base run.

Full usage line from the script:

usage: vmsdk.py <vm> <up|down|snapshot NAME [--no-secret-scan]|restore NAME|audit-base NAME|baseline NAME|clone [REF]|provision|e2e|push FILE [DEST]|trigger HANDOVER [--at TIME] [--cwd DIR] [--long-gap] [--timeout
Полный SKILL.md на GitHub

Установить vm в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/snapshots.md

FAQ

Что делает скилл vm?

Start/stop/snapshot test VMs; run the VM e2e; arm claude on one.

Как установить скилл vm?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл vm запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить vm с