nix-gizmos

Agent Vm — AI skill for Claude Code

AI community

Run AI coding agents (Claude Code, Gemini CLI, Codex, pi) in disposable NixOS microVMs on QEMU/KVM, with sealed egress, an API budget, and a launch record of what each session could do.

How to install Agent Vm

This entry records only its repository, not the path inside it, so there is no exact command to give. Open nix-gizmos/agent-vm and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Vm does

Run AI coding agents (Claude Code, Gemini CLI, Codex, pi) in disposable NixOS microVMs on QEMU/KVM, with sealed egress, an API budget, and a launch record of what each session could do.

Alternatives in AI

  • CLI Continues — resume any AI coding session in another tool — Claude Code, Copilot, Gemini, Codex, Cursor 1.5k ★
  • Botmux — Bridge Feishu/Lark to AI coding CLIs — Claude Code, Codex, Gemini, OpenCode… every DM, group or topic spawns i 1.2k ★
  • Memory Forge Rs — Stop resetting satisfying AI chats — edit the memory instead 474 ★

README

claude-vm

Run AI coding agents in isolated NixOS microVMs via [microvm.nix](https://github.com/microvm-nix/microvm.nix) (QEMU+KVM). Your project directory is mounted read-write at `/work` inside the guest via virtiofs — no root required.

The agent starts automatically on boot. Exiting the agent shuts down the VM.

Features

  • A VM boundary, not a container. Separate kernel and process tree; the host is reachable only through what you explicitly share, and the network is user-mode NAT that cannot bind host ports.
  • Graduated egress policy. EGRESS_POLICY goes from open through monitor/alert (host-side capture, observe only) to shadow/enforce: a sealed network whose only way out is an allowlisting proxy on the host, which also keeps API keys out of the guest. Every decision is audited, and shadow shows what enforce would block before it blocks anything — see Egress policy.
  • Workspace policies for untrusted code. WORKSPACE_MODE=ephemeral keeps the agent's writes in a guest-side overlay that is discarded at poweroff (vm-work-diff shows what changed); WORKSPACE_GUARD=1 makes host-executed config such as .git/hooks and .mcp.json read-only inside the guest — see Ephemeral workspace and Hardening notes.
  • Your project at /work, read-write. Shared over virtiofs by an unprivileged daemon — no root or sudo, and files the guest creates are owned by your host user.
  • Start it and forget it. The agent launches on boot; when it exits the VM powers off and its virtiofs daemons are cleaned up.
  • Per-project state that persists. Sessions, credentials and settings live in a host directory that survives relaunches. Each agent gets its own; several VMs can run against the same project, or different ones in parallel.
  • Four agents from one set of modules. Claude Code, Gemini CLI, Codex CLI and Pi — see Flavors.
  • Container runtimes on demand. Docker, co