agentleFS
MicrosoftKnown publishermicrosoft/nvx/.github/skills/nvx-host-connect/SKILL.md

nvx-host-connect

Skill296 starsChanged 58 days agoMITView on GitHub

Select a developer-configured NVX host, connect over SSH, identify Linux/KVM, Linux/MSHV, or Windows/WHP support, verify its checkout, and prepare artifacts. Use before remote NVX work or when diagnosing configured SSH host prerequisites.

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 15 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before asking for an SSH target, list the configured profiles from the local workspace:

    line 21
  2. Distinctive:

    Treat the resolver output as authoritative:

    line 32
  3. Very specific:

    If remote_enabled is false, inform the agent that remote hosts are not configured and only local NVX development is enabled.

    line 34
  4. Distinctive:

    If profiles are available and none was requested, ask the user to select one.

    line 37
  5. Very specific:

    If remote_repo is null, ask for the absolute checkout path.

    line 42
  6. Distinctive:

    Do not connect to an ad hoc SSH target or a profile absent from the inventory.

    line 44
  7. Distinctive:

    Ask only for missing values.

    line 67
  8. Distinctive:

    Do not disable SSH host-key checking.

    line 73
  9. Distinctive:

    Do not run git reset, git clean, checkout another revision, pull, overwrite files, or update submodules in a dirty remote checkout.

    line 74
  10. Distinctive:

    Prefer a separate checkout or worktree when the requested revision differs from the remote checkout.

    line 76
  11. Very specific:

    Do not enable Windows features, change device permissions, edit sudoers, load kernel modules, reboot, or install packages without explicit …

    line 78
  12. Very specific:

    Do not use sudo merely to bypass KVM or MSHV access failures.

    line 80
  13. Very specific:

    Use the profile backend explicitly and verify that the host supports it.

    line 82
  14. Distinctive:

    Check for an existing OpenVMM process.

    line 84
  15. Very specific:

    Prefer one persistent interactive SSH session so shell state, the repository path, and long-running command output remain visible.

    line 89
  16. Very specific:

    If authentication needs a secret, let the user type it into the terminal.

    line 98
  17. Distinctive:

    Use exactly one matching host branch below.

    line 106
  18. Distinctive:

    If both devices are usable and the backend was not specified, ask which one to use.

    line 134
  19. Distinctive:

    Do not infer MSHV merely because the host runs under a Microsoft hypervisor.

    line 135
  20. Distinctive:

    Do not download over artifacts the user wants to preserve.

    line 192
  21. Distinctive:

    Keep the SSH session open and report:

    line 206
  22. Distinctive:

    Commit and whether the checkout is dirty.

    line 210

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Connect to an NVX Host

Establish a verified remote NVX session that another skill can use. Stop after reporting the connection context and prepared artifacts; use a focused skill to run, debug, or benchmark NVX.

Local Host Inventory

Remote development is enabled only by the ignored .nvx-hosts.json inventory at the repository root. Developers create it from scripts/nvx-hosts.example.json as described in the setup guide, and keep connection and authentication details in SSH configuration. Never place passwords, tokens, private keys, passphrases, or SSH options in the inventory.

Before asking for an SSH target, list the configured profiles from the local workspace:

python3 .github/skills/nvx-host-connect/scripts/hosts.py
python .github\skills\nvx-host-connect\scripts\hosts.py

Treat the resolver output as authoritative:

  • If remote_enabled is false, inform the agent that remote hosts are not configured and only local NVX development is enabled. Stop this skill and use nvx-run, nvx-debug, or nvx-benchmark locally.
  • If profiles are available and none was requested, ask the user to select one.
  • Resolve the selected profile by passing its name to the same command. Connect only to the returned ssh_target and treat its backend, platform, and host_type as authoritative connection context. Do not infer whether the server is bare metal or a virtual machine from platform probes.
  • If remote_repo is null, ask for the absolute checkout path. Ask only for fields missing from the selected profile.
  • Do not connect to an ad hoc SSH target or a profile absent from the inventory.

Example profile resolution:

profile=kvm-lab # Replace with a configured profile name.
python3 .github/skills/nvx-host-connect/scripts/hosts.py "$profile"
$profile = 'kvm-lab' # Replace with a configured profile name.
python .github\skills\nvx-host-connect\scripts\hosts.py $profile

Required Inputs

Resolve these before changing or running anything:

  • A host profile resolved from .nvx-hosts.json.
  • Absolute path to the NVX checkout when the profile does not define remote_repo.
  • Intended source revision or whether the existing remote checkout is authoritative.
  • Artifact source: packaged release, fresh build, or existing remote build.

Ask only for missing values. Do not ask for passwords, private keys, tokens, or passphrases in chat. Use the user's configured SSH agent or identity. If SSH asks for a secret, pause and have the user enter it directly in the terminal.

Safety Rules

  • Do not disable SSH host-key checking. Stop on a changed host key.
  • Do not run git reset, git clean, checkout another revision, pull, overwrite files, or update submodules in a dirty remote checkout.
  • Prefer a separate checkout or worktree when the requested revision differs from the remote checkout. Get approval before transferring uncommitted files.
  • Do not enable Windows features, change device permissions, edit sudoers, load kernel modules, reboot, or install packages without explicit approval.
  • Do not use sudo merely to bypass KVM or MSHV access failures. Report the exact failed access check.
  • Use the profile backend explicitly and verify that the host supports it. Never select both on a remote host or silently override the inventory.
  • Check for an existing OpenVMM process. Never terminate a process that this session did not start.

1. Open a Persistent Session

Prefer one persistent interactive SSH session so shell state, the repository path, and long-running command output remain visible. Use ssh -tt when a direct SSH command must expose an interactive guest. Avoid complex cross-platform remote one-liners; enter the remote shell and then use its native syntax.

ssh <resolved-ssh-target>

If authentication needs a secret, let the user type it into the terminal. Determine the OS by trying python3 first on Linux and python first on Windows:

python3 -c "import platform; print(platform.system(), platform.release(), platform.machine())"
python -c "import platform; print(platform.system(), platform.release(), platform.machine())"

Use exactly one matching host branch below.

2. Probe Linux/KVM or Linux/MSHV

cd -- '<remote-repo>'
uname -srmo
python3 --version
git rev-parse --show-toplevel
git rev-parse HEAD
git status --short
python3 scripts/nvx.py verify

for device in /dev/kvm /dev/mshv; do
    if test -e "$device"; then
        test -r "$device" && readable=yes || readable=no
        test -w "$device" && writable=yes || writable=no
        printf '%s readable=%s writable=%s\n' "$device" "$readable" "$writable"
    fi
done
pgrep -af openvmm || true
BackendRequired checkPlatform ID
KVM/dev/kvm exists and is readable and writablelinux-kvm
MSHV/dev/mshv exists and is readable and writablelinux-mshv

If both devices are usable and the backend was not specified, ask which one to use. Do not infer MSHV merely because the host runs under a Microsoft hypervisor.

3. Probe Windows/WHP

Set-Location -LiteralPath '<remote-repo>'
[Environment]::OSVersion.VersionString
python --version
git rev-parse --show-toplevel
git rev-parse HEAD
git status --short
python scripts\nvx.py verify
Get-CimInstance Win32_ComputerSystem |
    Select-Object Manufacturer, Model, HypervisorPresent
Get-Process openvmm -ErrorAction SilentlyContinue

Windows supports only whp, with platform ID windows-whp. If useful and the current account can query optional features without elevation, inspect the feature:

Get-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform |
    Select-Object FeatureName, State

An access-denied result is not a reason to elevate automatically. A smoke run is the definitive WHP runtime check.

4. Establish Revision and Artifacts

Record git rev-parse HEAD and git status --short. Compare the commit with the requested revision. If the checkout is dirty, preserve it and ask whether to use it as-is or create an isolated checkout. Never silently test a different revision.

Choose artifact preparation according to the task:

  • For the latest packaged NVX release, use download with the explicit backend.
  • For guest, OpenVMM, or build changes, use the relevant build-guest, build-openvmm, or build command.
  • For coordinator-only changes, existing matching release artifacts may be reused after reporting their provenance.

Linux examples:

python3 scripts/nvx.py download --hypervisor kvm
python3 scripts/nvx.py download --hypervisor mshv
python3 scripts/nvx.py build

Windows examples:

python scripts\nvx.py download --hypervisor whp
python scripts\nvx.py build

Do not download over artifacts the user wants to preserve. Verify the generated command and required files without starting a VM:

backend=kvm # Use the resolved profile backend.
python3 scripts/nvx.py run --hypervisor "$backend" --dry-run
python scripts\nvx.py run --hypervisor whp --dry-run

Handoff

Keep the SSH session open and report:

  • SSH host alias and remote repository path.
  • Detected OS, selected backend, platform ID, and resolved host type.
  • Commit and whether the checkout is dirty.
  • Artifact source and completed preparation command.
  • Dry-run result and any existing OpenVMM process.
  • Any privilege or platform limitation.

Then load exactly one of nvx-run, nvx-debug, or nvx-benchmark.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.