drolu/agent-skills/msb-neuralos
Claude Code and agent skill by drolu/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
End-to-end recipe + runnable scripts for running neuralOS (on-device tool-calling model) inside Microsandbox (msb) microVMs — cook ONE template sandbox with neuralOS preinstalled, snapshot it (disk-only or FULL live RAM+process snapshot), then restore/branch it into any number of disposable job sandboxes; plus the data-source instance variant (database-backed agent with a self-installing first-boot service), Windows-native support notes, measured sizing/timings, and every API gotcha met in practice. Use when the user mentions Microsandbox, msb, sandboxes, snap/branch/fork of sandboxes, full snapshots, libkrun, or running neuralOS in a Microsandbox sandbox.
Install
npx vskill@latest install drolu/agent-skills/msb-neuralosSKILL.md
The same SKILL.md was published earlier as drolu/agent-skills/msb-neuralos.
Microsandbox (msb) ⇄ neuralOS — snapshot once, restore many
Run the on-device neuralOS model inside hardware-isolated microVMs. Microsandbox's superpower vs BoxLite: a live sandbox (disk + RAM + running processes) can be snapshotted in seconds and restored as a new running sandbox (CoW RAM fork) — so you cook one warmed instance and fork it N times without any boot at all.
Requirements
- macOS Apple Silicon (Hypervisor.framework) / Linux KVM /
Windows 10+ x64+ARM64 native via Windows Hypervisor Platform (HypervisorPlatform feature — NOT WSL2; msb doctor --fix enables it).
msbCLI:curl -fsSL https://install.microsandbox.dev | sh
(Windows: irm https://install.microsandbox.dev/windows | iex).
- Guest is always a Linux microVM regardless of host OS.
Quickstart
How Microsandbox actually works (model in your head)
- A sandbox is a Linux microVM (libkrun) with its own kernel. Guest is
always Linux (e.g. Debian trixie for python:3.12-slim).
- **
msb createboots it in the BACKGROUND with agentd (/init.krun) as
PID 1 — the image entrypoint / --entrypoint is NOT executed on create.** The entrypoint only runs in attached msb run mode. Services must be launched by background exec, or via attached run under nohup.
- Persistence: a per-sandbox `upper.ext4` writable layer (~4 GB sparse)
~/.microsandbox/db/msb.dbconfig (SQLite). Installed packages and files
survive stop/start; processes do not — re-exec on start.
- `msb exec` runs commands through the in-guest portal agent — works while
the sandbox runs, no SSH needed. Root by default.
- `--replace` recreates from the image (fresh rootfs;
--copy-dirpatches
re-applied) — it does NOT keep installed packages. Declarative recreates need a self-installing entrypoint (idempotent first-boot apt/pip) or you lose the stack.
- Networking: per-sandbox /30 subnets from
172.16.0.0/12(docs) —
sandbox network identities differ per sandbox (unlike BoxLite's identical guest IPs). Rich policy: --net profiles (public/private/host/all/none), --net-rule allow@target, --net-default-egress/ingress, egress bandwidth/packet limits, TLS interception, SOCKS proxy, DNS controls, --vsock host exposure. Published ports: -p HOST:GUEST.
- Secrets:
--secret ENV@HOST— value read from the HOST env at start,
stored only as a reference, never inlined; violations can block/terminate.
- Default resources: 1 vCPU / 512 MB — bump to `-m 1G` for neuralOS
(model + MariaDB need it).
- Slim images lack
ps/procps andcurl— use/proc/*/cmdline
enumeration and python urllib for in-guest HTTP checks.
Phase 0 — Environment (once)
Installs/updates msb, runs msb doctor (on Windows use msb doctor --fix to enable WHP elevated), verifies virtualization, checks the CLI version.
Phase 1 — COOK a neuralOS template
cook_template.sh creates a sandbox, installs neuralOS (engine + ~35 MB weights bundled in the wheel), verifies with a real tool call, then captures a full snapshot archive (disk + RAM + running verifier) — the template artifact everything else forks from.
| Gate | Check | Pass | |
|---|---|---|---|
| install | pip install neuralos exit 0 | engine + weights on disk | |
| import | import needle; needle.__version__ | version prints | |
| tool call | add 4 and 5 → executed | results contains 9 | |
| template | full snapshot archive written | ~300–400 MB |
Measured timings (M-series Mac): apt mariadb ~4 m; pip (pymysql+neuralos+pydantic) ~3.7 m; full snapshot 6.4 s (400 MB); --forked restore 3.6 s.
Phase 2 — SPIN UP: restore > run
spin_up.sh restores the template snapshot into a new sandbox and runs a verification suite / single ask.
--forkedrestores memory + running processes — the model is already
loaded; zero boot. Caveat (verified): restored listeners can hold stale sockets — if a service in a forked sandbox misbehaves, restart the service process inside it.
--disk-onlycold-boots the captured disk — clean process state, use this
for services.
- **Rule (same as BoxLite): never fork a box carrying unique persisted
identity** (gateway keypairs etc.). neuralOS jobs are stateless → safe.
Request flow inside the sandbox
| Surface | How | |
|---|---|---|
| one-shot ask (CLI) | msb exec NAME -- python3 /opt/chinook/ask.py /opt/chinook "…" | |
| web service | demo_server.py --port 8877 launched at boot; POST /ask | |
| deterministic country asks | ask.py fast-path executes the rank-1 probe directly |
Phase 3 — Data-source instance variant (chinook pattern)
build_data_instance.sh builds the chinook instance: MariaDB + the neuralOS instance + a web service, from ~/boxlite-lab/chinook/ (models, menu, bridge, instance, ask.py, demo_server.py, dump, start.sh).
What it runs (the exact verified sequence):
`start.sh` contract (self-installing first boot — required because create doesn't run entrypoints and --replace wipes rootfs):
- idempotent
apt-get install mariadb-server(+procps) ifmariadbdmissing - idempotent
pip install pymysql neuralos pydanticif imports missing - init datadir if empty → start
mysqld_safein background → wait - ensure
admin/adminuser (grants for BOTH `%` and `localhost`) - import dump once (sentinel: skip if
chinook_mysql.Trackexists) exec python3 demo_server.py --port 8877
Poll for readiness with in-guest python (no curl on slim images): POST http://127.0.0.1:8877/ask until HTTP 200 and the payload contains the expected sentinel (e.g. "Track": 3503). Verified first-boot-to-serving: ~8 minutes (apt + pip + model); subsequent boots ~5–15 s.
Verification gates (suite in scripts/suite.py, run in-guest): possessive country asks return ONLY that country; global ask returns 10 multi-country rows; overview contains "Track": 3503; employees contain Jane/Steve; AC/DC albums present. Plus SQL truth: 3,503 tracks / $2,328.60.
Phase 4 — Portability & lifecycle
Snapshots can also be installed as named groups (omit -o) and restored by group name. --forked = CoW RAM (child shares pages); plain restore materializes the full RAM image.
Sizing (measured)
| Sandbox | vCPU | RAM | Disk | Observed | |
|---|---|---|---|---|---|
| neuralOS-only | 1 | 1 G | 4 G | model peak ~95 MB | |
| chinook (MariaDB+instance+web) | 1 | 1 G | 6 G | idle 165–178 MB; suite peak ~357 MB; disk 642 MB |
Defaults are 512 MB — too small; always pass -m 1G (or more) for neuralOS. --max-memory/--max-cpus allow hotplug headroom.
Windows notes (native — a real differentiator)
- Native
msb-windows-x86_64.exe/msb-windows-aarch64.exe(Windows on ARM
supported), libkrunfw-windows-*.dll using WHP — no WSL2.
- Requires Windows 10+,
HypervisorPlatformoptional feature (separate
from VirtualMachinePlatform that Docker/WSL2 enable), VT-x/AMD-V in firmware. msb doctor --fix configures it; runtime root %USERPROFILE%\.microsandbox.
- BoxLite by contrast supports Windows only via WSL2.
msb cheat sheet (0.7.4, verified)
Gotchas — every one hit in practice
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/msb-neuralos/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/drolu/agent-skills/msb-neuralos)